11-14-2007 10:52 PM
11-15-2007 12:47 AM
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 , not for simulation.
11-15-2007 05:47 PM
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
11-15-2007 09:33 PM
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.
11-18-2007 02:40 PM - edited 11-18-2007 02:41 PM
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
11-19-2007 08:51 AM
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
11-20-2007 12:40 AM
11-20-2007 08:53 AM
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.
11-20-2007 10:43 PM
11-20-2007 11:26 PM