LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sending sequental "true-false" command by using digital write VI to arduino

Hi everyone,

 

I want to send sequental "true-false" command by using digital write VI to arduino. I put LEDs on the front panel, I used local variable, the program seems to work properly, but cannot take any output voltage from digital output pins of the arduino. I attach the code, when you run, the lamps  are fired as coded but digital write inputs ("output value" of digital write VI ) dont change when you control via a probe.digital write problem.jpg

0 Kudos
Message 1 of 2
(3,214 Views)

Hi Cetin,

 

I used local variable

That's the problem! 😄

You did not THINK DATAFLOW!

 

Don't use local variables for this task, use something like a statemachine instead.

 

Even a simple FOR loop and autoindexing an input array with aour LED states would be fine! Replace your while loop by a FOR loop executing twice. Remove the sequence. Have an array constant with your LED values, autoindex this array.

Like this:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(3,209 Views)