Calculation Function?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
JDR04
Posts: 271
Joined: Tue Mar 05, 2013 10:49 pm
Has thanked: 111 times
Been thanked: 13 times
Contact:

Calculation Function?

Post by JDR04 »

Hi folks, I'm hoping somebody could explain to me what the (CALCULATION BOX) function actually does in the small program I have attached

Thanks a lot for your help...............John
Attachments
DarkDetector 12F683 V1.2.fcf
(13 KiB) Downloaded 449 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Calculation Function?

Post by medelec35 »

Hi John,

Code: Select all

lightlevel = 0
only sets the variable lightlevel to 0
This is not necessary in the flowchart you have posted.
Reason being ADC component is setting the variable before it's read by decision branch.

If it was the other way round e.g a decision branch before ADC then you must have the lightlevel variable preassigned first,
since variables on hardware start off assigned with a random number.


Martin
Martin

JDR04
Posts: 271
Joined: Tue Mar 05, 2013 10:49 pm
Has thanked: 111 times
Been thanked: 13 times
Contact:

Re: Calculation Function?

Post by JDR04 »

Thanks Martin, hope all is well with you.

Take care........John

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Calculation Function?

Post by medelec35 »

Hi John,
Recovering nicely after being ill
Thanks for asking.

Hope you are well too?

Martin
Martin

Post Reply