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
Calculation Function?
Moderator: Benj
-
- 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?
Hi John,
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
Code: Select all
lightlevel = 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
-
- 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?
Hi John,
Recovering nicely after being ill
Thanks for asking.
Hope you are well too?
Martin
Recovering nicely after being ill
Thanks for asking.
Hope you are well too?
Martin
Martin