I need to trigger a SQL insert based on a bit in the PLC.
I can make everything function with a pushbutton, but I have not figured out way to monitor a bit.
I have a timer set up at a half second and the code will be within this "tick"
I am using the EthernetIPforSLCMicroCom driver and my bt is B11:0/13
My plan was to declare a boolean variable and read the value from the plc at the rate of the timer.
Then trigger the SQL insert if the variable was equal to 1
After closing the connection write back a 0 to the same location as a handshake to the PLC.
Any advise will be appreciated.