Hello
Can i make that in SPS 4.1.4
;Selection outil noir 1 ou noir 2
IF (E_NOIR_2 == TRUE) THEN
TOOL_DATA[3]=TOOL_DATA[11]
ELSE
TOOL_DATA[3]=TOOL_DATA[10]
ENDIF
Hello
Can i make that in SPS 4.1.4
;Selection outil noir 1 ou noir 2
IF (E_NOIR_2 == TRUE) THEN
TOOL_DATA[3]=TOOL_DATA[11]
ELSE
TOOL_DATA[3]=TOOL_DATA[10]
ENDIF
Yes, you can. But keep it inside the loop.
Sent from my iPad using Tapatalk
Apart of what RS has said, keep in mind that SPS has it's own working thread, this means that it is a parallel task. In some circumstances your tool will change at the moment you want and in other circumstances it will take a little bit longer to change and this can affect your program...
Probably a good thing to do is some kind of handshake like setting a variable after the change has performed and then wait for the variable to be active before continuing in your program.
Hmmmmm...I agree with Joan. Then the best way to assign TOOL would be in your src before the motion point which is going to use the TOOL. You can make a Global Subroutine which will include the condition to assign the TOOL and then this subroutine can be called each time you have a motion defined in your program. This way it would be safe and solid.
Thanks
Yes, changing motion parameters from inside the SPS can be unpredictable. One thing to keep in mind, it will not change a motion that is already in progress -- so if the robot is moving from Point A to Point B, and the SPS changes the tool data midway, the robot will continue to Point B without any change.
There's also interaction with the Advance Run to consider -- I've never tried something like this, but my suspicion is that changing the TOOL_DATA from the SPS would have no effect on the robot's motion until after the Motion Pointer catches up with the Advance Pointer, meaning that the robot's motion would not change to reflect this until 1-5 motions later.