Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
but I was just wondering the same(ish) thing:
Is there a way in Codesys 3.5 with the 3.5.14.20 Pi Runtime to create tasks
that will only be called once during startup/shutdown of the PLC?
In my program I am opening a file in the local filesystem and
if I stop or logout the program with a file handle opened
it will raise an exception and I will have a bad time.
Therefore I was thinking that I could write a task which would
close any opened filehandles in order to shutdown gracefully.
Thanks in advance!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Task Configuration - System Events - Add Event Handler - Select event (PrepareStart, PrepareShutdown, etc.) - enter name for new (not existing!) function - add implementation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is this possible w/ the r-Pi?
On another plc in CodeSys v3.1, I could configure task type = External, event = on_Start. But I don't have these options for the r-pi, v3.5.
Any way to do this? Is this a difference specific to ver 3.5 of CodeSys, or the r-Pi, or both?
Hello and sorry for gravedigging,
but I was just wondering the same(ish) thing:
Is there a way in Codesys 3.5 with the 3.5.14.20 Pi Runtime to create tasks
that will only be called once during startup/shutdown of the PLC?
In my program I am opening a file in the local filesystem and
if I stop or logout the program with a file handle opened
it will raise an exception and I will have a bad time.
Therefore I was thinking that I could write a task which would
close any opened filehandles in order to shutdown gracefully.
Thanks in advance!
Hey,
Task Configuration - System Events - Add Event Handler - Select event (PrepareStart, PrepareShutdown, etc.) - enter name for new (not existing!) function - add implementation.