Hi all!
I am using a CS8C robot controller controlling a TX60 robot arm.
I have a Siemens S7-300 Profibus master PLC communicating with the CS8C which is Profibus slave.
I am attempting to simulate the alter() option on the controller using the PLC. In other words, I am attempting to use PLC as a quasi-controller for the real-time robot path control.
To do this I have 2 tasks, communication() and movement().
The communication() task simply collects the profibus data, and so its code is as follows:
begin
while(true)
...
Pos.trsf.x = aioGet(IO:BLOCKA_IF10)
Pos.trsf.y = aioGet(IO:BLOCKA_IF11)
Pos.trsf.z = aioGet(IO:BLOCKA_IF12)
...
endWhile
end
The movement() task is simply robot movement to Pos:
The tasks are run with priorities N and 3 respectively, where N is the number of lines of Val3 code (including the while(true) and endWhile) in the communication() program.
Unsurprisingly the robot motion in the beginning is a little jerky, before all the calculations are made. But then it appears to move real-time controlled. Upon touching the robot arm the feel is not at all smooth as it would be if proper movement was used, the controller-controlled one instead of the PLC-controlled one, but that is also unsurprising.
What is surprising, however, is that robot stops after some time. According to the isEmpty() there are still movement commands present in the controller, and checking the movement data it is still changing, but the robot is stationary. There are no errors or messages on the pendant or in the log and no task is suspended. The robot simply stops.
I am at a loss as to what is going on.
Thank you all for taking your time to read this.