Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulating a device in ni-daqmx on Linux

Hi,

 

I'd like to simulate a device (so that I can more easily develop on my laptop). The documentation of NI-DAQmx states that simulated devices are supported, but the only instructions I could find are when using MAX, which apparently only works in Windows. Is there a way to add a simulated device by importing a configuration in nidaqmxconfig, or any other way?

 

The configuration with the real DAQ board looks like:

[DAQmx]
MajorVersion = 21
MinorVersion = 3

[DAQmxDevice Dev1]
ProductType = PCIe-6361
DevSerialNum = 0x20337CA
ProductNum = 0x7433C4C4
BusType = PCIe
PCI.BusNum = 0x1
PCI.DevNum = 0x0

 

Is there a way to tweak this file so that I get a simulated device that look similar to the real device?

 

Cheers,

Éric

0 Kudos
Message 1 of 4
(1,712 Views)

No simulated devices on Linux yet, only Windows in MAX as far as I know.

 

https://www.ni.com/en-us/support/documentation/supplemental/18/windows-vs-desktop-linux-daqmx-experi...

Search for Simulated Devices to find it is not supported in the Linux column.

 

Easy enough to write your own "signal generator" code to spit out data if that is what you need for testing the rest of your code.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 2 of 4
(1,700 Views)

Hi, you just need to add the line:

DevIsSimulated = 1

at the bottom of your device, and it should work.

From that point on, you load the device information using the nidaqmxconfig on the terminal, and one of the ways that I started simulating was using the module nidaqmx of Python (which by the way it appears to work on Linux too).

I have in fact a similar question about simulating devices, which you could find in:

https://forums.ni.com/t5/NI-Linux-Real-Time-Discussions/Failure-while-loading-simulated-device-with-...

Message 3 of 4
(1,662 Views)

I learned something new!

 

Adding DevIsSimulated = 1 did allow simulated data to be read from the device in LabVIEW.

 

I did have to restart my system after importing the daqmxconfig changes as for some reason it caused an internal error when I did the import.  The import did work though.

 

NI needs to update their information.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 4 of 4
(1,648 Views)