How to read global variables from robot program

Hi,

As of right now there is no direct way to access KRL variables with Python and vice versa. The only option right now is to convert the variable to IO signals via KRL and decode those signals in your Python code by reading the IO values.

Here are two examples that utilize this:

Robot sends value via IO to other robot:
Send_Value_Robot_To_Robot.vcmx (4.5 MB)

Conveyor reads height of parts, sends the height via IO signals to robot, robot adapts pick height:
16bit_Real_Signal_Sensor_Example.vcmx (3.2 MB)

3 Likes