Adressing Variables in KRL

Hello forum, so i managed to get the distance sensor value printed from a script in the robot, as i tought that would be the first step…
Now i would like to transfer this value to the robot code for use inside KRL of the robot.
Can someone help me how i would do this?

AnalogToRobot.vcmx (2.8 MB)


As far as I know there is no option to directly connect Python code with the KRL code.

A possible workaround is to convert the variable in Python to a binary value and send this value via IO signals to the robot. Then convert the IO signals through a signal declaration in KRL back to an integer.

Here is an example

16bit_Real_Signal_Sensor_Example.vcmx (3.2 MB)

Probably this thread is also interesting for you