<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Help with running simultaneously with SFC</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/19f4b8de2e/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/19f4b8de2e/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/19f4b8de2e/</id><updated>2020-02-27T19:52:44.951000Z</updated><subtitle>Recent posts to Help with running simultaneously with SFC</subtitle><entry><title>Help with running simultaneously with SFC</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/19f4b8de2e/?limit=25#4a47" rel="alternate"/><published>2020-02-27T19:52:44.951000Z</published><updated>2020-02-27T19:52:44.951000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com9cf6e01fd6f961e72f11d77c14598b5a5c8e90d0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;i made you an example of a function block call in a ladder.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=1005" rel="nofollow"&gt;JonKang TrainTrack.pro &lt;span&gt;&lt;span&gt;[101.82 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Help with running simultaneously with SFC</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/19f4b8de2e/?limit=25#ea79" rel="alternate"/><published>2020-02-27T19:52:41.261000Z</published><updated>2020-02-27T19:52:41.261000Z</updated><author><name>dellsuperman</name><uri>https://forge.codesys.com/u/dellsuperman/</uri></author><id>https://forge.codesys.com6f1def2bc878b43cbe9d2b3d5391db183679b40f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Shooter,&lt;br/&gt;
Thank you for the advise.&lt;br/&gt;
I have created all the function blocks for my individual tracks &amp;amp; I have imported all the codes from my previous program.&lt;/p&gt;
&lt;p&gt;However, I do not know how to call the function blocks from the main program.&lt;br/&gt;
The error that I get when I compile the program:&lt;br/&gt;
"Error 4301:PLC_PRG (22):POU'AE_ROUTE_Prog' needs exactly 0 input"&lt;/p&gt;
&lt;p&gt;It is like the coil or FB that I place at the end of the rung is not supposed to be there.&lt;/p&gt;
&lt;p&gt;Jon Kang&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Bild" rel="nofollow" src="https://lh4.googleusercontent.com/-RzakwF9-2dc/VQz9DUveHvI/AAAAAAAAAY8/Hjc9x-Eor74/w800-h397-no/Test.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=1003" rel="nofollow"&gt;JonKang TrainTrack.pro &lt;span&gt;&lt;span&gt;[196.35 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Help with running simultaneously with SFC</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/19f4b8de2e/?limit=25#c521" rel="alternate"/><published>2020-02-27T19:52:39.982000Z</published><updated>2020-02-27T19:52:39.982000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com2c7a20df6015355cdea90843c99d592e85181e15</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Making a user function block is easy&lt;br/&gt;
go to POU &lt;br/&gt;
right click and add a POU.&lt;br/&gt;
select it to be a function block, select a language&lt;br/&gt;
type in a name&lt;br/&gt;
now the editor opens a new window&lt;br/&gt;
Here you can make your program.&lt;br/&gt;
if you make a new variable it will ask if it is a input /output etc.&lt;br/&gt;
After finished programming&lt;br/&gt;
go to the program where you would like to call the block.&lt;br/&gt;
insert a FB&lt;br/&gt;
you will need to give it a name&lt;br/&gt;
in the declaration above you need to give this name a type.&lt;br/&gt;
r_trig is a function (almost same as a function block.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Help with running simultaneously with SFC</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/19f4b8de2e/?limit=25#0248" rel="alternate"/><published>2020-02-27T19:52:38.688000Z</published><updated>2020-02-27T19:52:38.688000Z</updated><author><name>dellsuperman</name><uri>https://forge.codesys.com/u/dellsuperman/</uri></author><id>https://forge.codesys.com82bbdfe9b5a832c827e20f6f4740d15a8f101a50</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I changed my program significantly by removing SFC totally.&lt;br/&gt;
The problem I am facing now is inserting Function blocks.&lt;/p&gt;
&lt;p&gt;This is roughly what I have done so far.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start program&lt;br/&gt;
    -- Reset all routes &lt;/li&gt;
&lt;li&gt;Select route from interface&lt;br/&gt;
    -- I have managed to allow 2 sets of route to be chosen after not using SFC.&lt;/li&gt;
&lt;li&gt;Check route(s)&lt;br/&gt;
    -- If all route clear, proceed to Function Block of individual train tracks&lt;br/&gt;
    -- If not clear, wait for all tracks to clear before proceeding.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I plan to use function blocks to help reduce the length of the program to make it easier to trouble shoot.&lt;br/&gt;
However, I am not sure how does the function block works &amp;amp; how to place them.&lt;br/&gt;
I have attached my program for your reference.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=999" rel="nofollow"&gt;JonKang TrainTrack.pro &lt;span&gt;&lt;span&gt;[183.13 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Help with running simultaneously with SFC</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/19f4b8de2e/?limit=25#4c79" rel="alternate"/><published>2020-02-27T19:52:35.064000Z</published><updated>2020-02-27T19:52:35.064000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.coma8da8c285f4f84655c96a666d2f40bb52238818d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Oke so i made one line a bit added&lt;br/&gt;
check also the action as i used limitalarm (from util.lib)&lt;br/&gt;
This way only one block is on.&lt;br/&gt;
as there are still no comments, i can not check your program.&lt;br/&gt;
However i see it running when all BOOLs are correct.&lt;/p&gt;
&lt;p&gt;Keep it in this direction, as you can see on simulation it does work.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=953" rel="nofollow"&gt;SFC CS150211.pro &lt;span&gt;&lt;span&gt;[82.92 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Help with running simultaneously with SFC</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/19f4b8de2e/?limit=25#0d48" rel="alternate"/><published>2020-02-27T19:52:33.794000Z</published><updated>2020-02-27T19:52:33.794000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.coma622b97f401d1a59eb2331cc01bebe8abae65f58</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;tell the supervisor please :&lt;br/&gt;
a parallel branch is used to have actions running parallel, and all actions needs to be ended, before the next step is executed.&lt;br/&gt;
However you only have one branch running at a time, the rest should not be active at same moment.&lt;/p&gt;
&lt;p&gt;so you need parallel transition to make a decision what branch should be active.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Help with running simultaneously with SFC</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/19f4b8de2e/?limit=25#81bb" rel="alternate"/><published>2020-02-27T19:52:30.183000Z</published><updated>2020-02-27T19:52:30.183000Z</updated><author><name>dellsuperman</name><uri>https://forge.codesys.com/u/dellsuperman/</uri></author><id>https://forge.codesys.coma9f9d9652e8fda9cff94aefb758c4461a6f7677a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;I have been advised by my supervisor to use the parallel branches but so far everything doesn't seem to be working out for me.&lt;/p&gt;
&lt;p&gt;This is the program that I came up before I switch them to all parallel branch.&lt;br/&gt;
For this attached program, I can select the start point (1st row) &amp;amp; the end point (2nd row).&lt;br/&gt;
For example after pressing start (A) &amp;amp; end (C), I will need to press on the Point Machine 1 &amp;amp; 3's right button, before the train (brown) will move.&lt;/p&gt;
&lt;p&gt;For now, I have used colored coding for the track status but there isn't any track checking at the moment.&lt;br/&gt;
Green: Good to go&lt;br/&gt;
White: Track is planned to be used&lt;br/&gt;
Red: Track in use&lt;/p&gt;
&lt;p&gt;And after the train reaches it's destination, I will have to reset the whole program in order to run again, if not the 1st train will keep moving in same direction.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=952" rel="nofollow"&gt;SFC   Parallel Setup   Orig.pro &lt;span&gt;&lt;span&gt;[153.56 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Help with running simultaneously with SFC</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/19f4b8de2e/?limit=25#c024" rel="alternate"/><published>2020-02-27T19:52:28.909000Z</published><updated>2020-02-27T19:52:28.909000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com9af72d68a618acbc6e59bdd81548792f9679f842</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;So what are you making now?&lt;br/&gt;
send an zipped export of your program, and i can advice you if you will be able to make it working.&lt;br/&gt;
within the actions you can also use ST or LD or any other language.&lt;/p&gt;
&lt;p&gt;do not use the double line as it means all branches are waiting until they are all done.&lt;br/&gt;
make a new SFC with&lt;br/&gt;
start button transition&lt;br/&gt;
input a character (A..E)&lt;br/&gt;
transition is character &amp;lt;&amp;gt;""&lt;br/&gt;
blink possible end characters&lt;br/&gt;
input another character&lt;br/&gt;
if possible blink the go&lt;br/&gt;
empty action&lt;br/&gt;
transitions are all combinations as you did.&lt;br/&gt;
the actions are dependant of the route so set switches&lt;br/&gt;
if switches are set you can go back to start.&lt;/p&gt;
&lt;p&gt;In ST you can use functionblocks to get rid of long programs.&lt;br/&gt;
how is progress?&lt;/p&gt;
&lt;p&gt;depending on level use occupied color when a train is passing.&lt;br/&gt;
make a logarray with times and wayplan (in real this is automatic done, so at 12:34 a way is set auto, then at at 12:40 another train will arrive and needs another setting.&lt;br/&gt;
this is a separate program and can be nice as demorun. you only need a few ways .&lt;br/&gt;
but you could say a passengertrain from B to D&lt;br/&gt;
a cargo from A to E&lt;br/&gt;
a passenger from C to A&lt;br/&gt;
a loc from B to D and back to A and up to E&lt;/p&gt;
&lt;p&gt;you can use a polygon instead of these rectangles. (these you can turn)&lt;br/&gt;
make each railpart a separate visualisation and use placeholdernames.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Help with running simultaneously with SFC</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/19f4b8de2e/?limit=25#9058" rel="alternate"/><published>2020-02-27T19:52:25.332000Z</published><updated>2020-02-27T19:52:25.332000Z</updated><author><name>dellsuperman</name><uri>https://forge.codesys.com/u/dellsuperman/</uri></author><id>https://forge.codesys.com92d7c931fb000df37c512fc2c3271c6a64fa5caf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;You mentioned that I should just use simple LD or ST, rather than SFC with parallel branch.&lt;br/&gt;
1 of the concern that made me use SFC was that the program will get too long &amp;amp; difficult to troubleshoot, hence my supervisor advised me to try SFC.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Jonthan Kang&lt;br/&gt;
(Dellsuperman)&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>Help with running simultaneously with SFC</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/19f4b8de2e/?limit=25#3759" rel="alternate"/><published>2020-02-27T19:52:24.053000Z</published><updated>2020-02-27T19:52:24.053000Z</updated><author><name>dellsuperman</name><uri>https://forge.codesys.com/u/dellsuperman/</uri></author><id>https://forge.codesys.comf716f12f442ea7d0e657372463270fae041200c5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Shooter, thank you for your reply.&lt;br/&gt;
I'll try those things that you mention &amp;amp; get back if i have any issues.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;KangJonathan&lt;br/&gt;
&lt;span&gt;[DellSuperman]&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry></feed>