Page 1 of 1
BOOL!
Posted: Mon Jan 23, 2012 7:57 pm
by jgu1
Hi everybody!
Is there here anybody who can help me how to use BOOL, true or false in FC. Only a simple examble. I can´t find anything about this even not in the helpfile.
Best Regard
jorgen.
Re: BOOL!
Posted: Mon Jan 23, 2012 8:49 pm
by fotios
Hi Jorgen
A very simple Boolean function that is executed by FlowCode is the "Decision". You know that in a FC Decision is checked if a concrette variable fulfils a condition, for example "If switch = 1?" Here the variable under test is the "switch". That is also a Boolean expresion: "Switch is TRUE?" The ON (=1) condition corresponds to TRUE, while the OFF (=0) condition corresponds to FALSE. Accordingly, there are two branches after a FlowCode Decision, the one that is called "yes" corresponds to Boolean TRUE while the other that called "no" corresponds to Boolean FALSE.
Fotis
Re: BOOL!
Posted: Mon Jan 23, 2012 9:37 pm
by jgu1
Hi Fotio!
Thank you for your help.
I understand the function of BOOL. It's more how to handle it in FC I think when you create the variable and handle it in an if function. I would be very happy if you could make a small example.
Thanks in advance.
regard
Jorgen
Re: BOOL!
Posted: Tue Jan 24, 2012 12:34 pm
by Benj
Hello,
Using a bool in a decision should be straightforward.
If b1 is your boolean variable
To check if b1 is set you could enter the following into a decision icon
or
To check if b1 is clear you could do
or
Re: BOOL!
Posted: Tue Jan 24, 2012 1:20 pm
by jgu1
Hi Ben!
Thank´s for your help. I understand the meaning with BOOL, Maybe I am stupid, but I have some problems to handle it in FC. Please, would you be kind to change it in att. test FC.
Thank´s in advance.
Best regard
JGU
Re: BOOL!
Posted: Tue Jan 24, 2012 3:55 pm
by Benj
Hello,
Here you go,
Are you testing on hardware or in simulation?
Re: BOOL!
Posted: Tue Jan 24, 2012 7:18 pm
by jgu1
Hi Ben!
Thank you, now I am in business. It´s a new kind of variable for me. At the moment I test it in simulation, but later in "real wold". I know I have config the Pic before downloading.
Once again, thank you.
Best regard
Jorgen.