We have a customer currently using a Delta-Tau motion controller. I am looking for a way to re-use their motion programs with minimal effort. The motion programs for this are written in a text based language similar to IEC1131 Stuctured text. However, when a motion command is executed, the program stops and waits for the motion to be finished before going on to the next instructions. For example....
INC // Set relative mode.
dwell 50 // dwell time
X(-200) U(-200) // Relative move in X and U
dwell 100 // dwell time
Does CtrlX have a way of doing this?
Does our Blockly App operate in this way? I don't think my customer will want to code in Blockly. However, does our Blockly App talk to an API written in another language eg. Python C++ or even IEC? Or can we call blockly blocks from one of these text based languages?
Solved! Go to Solution.
For applications like that you can use our python app, which got initially released with the 20.07 release. The Blockly app uses this python app. The official name is rexroth-python.
For your use case you could command something like that in python:
MotionLib.kinCmdMoveLinAbs("Robot", (100.0, -200.0, 400.0) ) time.sleep(0.50) MotionLib.kinCmdJogIncr("Robot", (0.5,0.5), 5.0) time.sleep(1.00)
Or you could even write a function in python which checks for the state of the command and just waits till its done or reached its point of destination.
I need to get hold of the Python App for the virtual control. I see there is another post from someone trying to find this.
Just to clarify....
Do the python commands just post a motion command to the buffer then return? Or do they hold up execution until the move is done? I'm happy to wrap them in a function that waits until the motion is done. However, please confirm that the processor task handling system is ok with this. Does the Python runtime execute in a Freewheeling or low priority task?
Do the python commands just post a motion command to the buffer then return? Or do they hold up execution until the move is done?
The python commands just post a motion command to the buffer. If you need a functionality to make sure the command got executed, you must do it by your own. The simple solution is to let the python interpreter sleep like in the example above. The better solution is to save the command ID when posting the command and then poll for the command state DONE. (and obviously sleep between the polling cycles)
However, please confirm that the processor task handling system is ok with this.
It is no problem to poll the state of the command like every 10ms.
Does the Python runtime execute in a Freewheeling or low priority task?
Python runs in its own process.