Skip to content

example for using timer.TOff #86

Answered by mhthies
jo47011 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

The TOff timer is only a delay for changes to off. This means if the value of the inserted subscribable object changes to False, the TOff's value will change to False 5 seconds later, but it will change to True immediately when the value of the inserted object changes to True. This functionality is simliar to the TOFF block in SPS programming languages (e.g. https://infosys.beckhoff.com/english.php?content=../content/1033/tcplclib_tc2_standard/74405003.html&id=).

For your purpose, the TOff timer is probably not the right tool. Instead, I would use a logic handler function like this:

@light_table.trigger
@shc.handler(reset_origin=True)
async def switch_off_light_table(value):
    """ S…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jo47011
Comment options

Answer selected by jo47011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants