I want to change offset value from outside with PLC communication. I have three value (x,y,z) for one point. And I have ten point. So, I need to change 30 value totally from PLC. Do you have any example about it?
Are you asking about how to setup a group input to receive values from a PLC or the RAPID code of applying offsets to a robtarget?
- PLC words: Sometimes it’s easiest to “waste” signals to make it easier for the PLC setup – even though you don’t need a number so large – group 0-15, 16-31, etc., etc…
- Offset robtargets: Search this forum for “offsets” and you’ll find multiple examples of passing values to offset robtargets and using a bit to signal positive or negative…
Thank you for your answer @soup.
…
Movej …offs(x_offset, y_offset, z_offset) v500 … ect
In general I’m changing offset like this and it was enough for me. But in that time I need to get theese valuse from PLC. Robot and PLC will work synchronous. I guess I can do it with group input.
Yep, these numbers can be fed from the PLC and because group inputs can’t be negative you need to set a signal the negative separately.
Example;
PROC SetOffsets()
x_offset:=giOffsetX;
y_offset:=giOffsetY;
z_offset:=giOffsetZ;
IF diOffsetX_Neg = 1 x_offset:=x_offset * -1;
IF diOffsetY_Neg = 1 y_offset:=y_offset * -1;
IF diOffsetZ_Neg = 1 z_offset:=z_offset * -1;
ENDPROC
As far as timing, you can use signals or a group output for that.
Example:
! infeed1 before pick
SetGO goProgramPointer, 110;
…
! infeed1 at pick
SetGO goProgramPointer, 120;
…
! infeed1 after pick
SetGO goProgramPointer, 130;
…
! outfeed1 before place
SetGO goProgramPointer, 210;
…
! outfeed1 at place
SetGO goProgramPointer, 220;
…
! outfeed1 after place
SetGO goProgramPointer, 230;
…
Thank you very much. I guess I understood better now ![]()