LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use an Digital input as an Boolean?

Dear all,

I want to set up a digital input signal as a Boolean function. How can I do that?

 

I also want to know how I can get Digital output lines which are all in DataAquisition box into different lines on my LabView screen? Is this possible with an array?

 

Cheers

0 Kudos
Message 1 of 4
(5,361 Views)

We need more information before we can give you the info you need.

 

  1. What type of boolean function do you want (digital waveform, array of booleans)?  A boolean on the front panel can be programmed to do many things on the block diagram.  You will probably want more than one.  For example, one boolean to set a value, another to signal the program that you want to add a value.
  2. Getting data from a data acquisition device into LabVIEW can be either trivial or difficult depending on what the manufacturer of your data acquisition device provides in the way of drivers.  If the device is a National Instruments device and supports digital input, it should be pretty easy.  Look at the documentation and examples that came with the device.  If it from another manufacturer, look for a LabVIEW driver for it from the manufacturer.  If neither exist, you will need to write a driver yourself.  This is usually straightforward, but tedious.  It can get difficult if the manufacturer does not publish good interface specifications.  Once you have the data into your program as a digital waveform, displaying it on a digital graph is as simple as dropping the graph on the front panel and wiring the digital waveform to it on the block diagram.

I would highly recommend you run through the LabVIEW tutorials on the main NI website.  There are several, depending upon how much time you have.

0 Kudos
Message 2 of 4
(5,353 Views)

Dear all,

to 1. I only want to transfer an on/off signal (digital in) from a machine into an 1/0 boolean that I can activate a boolean lamp with it.

 

to 2. I know how to get the data into the machine! I want to give data out of LabView to the machine, but I have 5 lines wired on a Digital output programmed in only one Data Aquisition Manager (DAQ). So I have only one symbol in the block diagram. How can I give different data to different lines in this symbol? I think it has something with arrays to do, or?

0 Kudos
Message 3 of 4
(5,332 Views)

To convert a 1/0 to a Boolean, all you have to do is wire it to a Not Equal to Zero? function.

 

Not sure what you mean by Data Acquisition Manager. There is a DAQmx Write and the DAQ Assistant. The DAQmx Write can be configured several ways for multiple channels. It could be a numeric (i.e. binary 11011/hex 33/decimal 27) or Boolean Array as well as a couple others. The DAQ Assistant would typically use a Boolean array for single sample/multiple channels. I hope the numeric format is self explanatory. The Boolean Array is also simple with the first element corresponding to the value for the first channel, the second element for the second channel, etc. You have not attached or VI or even an image of it so no one has any idea how you configured the digital write.

 

I'll repeat the suggestion for the LabVIEW tutorial as well as DAQmx Getting Started.

0 Kudos
Message 4 of 4
(5,324 Views)