<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How to define a startup task?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dbb6cf636c/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dbb6cf636c/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/dbb6cf636c/</id><updated>2020-02-27T17:14:02.554000Z</updated><subtitle>Recent posts to How to define a startup task?</subtitle><entry><title>How to define a startup task?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dbb6cf636c/?limit=25#5821" rel="alternate"/><published>2020-02-27T17:14:02.554000Z</published><updated>2020-02-27T17:14:02.554000Z</updated><author><name>e.kislov</name><uri>https://forge.codesys.com/u/e-kislov/</uri></author><id>https://forge.codesys.com9c9b46bfe5adb0a078fa5a217507ed46f35e466e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;Task Configuration - System Events - Add Event Handler - Select event (PrepareStart, PrepareShutdown, etc.) - enter name for new (not existing!) function - add implementation.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 03" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4719"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to define a startup task?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dbb6cf636c/?limit=25#5642" rel="alternate"/><published>2020-02-27T17:14:01.569000Z</published><updated>2020-02-27T17:14:01.569000Z</updated><author><name>Kalyani-K</name><uri>https://forge.codesys.com/u/kalyani-k/</uri></author><id>https://forge.codesys.come7a8f338ff00abeddf081dffdef9c1ecdb193390</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello and sorry for gravedigging,&lt;/p&gt;
&lt;p&gt;but I was just wondering the same(ish) thing:&lt;br/&gt;
Is there a way in Codesys 3.5 with the 3.5.14.20 Pi Runtime to create tasks&lt;br/&gt;
that will only be called once during startup/shutdown of the PLC?&lt;/p&gt;
&lt;p&gt;In my program I am opening a file in the local filesystem and&lt;br/&gt;
if I stop or logout the program with a file handle opened&lt;br/&gt;
it will raise an exception and I will have a bad time.&lt;/p&gt;
&lt;p&gt;Therefore I was thinking that I could write a task which would&lt;br/&gt;
close any opened filehandles in order to shutdown gracefully.&lt;/p&gt;
&lt;p&gt;Thanks in advance!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to define a startup task?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dbb6cf636c/?limit=25#f2c3" rel="alternate"/><published>2020-02-27T17:14:00.434000Z</published><updated>2020-02-27T17:14:00.434000Z</updated><author><name>con2827</name><uri>https://forge.codesys.com/u/con2827/</uri></author><id>https://forge.codesys.com340f862a4111a568dfd020523f6d96e3ede451d0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Is this possible w/ the r-Pi?&lt;/p&gt;
&lt;p&gt;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.  &lt;/p&gt;
&lt;p&gt;Any way to do this?  Is this a difference specific to ver 3.5 of CodeSys, or the r-Pi, or both?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>