LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hardware Simulation from Labview

Hi,
Could any one suggest me how could I simulate the hardware from
LabVIEW programmatically rather than getting in MAX .
I need to create a Virtual HW  ( DAQ Cards ) that has to be done from LabVIEW .
 
Regards,
Sundar.
0 Kudos
Message 1 of 13
(5,720 Views)

AFAIK, you cannot simulate HW from/using LabVIEW, but you can simulate them from the Soft Front Panel that get installed when we install the Device Drivers for that particular card.

LV is specifically used for developing programs (applications) for the HW modules like DAQ or PXI or SCXI Smiley Happy, not for simulation.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 2 of 13
(5,707 Views)

Hi

My first question would be: why you want or need to do this from LabVIEW? and what cards are you trying to simulate? From your post I can infer that you have already gone to Measurement and Automation explore (MAX), you have right click “Devices and Interfaces” -> create new and you have selected “DAQmx simulated devices” and you will like to do this programmatically form LabVIEW.

Answering your issue the NI-DAQmx drivers are not an IVI compliant driver and; unfortunately, there is not a method of programmatically simulating DAQmx devices available in the DAQmx API. This question has already been answered in this thread: How do I programmatically simulate a DAQmx device? The work around suggested will be simulating all the devices you need exporting the MAX configuration to a file and loading it from LabVIEW. Import and Export a MAX Configuration through LabVIEW, please feel free to submit any suggestion for this product at: Product Suggestion Center.

I hope it helps

Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 3 of 13
(5,673 Views)

Hi Jamie,

This is what I exactly I want to do . This is basically for an ATE test simulation wherein one could simulate the test without needing the actual hardware. The problem I have now is I need to simulate this hardware ( DAQ ) in the absence of actual hardware , also the end user not familiar with MAX , so all the simulation needs to be automatically generated from the Code. And the PC would be in isolation hence to copy a configuration is really not a feasible solution. Please let me know if you have any other feasible solution.

Regards,

Sundar.

0 Kudos
Message 4 of 13
(5,664 Views)

Unfortunately like I said before there is no way of creating the simulated device from LabVIEW programmatically, but I think I have two ideas that might work, first the obvious one will be creating some kind of easy “steps/tutorial” to follow so the user would be able to simulate the devices, like this DevZone article: “NI-DAQmx Simulated Devices”, the second one will be a beyond my support knowledge but there are third party software that allows you to record keyboard and mouse event and replicate them after; I’m not sure but it might help you. I will also suggest to go through the DevZone article since simulated devices have limitation a not everything can tested from them.

I hope it helps



Message Edited by Jaime F on 11-18-2007 02:41 PM
Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 5 of 13
(5,636 Views)

Why cant you just log a test to a file and simply play it back to simulate the test?

I do this in some of my apps, where i read the channels into an array and then wire the array values to dials etc, this way if i want to play back a file i simply read it in line by line to the array and then show this. I just have a true false statement as to where to get the data from dependent on whether a button is pushed in

Hope that makes sense

Mike

 

0 Kudos
Message 6 of 13
(5,608 Views)
HI Mike,
Thanks for the Suggestion . But let me tell you that am not trying to replay the test .
I need to simulate the Actual hardware condition for conducting the test.
 
Regards,
Sundar.
0 Kudos
Message 7 of 13
(5,590 Views)

I don't know why you can't use the import/export option mentioned earlier. You said it's in isolation but the files can reside anywhere on the pc.

For simulation purposes, could you not just pick a DAQ board that has equal or higher specs than the actual hardware. For example, pick a DAQ board with a high sample rate and a high number of channels. Since you are simulating the acquisition and the only signal you can acquire is a 1 kHz sine wave, it should not matter what the actual test setup will eventually be using.

0 Kudos
Message 8 of 13
(5,578 Views)
Hi Dennis,
My application is building an ATE . where in I need to Run the test in Simulation and Real Hardware Mode.In the absence of the Real hardware , the code should automatically (or programmable by the user from the Front panel GUI ) generate the Simulated hardware. My problem is that in case the target where the application is installed being isolated ,  copying a configuration becomes tedious due to access of relevant data. And also need to give enough flexibility to the user from the GUI itself rather than giving him the access to MAX.
 
Regards,
Sundar.
0 Kudos
Message 9 of 13
(5,551 Views)
I still don't understand the isolation part. Your simulation config files can be local to the system. Does it not have a hard drive? And as far as selecting different DAQ boards, how many do you have to choose from? The simulation of all of them is basically the same. No matter how many channels or how fast the actual DAQ board, you can only simulate the acquisition of a 1 khz sine wave as I already mentioned. The built-in simulation mode of DAQmx really won't let you simulate an entire ATE system unless the ATE system is expecting a signal of that type. All it will let you do is run the DAQmx code without errors.
0 Kudos
Message 10 of 13
(5,546 Views)