After having some problems calling the OCX from a thread
To describe some typical features and the idea behind:
You can configure each input what is the normal state (0 or 1) for it
You shall create a separate on and off action for each output and put it in a macro together with events that shall trigger it
At startup the last known output status is sent to board (i.e. after power failure etc it will recover the desired states) Since the api is missing a call that gives the output states, I had to save the state to a file at stop and then I read it again at start
The plugin reads the inputs via a separate thread that is paused by a configurable time (default is 0.1 sec)
The input and output states are kept in alarm memory and output memory during runtime
Please try it with the board if it works ok
For debugging, I left the printing ON for the output list. If it works ok you can comment it out in the py code
You can use my simple xml file to test it. Just execute some macros and you should see the outputs change
Best regards, Walter