Variable from PLC to UR5e program

Hello,

I am trying to pull a variable from the PLC to the UR5 program. I was wondering if the best way to do this would be to use a digital_in and then set the digital_in in the PLC? Any advice is graciously appreciated.

If you’re trying to take the value of a variable stored in the PLC and pass it to the robot, I would either use ethernetIP/profinet if your PLC supports it, or a simple MODBUS write command from your PLC. If you want a simple ON/OFF signal, then yes, discretely wiring output to input is fine.