LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Digital Input for Boolean Control?

Solved!
Go to solution

Hi there! 

 

I've spent a lot of time looking but have not found a solution to this...

 

I have LV 2015 with NI 9188 chassis and NI 9425 DI module.  Trying to use input signal to affect a state machine program and/or event structure in real-time.  It would be acceptable to have an indicator show the status of the input line, since I can use that elsewhere with Value(Signaling).

 

Please don't ask for code -- the problem is fairly straightforward.  I just want to use the digital inputs for program control in the form of T/F.  I just want the program to scan the status of the input and make decisions -- much like a PLC would do.

 

All I seem to be able to extract is digital waveform data with a DAQmx task.

 

This is not a trigger -- I'm already using a trigger to start the analog aquisition.

 

To phrase the problem a simpler way...  What if you had a digital input module and you wanted to see the status of each input line in the form on an LED on your front panel in real time.  How would you do it?

 

I really appreciate the help!!!

0 Kudos
Message 1 of 4
(3,009 Views)
Solution
Accepted by topic author greyhorn23

greyhorn23 wrote:

To phrase the problem a simpler way...  What if you had a digital input module and you wanted to see the status of each input line in the form on an LED on your front panel in real time.  How would you do it?


I would write what was read to the terminal.

 

From what I can tell, you just want to read a single static value from your digital line.  So just read the one value and do whatever logic you need to with it.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,997 Views)

I'm missing the point of where you're getting stuck here...

 

Just create a digital input task and do a single read - you can choose to return the data as either an array of booleans which you can create an indicator for to give you your status LEDs or in 'port' format as a numerical representation of the state of the digital lines.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 3 of 4
(2,988 Views)

This works.  I'm not sure why I found it so difficult.  Just reading a single-line-single-point inside a loop.  I appreciate the help!!!

0 Kudos
Message 4 of 4
(2,966 Views)