I think I can use the JupyterLab classification_interactive.ipyn as a basis for vision detecting a locking pin - in the back of a truck. I want to add pylogix - - which lets me send values to a PLC. I just can’t figure out where to add the code. I do a pip install pylogix - then all they pylogix PLC stuff works in the notebook.
Need to put something like this in the classification notebook.
from pylogix import PLC
with PLC() as comm:
comm.IPAddress = ‘10.49.107.10’
ret = comm.Write(‘JP_DINT’,1)
This would put a 1 in the JP_DINT tag for PLC 10.49.107.10 - – - say if it was ‘Thumb UP’ - – - Then I would also do a ret = comm.Write(‘JP_DINT’,0) for ‘Thumbs DOWN’
I’d want to not send 8,000 plc updates per second - – but I don’t want to discourage any suggestions because of that… I can start with the first part…