07-24-2008 08:51 AM
07-24-2008 08:57 AM
Hi KIRIT,
to check your code you can simulate your input. Change your function which read from the hardware with a vi in which you can simulate the hardware. Another solution could be to use a simulated device. You can create them in MAX.
Hope it helps.
Mike
07-24-2008 09:02 AM
Thank you
Can you pls tell me the procedure to interface the source code to simulated device in MAX.
07-24-2008 09:08 AM
Hi Kirit,
go to MAX, right click on "device and ..." and select "NI-DAQmx simulated device". Select the device. Now you can select it in your source code.
Mike
07-24-2008 09:48 AM
Mike
I picked a simulated device(Ni PCI-6601) in Ni-daqmx devicesI which has 4 counter channels. And placed DAQ Assitant in block diagram, initializing the counter input with acquiring signal. Same channels from MAX and DAQ Assistant are picked, but i see no communication.....For example if i give some counter value on the front panel it should reflect on MAX generated simulated device.But i see no change.
I am sending you the screen shot of the both MAX and labview program.
Pls post your suggestions
07-24-2008 12:06 PM
07-24-2008 12:10 PM
It would be very nice, if u can give details how to do......with an example if possible
Thank you
Kirit
07-24-2008 12:25 PM
07-24-2008 01:38 PM
I am using counters for Edge counting. I need to simulate in both situations like passing result is returned. I am not sure of what you meant by failing data.........i am stuck at that position...when i use digital input with the same worksheet it shows response but with counters no response. Pls if possible send me the woksheet you believe would work(like with random genrator and so on). Actually i am not looking for too fancy.....My intension of doing this simple thing is to get a way to communicate with the built in simulated devices. Then i want to simulate it with the source code which i have modified with new counter inputs.
KIRIT
07-24-2008 02:04 PM - edited 07-24-2008 02:05 PM
Do you not know what the typical measurement is supposed to be? By failing data, I mean a measurement that is outside what you would expect. You need this if the count is supposed to be some value and you have code that takes some sort of action when it is outside a limit. If you don't really care, then just set it up to return a range of nominal values.
Below is some simple code to generate a random number between a min and max range. You can replace the min and max with constants or just have the random count be a constant.
I hope you are aware that the simulated count function would be used in place of the DAQmx Read/DAQ Assistant. For counters, you cannot use a simulate DAQmx device to return anything but a 0. You could have a case statement with one case having the DAQmx function and the other case having the simulated data function.