I’ve been trying to see if there’s a way to do this without scripting or minimal scripting.
I have UDT data tag that has a few OPC connections, the relevant ones being
runBit - 0 for stop, 1 for run, read from and written to OPC presentValue - present value of OPC timeoutSP - memory tag, input from user, how long until timeout
The idea we want to implement is such - when a user clicks start, the
runBit is set to a 1. The
runBit then has a 0 written two it in only one of two ways - the user manually clicks stop, or the timeout limit is reached. For example, if we have a timeoutSP of 300 seconds, and someone clicked “Start” as 10:00 am, then if the user does not do anything else, at 10:05, the runBit will have a 0 written to it. If the user decides to turn it off before 10:05, thats fine as well.
I was thinking something of having a new property of the UDT that kept track of when the runBit is turned on with some date arithmetic to figure out the timeout time, to determine if it should be turned off. But from there, I’m not really sure how to proceed and it’s starting to feel convuluted. I feel like there was a way to do this from the Ignition University videos. Is there a built in way for this functionality?