LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LED command timed loop counter

hi!

I made this program who does the following sequence:

1. a switch for on and off

2. it will turn on the my LED then turn off after X seconds.
 

This is attached to my digital output so i can that my attached voltmeter reads voltage


It worked fine but i noticed it only does two iterations so i do not know where i made mistake

 

Help!

Download All
0 Kudos
Message 1 of 6
(2,801 Views)

Hi camr,

 

any error messages?

How did you configure your switch? Does it use switching or latching mechanical behaviour?

 

What's the point of ORing with FALSE? 😉

Best regards,
GerdW


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

No error message.

 

mechanical switch: latched when released

 

What's the point of ORing with FALSE? - my bad, i belatedly saw that redundance.

 

 

0 Kudos
Message 3 of 6
(2,777 Views)

Hi camr,

 

so your switch is reset to FALSE as soon as it gets read. And you wonder why your loop doens't count seconds anymore?

 

Did you try to debug your VI using basic debugging tools like highlighting? What are the inputs to the AND function in each iteration?

Best regards,
GerdW


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

 


@GerdW wrote:

Hi camr,

 

so your switch is reset to FALSE as soon as it gets read. And you wonder why your loop doens't count seconds anymore?

 

Did you try to debug your VI using basic debugging tools like highlighting? What are the inputs to the AND function in each iteration?


it does count.

it works well

but the iterations only goes twice.

 

0 Kudos
Message 5 of 6
(2,771 Views)

Hi camr,

 

then check your STOP condition. When the loop only iterates twice it seems to be stopped unexpectedly. (That's why I asked for error messages…)

Best regards,
GerdW


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