09-03-2008 11:29 AM
I have the DAQ connected to a system that sends a digital 0 or 1 through the analog BNC connector. If I use DAQ Express VI, I can convert the dynamic data type into a boolean (rather than scalar) array so it's easy to check if the value is 0 or 1. Because I'm running the VI in real-time, I can't use dynamic-to-boolean array conversion. The output I get is a 1-D waveform array which will give me scalar values. The task has a voltage range of -10 to 10 mV. How can I convert that into a 0 or a 1? Should I set the voltage range to 0-5V and simply have an if statement that checks if the value is, let's say, greater than 2.2V (which will mean it's a binary 1)? Is there a better method?
Thanks.
09-04-2008 07:01 PM
Hi abdel2,
It sounds like you are trying to measure digital data from your system. If that is the case, you should be able to connect to a digital input line if your DAQ card had them. Then you can set up a digital acquisition in LabVIEW that will interpret the signal as a boolean input.
If you are not able to do this, you can approximate the digital behavior by reading analog data, and pragmatically determining a threshold (for example 2.2V), though this is a less efficient way to do it.
Regards,
Stephen S.
09-08-2008 12:46 PM
I guess digital lines would be better than analog but I am using BNC connectors right now. I need a wire connection for digital input. Maybe I'll replace them later but for now I'm working with analog connectors. I just implemented an amplitude check (>2.2 V = 1) and it seems to work great.
Thanks.