<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Bool turning on in case stament in wrong state?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/573196d427/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/573196d427/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/573196d427/</id><updated>2023-12-16T05:56:46.281000Z</updated><subtitle>Recent posts to Bool turning on in case stament in wrong state?</subtitle><entry><title>Bool turning on in case stament in wrong state?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/573196d427/?limit=25#1b34/ebf4" rel="alternate"/><published>2023-12-16T05:56:46.281000Z</published><updated>2023-12-16T05:56:46.281000Z</updated><author><name>nz-dave</name><uri>https://forge.codesys.com/u/nz-dave/</uri></author><id>https://forge.codesys.com446b97a8696c3d34f858f46518649e7a7ca649ae</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I had the FB called via a for loop to call a few instances of my FB &lt;/p&gt;
&lt;p&gt;I have removed it the for loop and just called them 1 by 1. Seems to have sorted the problem.&lt;/p&gt;
&lt;p&gt;tho, i have other FB's and for loops doing the same thing but they are all fine.&lt;/p&gt;
&lt;p&gt;below is basically what was happening.&lt;/p&gt;
&lt;p&gt;var:&lt;br/&gt;
mVibrator : ARRAY&lt;span&gt;[1..GVL_Settings.Number_Of_Products]&lt;/span&gt; OF Main_Vibrator;&lt;br/&gt;
end_var&lt;/p&gt;
&lt;p&gt;Controller(PRG) call:&lt;/p&gt;
&lt;p&gt;FOR v := 1 TO GVL_Settings.Number_Of_Products BY 1 DO;&lt;br/&gt;
mVibrator&lt;span&gt;[v]&lt;/span&gt; ();&lt;br/&gt;
END_FOR&lt;/p&gt;
&lt;p&gt;So at state 30: the mVibrator&lt;a class="alink" href="/forge/talk-ru/1/"&gt;[1]&lt;/a&gt;.start was turning on &lt;/p&gt;
&lt;p&gt;30:&lt;br/&gt;
    Main_Mixer.Start := TRUE;&lt;br/&gt;
    Process_State := 2;&lt;br/&gt;
    IF Main_mixer.Done THEN&lt;br/&gt;
    Main_Mixer.Start := FALSE;&lt;br/&gt;
    Control_State := 40;&lt;br/&gt;
    END_IF&lt;/p&gt;
&lt;p&gt;but its not till state 50: that it is actual in the code.&lt;/p&gt;
&lt;p&gt;50:&lt;br/&gt;
    Main_Suction_valve.Open_Input := TRUE;&lt;br/&gt;
    mVibrator&lt;a class="alink" href="/forge/talk-ru/1/"&gt;[1]&lt;/a&gt;.Start := TRUE;&lt;br/&gt;
    Process_State := 4;&lt;br/&gt;
    IF GVL_Weigh_hopper.LoadCell_Weight = 0 THEN&lt;br/&gt;
    Main_Suction_valve.Open_Input := FALSE;&lt;br/&gt;
    mVibrator1.Start := FALSE;&lt;br/&gt;
    Control_State := 60;&lt;br/&gt;
    END_IF&lt;/p&gt;
&lt;p&gt;Thanks for your input.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Bool turning on in case stament in wrong state?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/573196d427/?limit=25#1b34" rel="alternate"/><published>2023-12-16T05:18:10.416000Z</published><updated>2023-12-16T05:18:10.416000Z</updated><author><name>lostcontrol</name><uri>https://forge.codesys.com/u/lostcontrol/</uri></author><id>https://forge.codesys.com3a6043552bc567dac426d604f88509cd10e528cf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;i would be looking at what the case variable is doing then..&lt;br/&gt;
sounds like there might be a logic race going on &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Bool turning on in case stament in wrong state?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/573196d427/?limit=25#c01c/a42e" rel="alternate"/><published>2023-12-16T02:41:52.594000Z</published><updated>2023-12-16T02:41:52.594000Z</updated><author><name>nz-dave</name><uri>https://forge.codesys.com/u/nz-dave/</uri></author><id>https://forge.codesys.com7c73bef8b8f2980aadf9c60e0d3c0c10bc6cf0b9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;pretty sure its not. ive done a cross reference and only have one write that sets it to true.&lt;/p&gt;
&lt;p&gt;Only way i can stop it is to remove the function block call from the main pou that is running said case.&lt;/p&gt;
&lt;p&gt;its got me stumped:/ &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Bool turning on in case stament in wrong state?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/573196d427/?limit=25#c01c" rel="alternate"/><published>2023-12-16T02:05:22.782000Z</published><updated>2023-12-16T02:05:22.782000Z</updated><author><name>lostcontrol</name><uri>https://forge.codesys.com/u/lostcontrol/</uri></author><id>https://forge.codesys.com6ad6e8fd8ebaeec5c7969c2a907588a670048c01</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;are you sure it is not used anywhere else.?&lt;br/&gt;
does it have an address that could be duplicated perhaps?&lt;br/&gt;
nothing external writing to it?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Bool turning on in case stament in wrong state?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/573196d427/?limit=25#65cf" rel="alternate"/><published>2023-12-15T08:43:43.771000Z</published><updated>2023-12-15T08:43:43.771000Z</updated><author><name>nz-dave</name><uri>https://forge.codesys.com/u/nz-dave/</uri></author><id>https://forge.codesys.comdd5011020fd3858a2962ab263cf33d8744148d0b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have a case statement running a process.&lt;/p&gt;
&lt;p&gt;during one of the steps it has started calling a bool var that is 2 steps further on in the case?&lt;/p&gt;
&lt;p&gt;i have even tried //commenting it out but it still turns on at the same point in the case.&lt;/p&gt;
&lt;p&gt;i have also run a trace but cant see anything that would trigger it.&lt;/p&gt;
&lt;p&gt;Any Ideas?&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>