LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulated device in MAX

Solved!
Go to solution

I simulated two DAQ devices (NI USB-6259) in NI-MAX. I can now create daq express vi and select either of those two as input or output but how do I read signal sent from one at the other (since there are no physical cable linking anything) Do I configure virtual channels and link those? How? Any resource or example that you can point to would be really appreciated.

I:

    -created/simulated NI devices A  and B in Ni-MAX

    -want to output a signal on A virtually

    -want to read said signal on B.

 

How do I link A and B?

0 Kudos
Message 1 of 7
(6,581 Views)

See the caveats of simulated devices here.  Attached is a snippet of the information found at that link.

 

sim_devices.PNG

aputman
Message 2 of 7
(6,576 Views)

Thanks. Does this mean that if my output was a square wave for example, my simulated input will display a sine wave?

0 Kudos
Message 3 of 7
(6,566 Views)
Solution
Accepted by topic author The_demon

Correct.  The main benefit of simulated devices is you can create channels and DAQmx code without the actual hardware.  I put a hardware check in my program, so that if a physical device is not found, a simulated device is used instead and a popup window appears to allow me to simulate values with sliders and dials.  When the device is connected, the dialog disappears and device-acquired values are displayed.  

 

Functionality of simulated devices is limited but nevertheless, it is useful.  Maybe, this will be improved in future versions.  

aputman
0 Kudos
Message 4 of 7
(6,559 Views)

Thanks. I was getting that. And I thought that I was screwing up somehow.

0 Kudos
Message 5 of 7
(6,549 Views)

I know I'm pulling this up from the graveyard, but could you explain exactly how you did that?

0 Kudos
Message 6 of 7
(5,813 Views)

There's more than one thing going on in the above posts, so it's hard to know what you mean by "that" when you say "how you did that?".

 

I'm going to guess that you want to have your program run a different way when simulated than the default simulation behavior that the NI device produces.  If that's the case, find the bit of your code that's producing "bad stuff" (probably a "DAQmx Read" node of some kind).  Before running that code, drop down a DAQmx Device property node (found in the palettes under "Measurement I/O → NI-DAQmx → Advanced → System Setup → Device Node").  Pull it down so there are two properties visible.  The first one should be "Active device" as an input and the second is "Device is simulated" as an output.  Wire in your device reference to the first node, and then with the Boolean output from the second property, use that to have your program do "something different" when it's True to use a simulated instrument in a way that works better for you.

0 Kudos
Message 7 of 7
(5,804 Views)