If event functions are created for event monitoring, they must accept a transfer parameter! In this example, it is called
eventcallback, but it can also have
ecb or other short names.
def my_function(eventcallback): # Name of the IO, which triggered this event eventcallback.ioname # Value of the IO, at the Trigger point eventcallback.iovalue # Simple 3 second wait time, without program blocking eventcallback.exit.wait(3)
Returns the Name of the IO, that triggered the event.
Returns the value of the IO at the trigger time.
Waits the specified time in seconds before the function continues.
.exit.wait(seconds) can abort wait by calling
.stop(). You get a return value
False (full time waited) or
True (aborted), to control next steps in your code!
True if the
.stop() function has been called for EventCallback. This is for the global termination of the execution.
Sets the return value of
True, and aborts all
.exit.wait(seconds) operations that will return
True as the return value. With this method you can exit a loop, for example.