LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I input a square wave using daqcard-dio-24?

I need to measure a square wave using the
DAQ-DIO-24 card. How can I do this using
LabView?

Thanks...
0 Kudos
Message 1 of 6
(3,131 Views)
You can use DAQ Vi's in the function palette under the NI Measurements category. In that, use AI Config for configuring the channel and AI Acquire Waveform.vi for acquiring the samples.

Bharathi.
0 Kudos
Message 2 of 6
(3,120 Views)
Hi Van,

I want to "correct" the answer of Bharathi! The board you have is a static DIO board, that means that you cannot use any Analog Input VI (for example AI config, AI Acquire waveform and so on). What you need are the VI's from the Digital I/O subpalette if you're using Traditional NI-DAQ or the polyphormic Read/Write VI's if you use NI-DAQmx. There are several examples in LV which shows how to use this board.
AS I mentioned before this is a static DIO board. That means that you can write/read to/from a line or port only through a SW call. There is no way to control the input or output rate in HW.
You wrote that you want to read a square wave (TTL?), but what kind of information do you want to extract from this square wave? Amplitude, Frequeny, Period, Duty Cycle, ...?
The best way to measure this kind of information is to use a counter. This means that you need an E or M Series board or directly a Counter board (660x). An option could be to use a board with analog inputs, so you could measure the voltage and extract the information in SW.
How fast is the frequency? That's an important factor. Anyway, the DIO-24 board is not made for this kind of applications.

Hope this helps.
Regards,
Luca
0 Kudos
Message 3 of 6
(3,112 Views)
Thank you All.

Luca,

I need to see the amplitude of the square wave.
I want to use this card essentially as an
oscilloscope. I tried to find an example for
this card but was not successful. The only thing
I could do is to use the DIG Line and DIG Port.
This only tells me which line I'm using. Not the
entire square wave.

The frequency of the signal is 70 KHz. Eventually
I also need to write a square wave out too using
this DIO-24 card.

Thanks,
Van
0 Kudos
Message 4 of 6
(3,098 Views)
As Luca said, this is a static digital I/O board. You cannot measure amplitude or frequency. The input signal is either above the logic threshold or below it. That's the nature of digital I/O. You will alos have problems creating a square wave with any degree of precision because the output timing of a digital line is strictly software dependent and the best you can hope for with windows is 1msec timing. You need a DAQ board with analog inputs and outputs to do both things you want.
0 Kudos
Message 5 of 6
(3,093 Views)
Thank you Dennis.
I will look into the analog board option.

Van
0 Kudos
Message 6 of 6
(3,090 Views)