<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to SFC Action Implemented as SFC</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/291a3e4f8f/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/291a3e4f8f/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/291a3e4f8f/</id><updated>2020-02-27T22:39:29.329000Z</updated><subtitle>Recent posts to SFC Action Implemented as SFC</subtitle><entry><title>SFC Action Implemented as SFC</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/291a3e4f8f/?limit=25#597e" rel="alternate"/><published>2020-02-27T22:39:29.329000Z</published><updated>2020-02-27T22:39:29.329000Z</updated><author><name>t.lundahl</name><uri>https://forge.codesys.com/u/t-lundahl/</uri></author><id>https://forge.codesys.com146f50dfb3c85a6351294b9e676e4e0280f11083</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;don hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
I declared SFCInit as a boolean input variable for the POU.  &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As a tip is to read up on SFCReset as well, they work almost the same, the SFCReset will actually execute the Init step earlier than SFCInit.&lt;/p&gt;
&lt;p&gt;/Torbjörn&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SFC Action Implemented as SFC</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/291a3e4f8f/?limit=25#a4f1" rel="alternate"/><published>2020-02-27T22:39:27.686000Z</published><updated>2020-02-27T22:39:27.686000Z</updated><author><name>don</name><uri>https://forge.codesys.com/u/don/</uri></author><id>https://forge.codesys.comfc2c2391dd45f38673e6d048e56a4a26367a885b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ok, found a solution.  I implemented the 'DriveToBay' SFC within a separate program POU.  I declared SFCInit as a boolean input variable for the POU.  I then called the DriveToBay POU from an action written in FBD within my Drive step.  I set the SFCInit input variable to 'NOT Drive.x'.  Seems to be working well.  If there are any better solutions, please let me know.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Don.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SFC Action Implemented as SFC</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/291a3e4f8f/?limit=25#7a57" rel="alternate"/><published>2020-02-27T22:39:23.160000Z</published><updated>2020-02-27T22:39:23.160000Z</updated><author><name>don</name><uri>https://forge.codesys.com/u/don/</uri></author><id>https://forge.codesys.comc085e10c7a3f5ab1b4f910921a0b2a86734ab5e8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am writing a program in which the main sequence is controlled by a 'Main' POU written in SFC using IEC Steps.  There is a step within the Main POU called 'Drive'.  There is a (N)on-stored action associated with the Drive step called 'DriveToBay', which is written in SFC.  I am finding that when the Main POU returns to the Drive step, the DriveToBay SFC action continues from the step that it was running previously (i.e., it does not start from the Init step).  I would like it to start from the Init step.  The documentation tells me this can be achieved by setting the SFCInit variable, but I do not know how to access the variable when the SFC resides within an SFC action.&lt;/p&gt;
&lt;p&gt;Any help greatly appreciated.&lt;/p&gt;
&lt;p&gt;Don.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>