LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ simulated indicator

I am working on an app and currently using a simulated NI-DAQ Analog output channel. Is there a control or tool somewhere that will let me see what the output is on the simulated channel. Something like a virtual oscilloscope to see the signal.

 

I'd like to see if there's any output errors, glitching or other artifacts going on.

 

 

--

Brian Rose
0 Kudos
Message 1 of 11
(3,689 Views)
You should post a screen shot of your code; you could just use a waveform graph or a chart to see what kind of signal you are producing.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 11
(3,685 Views)

Here's the code. Use "GenerateCode.vi" to create a data file a few minutes long. Then use Miniplay2 to vplay it back. I used a simulated Analog output channel, soyou'll probably have to create one of those.

 

Basically, I am periodically writing chunks of data into the DAQ buffer. I could display the data in a graph, but I would rather see how the DAQ library is handling things. If I just display what is going into the DAQmx functions, I will not see any problems like glitching, etc. I could code up something that behaves like DAQ and updates a graph, but then I would have to debug that widget and hope that it functions like the simulated instrument.

 

I figured there would be a tool or indicator that would display what DAQ is sending out in realtime. Perhaps in MAX or something.

 

 

--

Brian Rose
0 Kudos
Message 3 of 11
(3,668 Views)
I believe there isn't a way to view 'real-time data' using a simulated analog output channel.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 11
(3,653 Views)

Is there a way to get the current value being output by the DAQmx Write? I could read that and then send that to a Waveform chart for a pseudo-monitor. Otherwise I need to compute where the DAQ task is in its buffer, and I would need to maintain my own ring buffer and handle all the computations to figure out where the DAQ task is. It seems to me that it should be easy to expose these properties.

 

Perhaps there is a call to a DLL I can use?

 

--

Brian Rose
0 Kudos
Message 5 of 11
(3,639 Views)

There is a property for the DAQmx Device class called 'Simulated?' that returns True if the device is simulated.

To detect which device you use, use the 'Devices' property on a task, this will return an array of devices. (However I don't know any task that can have multiple devices).

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 11
(3,631 Views)

TonP,

 

The title of this thread is probably a bad one. What I am actually looking for is a way to display the current value at an analog output. Not an indicator for a property. If there was a property like "OutputValue" that returned a float with the last value that the DAQ system put on the wire, that would be great.

 

But I see there is no such property, and I am looking in the DAQmx DLL to see if there is a low-level function that might do this.

 

--

Brian Rose
0 Kudos
Message 7 of 11
(3,623 Views)

Hi Mister Rose,

 

It is not possible to see the output on a simulated channel.  While you can create a front panel display that shows the data output, it is still simulated data.  You can address the channel, but no real data is actually being output.

David
Applications Engineer
National Instruments


Digital Multimeters
0 Kudos
Message 8 of 11
(3,618 Views)

The functions in the C dll are the same as the functions available in LabVIEW, I believe. You may need to use the DDK and create your own driver. If you need this functionality, is it jsut while you are waiting for the actual DAQ board to arrive? If so, then creating your own driver would probably not make much sense. If this is a long term situation, it might be. You could also go to the Product Suggetion Center.

0 Kudos
Message 9 of 11
(3,617 Views)

With the DDK, would I be able to add a function that can look into the buffer and get the value being sent to the DAC hardware?

 

What I am looking for is a GetValue function that will give me the float or boolean value of what is being output on the DAC hardware. This way I could hook that function to a graph or chart and display, with minimal error, what is being sent out on the wire.

 

Otherwise I need to code up a duplicate buffer and manage that buffer and perform some math based on the SpaceAvail property to determine which sample is being put on the wire. It is cumbersome and error-prone, and in the end it would only show what I think is being put out on the wire, not what DAQmx is actually sending.

 

BTW, I just posted this suggestion to the PSC.

--

Brian Rose
0 Kudos
Message 10 of 11
(3,604 Views)