LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital I/O Modules with Compact DAQ

Hi everyone

 

I have managed to get my hands on some Digital I/O modules for a Compact DAQ and wanted to get started with them. I don't know too much about digital in LabVIEW and NI hardware.

 

Is there any comprensive guides and tutorials? I had a look on google but couldn't find anything.

 

I am looking to send out pulsewidth modulation signals and also digital control signals (e.g. sends out a high voltage when a boolean is on and a low voltage when boolean is switched off in LabVIEW). I am also looking to read in some basic digital circuits e.,g. a push button switch. Should be fairly straight forwards I guess?

 

With the digital I/O modules, do I have control on what the high and low voltage levels are so I can interface them with various different hardware?

0 Kudos
Message 1 of 16
(4,387 Views)

Hi David,

 

for each of those modules you will find manuals on NI's website. Those manuals explains wiring options for each module, voltage levels, and so on. Did you read them?

 

As you use such modules in a CompactDAQ you would use DAQmx for I/O tasks. Read the DAQmx tutorials and examine example VIs coming with your LabVIEW installation…

Best regards,
GerdW


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

I have looked through the manual but it only covered some basics:

 

https://www.ni.com/docs/en-US/bundle/ni-9472-getting-started/page/overview.html

 

I was unclear on some of the things, such as do I HAVE to connect an external power supply to the module.

 

But I was hoping for a tutorial that took me through a sample project.

 

I think it will take a lot of effort to learn how to use DAQmx and I intend to take the signal conditioning course soon, but until then I am more comfortable using the express VI (DAQ Assistant). It doesn't give you any option for what voltage level you would like your digital output to be at though, and the NI website simply states it has a range of 5V - 30V:

 

https://www.ni.com/en-us/shop/model/ni-9474.html

 

I am also unclear how I can send different signals to different digital outputs on the express VI as it just has one output on the block.

 

I have also tried to use the square wave VI with the DAQ assistant and getting a terminals of different types error.

0 Kudos
Message 3 of 16
(4,365 Views)
The DAQmx examples should provide all the help you need for such a simple digital I/O device. You can define the input as an array of Booleans (i.e. TFTF) or a numeric (i.e. 0xA) to set multiple lines at once. Your signal conditioning class had little to do with digital I/O.

You don't define the logic level. That is set by the external supply. If you don't connect an external supply, you won't have any output.
Message 4 of 16
(4,352 Views)

Ok I have just connected the extern power supply as I think that was where my error was (I assumed the module card could provide its own voltage and current for low current applications).

 

But I am still not seeing any change in the output when I vary the boolean value. I have set the current limit on the power supply to 30mA, is that too low? The device I am communicating with only requires a 30mA digital signal.

0 Kudos
Message 5 of 16
(4,335 Views)

what is ctr0, 1, 2, and 3?

 

I have used the inbuilt PWM counter on the digital output module but the module only has d0-d7 plus common ground and voltage supply. Yet the pulsewidth modulation is supposed to be output to channels ctrl0-3?

 

Also, I am still struggling to get any output from the module even with a power supply attached. The LED comes on on the module but I dont get anything output from the pin. I used 5v and 30mA current limiting but the actual current reading is 0 for some reason.

0 Kudos
Message 6 of 16
(4,313 Views)
What are you doing to change the output? The MAX test panel, some example, your own code? Attach a snippet if its your own code though you should always use MAX first. Doors the supply indicate a current limit state?
Message 7 of 16
(4,312 Views)

Sorry we posted at the same time. Yes I am using the inbuilt test that comes with the DAQmx express VI and it turns the LED on, on the module.

 

The current limit is set to 30mA but the actual current draw is 0.

 

UPDATE: I switched to MAX test panel to make is simpler to debug. Still getting the same issue, LEDs match the states set in MAX but not getting an output from the channel outputs.

0 Kudos
Message 8 of 16
(4,307 Views)

Nothing much to see but here it is anyway/ LEDs on the module reflect the pattern on in section 3 below, but none of the high state outputs are letting the power supply voltage and current through.

 

MAX Digital Output Test Panel.png

0 Kudos
Message 9 of 16
(4,304 Views)
Are you sure you have connected the external supply correctly?
0 Kudos
Message 10 of 16
(4,301 Views)