LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read pulse into a state machine

I have downloaded a vending state machine that I am trying to use to acquire 150ms pulses from a NI-6501, where the pulses just act as buttons. I havewired the inputs from the front panel and the pulse through an OR gate. I have failed to figure out why this arrangement does not work. When I put an LEDon the front panel I can see it flicker when the pulse comes through. When I try to run it some strange source is producing counts. I also cannot figure outhow to wire the relay circuits which run ok when independently wired. Here is my attempt

0 Kudos
Message 1 of 2
(2,328 Views)

I think you may need to do a little more reading about LabVIEW's data flow concept.

In your lower while loop there are about 10 things that LabVIEW will attempt to execute in parallel.

Just because they are arranged from left to right doesn't mean that they will execute in the order you want them to.

For example the 4x 100ms time delays will all effectively execute at the same time.

 

May I suggest that you start by completing some of the free online training courses:

Free Online LabVIEW and Data Acquisition Training in English - Part 1  

Free Online LabVIEW and Data Acquisition Training in English - Part 2 

 

The training will likely address many if not all the issues with your vi.

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 2 of 2
(2,320 Views)