LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simple NI-DAQmx simulated device questions

I read this article "

NI-DAQmx Simulated Devices"

( https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x0PxCAI&l=en-US#toc2 ). And I am trying the example code "

Cont Acq&Graph Voltage-Int Clk VI ", follow exactly what the webpage say.


However, I don't understand

  1. Don't understand how to use stimulated device; and the point of having Logger.
  2. Why I can keep reading data by using the example code in all the following setting?????
  • I stop the NI-DAQmx simulated device (without closing the program, still have DAQmx task) after generate a sine wave (one hundred points). There is 1 VI Logger task. I run the example code. The example code can continuously read data.
  • I stop the NI-DAQmx simulated device (without closing the program, still have DAQmx task) after generate a sine wave (one hundred points). There is no VI Logger task. I run the example code. The example code can continuously read data.
  • I stop the NI-DAQmx simulated device and (close the program, still have DAQmx task) after generate a sine wave (one hundred points). There is no VI Logger task. I run the example code. The example code can continuously read data.
  • I stop the NI-DAQmx simulated device and (close the program, DO NOT have any DAQmx task) after generate a sine wave (one hundred points). There is no VI Logger task. I run the example code. The example code can continuously read data.



Please help , thanks

====================
=Labview 7.0 & 8.0 & 8.5=
=====================
0 Kudos
Message 1 of 6
(3,851 Views)

I don't quite understand your questions. I have no idea what you mean by stopping the simulated device. You don't stop a simulated device any more than you stop an actual device. You can remove it from MAX but as long as it is present, you can call that device in VI Logger, the MAX test panels, or a LabVIEW VI. Nor is it necessary to create any type of task in MAX in order to use a device (real or simulated) in LabVIEW.

 

You use a simulated device in place of an actual device when you are trying to develop some code before the hardware arrives. You can use it to validate that the tasks you create are valid and don't generate any errors. 

0 Kudos
Message 2 of 6
(3,836 Views)
Here is what I mean of stopping the DAQmx stimulated device. I do from step A - E; and step E is what I mean stopping the DAQmx stimulated device.
 
 
 
 
 
 
3. Use the NI-DAQmx Task in VI Logger Lite to complete a data logging application.
a. Open VI Logger Lite. 

b. Right-click My System>>VI Logger Tasks and select Create New.

c. Select Using NI-DAQmx and click Finish.

d. Select the NI-DAQmx task for the NI-DAQmx simulated device. Leave all settings in the defaults, and click Run task in the toolbar.

Figure 9. VI Logger Lite data logging task.

 

The data logging task begins. Data from the NI-DAQmx simulated device is displayed in the Real Time Data viewer.

e. Click Stop task.

====================
=Labview 7.0 & 8.0 & 8.5=
=====================
0 Kudos
Message 3 of 6
(3,826 Views)
Yes, you are stopping the VI Logger program. So? It's a program that is using the device. Start LabVIEW and you can use the same device. You can also stop LabVIEW. Write a program in CVI that uses the device and you would have the program start and stop as well. What exactly is the confusion over different programming environments being able to access a device? NI supports a lot of different programming environments and they can all access NI DAQ devices.
0 Kudos
Message 4 of 6
(3,824 Views)

The part that really make me confuse is how I can know the simlated device is running in my expected way?

 

I set only 6 out of 14  channels in the MAX to receive inputs, but all the channels in the example code can receive the stimulated signal. Why ?? 

 

Does any stimulation begin button in MAX??? I see a panel asked me how many data point to generate or continuously generate. I set only generate 1000 point. The example code can detect signal after the 1000 data points have been generated? Why ?? 😉

 

 

Thanks  🙂

Message Edited by zmarcoz on 02-26-2009 09:51 PM
Message Edited by zmarcoz on 02-26-2009 09:55 PM
====================
=Labview 7.0 & 8.0 & 8.5=
=====================
0 Kudos
Message 5 of 6
(3,821 Views)

Whatever task you create in MAX can be changed, modified, or ignored in a program you write. Personally, I never create or save a task in MAX and just specify everything in my LabVIEW program. That way, you don't have to look in two different places to understand what is going on. NI has given you the option of doing either or both. The LabVIEW program is not using the saved task at all. It is creating a new one.

 

You are assuming that the simulatio of an analog output effects the simulation of an analog input. Not at all true. The simulation of a generated signal has no relationship at all to an acquisition of a simulated signal. In the real world, you could connect the analog output to an analog input but since no real signal exists and you have no real hardware to physically connect pins, that is obviously not possible with simulated hardware. 

0 Kudos
Message 6 of 6
(3,807 Views)