LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to simulate USB-6366 device (without success)

Solved!
Go to solution

I have read through the MAX and DAQmx tutorials regarding device simulation but I still can't find a way to effectively simulate the acquisition and generation of a signal using a NI-USB-6366 device. 

 

I'm trying to capture a signal (given at the input of this VI) using DAQmx Write and then use DAQmx Read to read the captured signal from the internal memory of the card (which has a buffer of 32 MS). For this I created a task with DAQmx that I feed into the Write block.

 

I know the approach is most likely wrong, but I just can't figure out how to do this in an easy way and the NI documentation is everything but straightforward. All I want is to

 

a) test the capture of this signal by the device using 2 digital inputs and then read out what it has acquired from its internal buffer

b) send this same signal to 2 digital outputs and capture this output signal again.

 

Cheers

0 Kudos
Message 1 of 7
(3,603 Views)
You are limited to capturing the simulated 1kHz waveform as explained in the MAX help. You cannot route some arbitrary signal from a simulated DAQmx Write to a simulated DAQmx Read.
0 Kudos
Message 2 of 7
(3,592 Views)

Dennis,

 

I thought this limitation was only for analog signals. Is it also true for digital inputs/outputs?

0 Kudos
Message 3 of 7
(3,584 Views)
A simulated write goes nowhere, period. I don't recall what a simulated digital read does. Probably toggles between 0 and 1.
Message 4 of 7
(3,581 Views)
Solution
Accepted by topic author thehun

Yes! the simulation is meant to allow you to write a program and test that it works theoretically even if you do not have the hardware physically available. It has no programmatic interface to influence what simulated data the read functions will return. And any write function has no noticable effect anywhere, working as a data sink into nirvana. It's still usefull as you can test software without getting all kinds of runtime errors about trying to access non existing hardware, but has its limitations of course. However a programmatic interface to manipulate what and how data is simulated, while it would be a very nice feature, is almost certainly to complicated not only to implement but also to use.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 5 of 7
(3,579 Views)

Ok thanks for the replies. I guess in this case the simulated device won't be of much use to me right now. 

 

Cheers

0 Kudos
Message 6 of 7
(3,571 Views)

I got thrown for a loop one time using a simulated device for the first time to test some software changes on a PC that was offline from production.

 

I had a state machine that would fire various events using Value(Signaling) based on a couple digital pushbutton inputs. Also had buttons on the GUI where I could initiate the same states.

Took me a while to figure out why my End event would occur out of nowhere some arbitrary time after my Start event was fired using the GUI.

 

MAX showed the mayhem going on with the inputs.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 7 of 7
(3,551 Views)