FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

How do we control the same led (or other controls)from two separate while loops.

I'm trying to keep one led on for 20 minutes and the same one to start blinking for 5 minutes right after.
0 Kudos
Message 1 of 2
(3,003 Views)


If the two operations are to be performed in a sequence -- first turn on, and THEN blink, you can use a Sequence structure for this. Frame zero could turn on the LED for the required time, an dframe 1 can then blink it.

However, if they are not necessarliy to be performed in a sequence, you can write to the LED from two (or more) loops (or other parts of the code) by writing to the LED's local variable. To create local variables, right-click on the LEd and select local variables.

Hope this helps. Write back if I misunderstood your question.

Khalid

0 Kudos
Message 2 of 2
(3,003 Views)