9:39 pm
April 8, 2020
I am using an Arduino Nano.
The basic function of my program is to monitor a battery and close a relay as long as it is above a certain voltage. After the voltage of the battery drops too low, the relay opens and the Arduino's onboard LED double-flashes every second.
I originally tried using a Flat Sequence Structure but the LED doesn't flash, it remains on. I posted the code titled "Blink LED Not Working".
I found a fix by removing the Flat Sequence Structure and using the Error line to determine sequence. That code is also posted and titled "Blink LED Working".
I don't know where the bug is exactly but removing the flat sequence structure fixed it. I also removed the For Loop and replaced it with code similar to the Example "Digitial Output - Blink LED" which also worked meaning there is some issue between For Loops and Flat Sequence Structures. Any idea on why this happens and if it is something that can be fixed?
7:20 am
March 12, 2015
There is a known issue with deeply nested structures. Refer to this post:
https://www.geverywhere.com/fo.....ested-VIs/
It is an issue that can be avoided by not using flat sequence structures as you found. It is best practice to use the error wires and subVIs for program flow.
29
1 Guest(s)