<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to the action of the SFC after the poweroff</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/8b0b0d9f62/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/8b0b0d9f62/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/8b0b0d9f62/</id><updated>2020-02-27T22:25:23.818000Z</updated><subtitle>Recent posts to the action of the SFC after the poweroff</subtitle><entry><title>the action of the SFC after the poweroff</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/8b0b0d9f62/?limit=25#63ab" rel="alternate"/><published>2020-02-27T22:25:23.818000Z</published><updated>2020-02-27T22:25:23.818000Z</updated><author><name>enric</name><uri>https://forge.codesys.com/u/enric/</uri></author><id>https://forge.codesys.comff6fa67f7b99c19d20d2a2ab80a755514a4d57af</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have de same problem. I think I found the solution.&lt;br/&gt;
1. declare all Stepnames and _Stepnames used in SFC as RETAIN variable less first Stepname&lt;br/&gt;
For example SFC with two steps:&lt;br/&gt;
VAR RETAIN&lt;br/&gt;
Step1:BOOL; Step2:BOOL; _Step2:BOOL;&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Dreioli hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Thanks Shhoter x)&lt;br/&gt;
I already thought to do this way, but it's a crapy solution for my big SFC... x(&lt;br/&gt;
The solution to make a FB of your SFC and declare the instance in VAR RETAIN works perfectly, but i think its not the better solution, its make so many modification on my programm.&lt;br/&gt;
 "1. declare all Stepnames used in SFC as RETAIN variable " is the best solution was make no modification in the programm.&lt;br/&gt;
So i find "SFCStepType" for the type of the variable but now the question is where to declare it ??&lt;br/&gt;
In local var: VAR OUTPUT RETAIN/VAR INPUT RETAIN/VAR RETAIN&lt;br/&gt;
      Ex: nameStep:SFCStepType;&lt;br/&gt;
      you got an error 4353 "name of step double :&amp;lt;namestep&amp;gt;"&lt;br/&gt;
In global var: VAR GLOBAL RETAIN&lt;br/&gt;
       Ex: nameStep:SFCStepType;&lt;br/&gt;
       its seems the name of the step you've declared isnt linked with the step in your SFC, nothin happen&lt;br/&gt;
Is there a solution in this way ? x)&lt;br/&gt;
(Sorry for my rude english...)&lt;br/&gt;
Regards&amp;lt;/namestep&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;&lt;/div&gt;</summary></entry><entry><title>the action of the SFC after the poweroff</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/8b0b0d9f62/?limit=25#ec48" rel="alternate"/><published>2020-02-27T22:25:22.252000Z</published><updated>2020-02-27T22:25:22.252000Z</updated><author><name>Easytherm</name><uri>https://forge.codesys.com/u/easytherm/</uri></author><id>https://forge.codesys.com02db82904145a09c4535e4d04a32c639dcfa2260</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;"There are two possibities to get a SFC retain.... &lt;br/&gt;
1. declare all Stepnames used in SFC as RETAIN variable &lt;br/&gt;
2. define your POU istead of a PROGRAM as FUNCTION BLOCK and declare the FUNCTION BLOCK as RETAIN&lt;br/&gt;
.....&lt;br/&gt;
"&lt;/p&gt;
&lt;p&gt;my tests:&lt;br/&gt;
2: works perfectly&lt;br/&gt;
1: I can't find where is the right place to define the stepname variables as RETAIN.&lt;br/&gt;
as Dreioli tells, declaring the stepname as a retain variable just results in an "error 4353 :name of step double :&amp;lt;namestep&amp;gt;", which is quite obvious, because the stepnames have been allready written (=declared)  in the SFC steps. &amp;lt;/namestep&amp;gt;&lt;/p&gt;
&lt;p&gt;The question is: where can I find the formal declaration of theses variables (with their variable type), in order to put there the RETAIN qualifyer. It seems these declarations are "implicit"&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>the action of the SFC after the poweroff</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/8b0b0d9f62/?limit=25#92fe" rel="alternate"/><published>2020-02-27T22:25:17.909000Z</published><updated>2020-02-27T22:25:17.909000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.come3bffea1ade1fb8296078896b19e4652d3d9db5b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;the answer is in the error:&lt;br/&gt;
you did declare the steps in the sfc so when you put it again in global it says double.&lt;br/&gt;
you can take one away, or look for all vars and put retain behind it.&lt;br/&gt;
this will slow down the program btw.&lt;br/&gt;
i do have theory on the state of machine.&lt;br/&gt;
there are two main streams on this subject. depending on type.&lt;br/&gt;
i would do it with states like press is closed, press moves up etc.&lt;br/&gt;
after restart i would ask operator the state the machine is in to confirm, as lots can have changed.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>the action of the SFC after the poweroff</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/8b0b0d9f62/?limit=25#2f66" rel="alternate"/><published>2020-02-27T22:25:16.351000Z</published><updated>2020-02-27T22:25:16.351000Z</updated><author><name>Dreioli</name><uri>https://forge.codesys.com/u/dreioli/</uri></author><id>https://forge.codesys.com0e77a94bd13d30f4a72f7c5eb16a15e3f60a5aea</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;shooter hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Put a restartvariable in each step you have and update it every step. when a restart happens check this restartvar where to jump to.&lt;br/&gt;
however when power down there should be a special procedure dealing with it, asking what state the machine is in.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks Shhoter x)&lt;br/&gt;
I already thought to do this way, but it's a crapy solution for my big SFC... x(&lt;/p&gt;
&lt;p&gt;The solution to make a FB of your SFC and declare the instance in VAR RETAIN works perfectly, but i think its not the better solution, its make so many modification on my programm.&lt;/p&gt;
&lt;p&gt;"1. declare all Stepnames used in SFC as RETAIN variable " is the best solution was make no modification in the programm.&lt;br/&gt;
So i find "SFCStepType" for the type of the variable but now the question is where to declare it ??&lt;/p&gt;
&lt;p&gt;In local var: VAR OUTPUT RETAIN/VAR INPUT RETAIN/VAR RETAIN&lt;br/&gt;
      Ex: nameStep:SFCStepType;&lt;br/&gt;
      you got an error 4353 "name of step double :&amp;lt;namestep&amp;gt;"&amp;lt;/namestep&amp;gt;&lt;/p&gt;
&lt;p&gt;In global var: VAR GLOBAL RETAIN&lt;br/&gt;
       Ex: nameStep:SFCStepType;&lt;br/&gt;
       its seems the name of the step you've declared isnt linked with the step in your SFC, nothin happen&lt;/p&gt;
&lt;p&gt;Is there a solution in this way ? x)&lt;/p&gt;
&lt;p&gt;(Sorry for my rude english...)&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>the action of the SFC after the poweroff</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/8b0b0d9f62/?limit=25#0a60" rel="alternate"/><published>2020-02-27T22:25:11.808000Z</published><updated>2020-02-27T22:25:11.808000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com5a186169f4118f1316f204bed9c5ec0be5e8d7a2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Put a restartvariable in each step you have and update it every step. when a restart happens check this restartvar where to jump to.&lt;br/&gt;
however when power down there should be a special procedure dealing with it, asking what state the machine is in.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>the action of the SFC after the poweroff</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/8b0b0d9f62/?limit=25#6572" rel="alternate"/><published>2020-02-27T22:25:10.256000Z</published><updated>2020-02-27T22:25:10.256000Z</updated><author><name>Dreioli</name><uri>https://forge.codesys.com/u/dreioli/</uri></author><id>https://forge.codesys.comc103d22c63ba6a017490f9bf5566cf5fe510a23f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;"1. declare all Stepnames used in SFC as RETAIN variable "&lt;/p&gt;
&lt;p&gt;I want to believe in this solution ! ^^&lt;br/&gt;
But wich type do you declare the stepname ? (BOOL,STRING, ??)&lt;/p&gt;
&lt;p&gt;Thank's  &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>the action of the SFC after the poweroff</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/8b0b0d9f62/?limit=25#bc28" rel="alternate"/><published>2020-02-27T22:25:05.923000Z</published><updated>2020-02-27T22:25:05.923000Z</updated><author><name>Ralph Holz</name><uri>https://forge.codesys.com/u/ralph-holz/</uri></author><id>https://forge.codesys.com192fcc6df1fd4e67b337867eeae1c461bbb432a6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;3S does not a provide such a Tool.&lt;/p&gt;
&lt;p&gt;There are two possibities to get a SFC retain.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;declare all Stepnames used in SFC as RETAIN variable&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;define your POU istead of a PROGRAM as FUNCTION BLOCK and declare the FUNCTION BLOCK as RETAIN&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;</summary></entry><entry><title>the action of the SFC after the poweroff</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/8b0b0d9f62/?limit=25#a085" rel="alternate"/><published>2020-02-27T22:25:04.361000Z</published><updated>2020-02-27T22:25:04.361000Z</updated><author><name>SeanWong</name><uri>https://forge.codesys.com/u/seanwong/</uri></author><id>https://forge.codesys.com8c088ee24411d1ba7d26153897e76abb3941ff05</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I often use the SFC to deal with the complex state machine. But I met a problem: how can I make the present step go to the specified step that I want if the power is suddenly off? I once used the PLC environment of the SELECTRON GmbH, they provided a vendor-specified component called "SFC assistant" to deal with this problem. Does the 3S have this special component?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>