Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Verifying output waveform without oscilloscope

Solved!
Go to solution

I am trying to generate a TTL signal to trigger some device. Currently I am using the following code to generate and output the square wave. However, I do not have an oscilloscope to observe the actual waveform and if I were to use a multimeter to measure the output, I can only see the last value. Is there any way to verify the output waveform is actually what I wanted?

Screenshot 2023-04-13 102900.png

0 Kudos
Message 1 of 11
(1,251 Views)

Not really, you need some sort of oscilloscope, you can connect the AO to a headset or speaker to hear the signal generated.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 11
(1,245 Views)

I do not have the components to construct circuit as well... However, does the attached code generate a voltage that goes from 0V to 2V and back to 0V?

0 Kudos
Message 3 of 11
(1,236 Views)

If you are using a DAQ with an Analog Input, you could use that to measure your signal.


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 4 of 11
(1,212 Views)

What DAQ device are you using?

 

It's usually better to use a digital output or a counter output when connecting to something that needs TTL.  But not all devices give yo good options there, so sometimes you might be stuck hoping for the best with AO.

 

That said, you seem to be trying to generate a square wave signal that transitions between 0 and 2 volts.  IIRC, 2 volts is still in no-man's land for TTL.  Just going from very old memory, but what I recall is that 0-0.8 V is guaranteed low, 2.4-5.0 volts is guaranteed high, anything between 0.8 and 2.4 gives no guarantees at all.

 

If I had to use AO, I'd be aiming for 0 to 5 volt transitions.  That'd mean a 2.5 V offset and amplitude.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 5 of 11
(1,190 Views)

I am using the DAQ card from NI and it has a Analog input. I tried that but I don't know how to measure that. Attached is my attempt. Its seems that when I try to send the signal, only the case structure is executed so the measurement outside is stopped.

Screenshot 2023-04-14 121237.png

'0-0.8 V is guaranteed low, 2.4-5.0 volts is guaranteed high, anything between 0.8 and 2.4 gives no guarantees at all.' Yes I read that somewhere but don't understand what that means. My device requires 1.8V or 3.3V to trigger. Why is digital output inferior to the other 2? I don't understand the differences between these outputs

0 Kudos
Message 6 of 11
(1,183 Views)

@Jaywai wrote:

I am using the DAQ card from NI and it has a Analog input. I tried that but I don't know how to measure that. Attached is my attempt. Its seems that when I try to send the signal, only the case structure is executed so the measurement outside is stopped.

Screenshot 2023-04-14 121237.png

'0-0.8 V is guaranteed low, 2.4-5.0 volts is guaranteed high, anything between 0.8 and 2.4 gives no guarantees at all.' Yes I read that somewhere but don't understand what that means. My device requires 1.8V or 3.3V to trigger. Why is digital output inferior to the other 2? I don't understand the differences between these outputs


NI has a lot of DAQ card historically, which exact model?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 7 of 11
(1,177 Views)

I am using the USB 6341 card

0 Kudos
Message 8 of 11
(1,169 Views)

The 6341 is a very flexible and capable device.

 

I'd very highly recommend that you start exploring and learning from the shipping examples for AO and AI.  Open up one of each and you can easily experiment with different AO waveformss while observing what you capture with AI.  Then look over the code to see how things are configured.

 

If you're inclined to tinker with the code, do *NOT* save on top of the original example.  Save as a copy into a folder of your own choosing, preferably with a file name change to help show that it's no longer the original example.

 

 

-Kevin P

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 9 of 11
(1,152 Views)

Do you mean the examples in the labview software? I actually wrote the above code based on that. The card can acquire and generate signal at the same time? My problem is that in my code I am always acquiring voltage and once I generate a signal, the case structure is executed. When that happens, the acquiring stops for a moment but this is exactly the period I need to see the signal.

0 Kudos
Message 10 of 11
(1,144 Views)