05-09-2014 06:15 PM - edited 05-09-2014 06:21 PM
hi guys.. i have problems about control and design on simulation path I just make PID simulation and i can not to connect to DAQ card from simulation path in control design (function)...anyone can help me how to connect that?????
Solved! Go to Solution.
05-10-2014 10:05 AM
Ayubi,
First, keep in mind that the Control and Simulation has a PID under the Palette "Control & Simulation >> Controllers".
Then, to connect a Daq Card, you need to use the DAQmx interface to connect to it. In general National Instruments recommend you use a Real-time system to deploy a controller, but most likely your Windows computer should be good enough for your application. Please look at the shipping example (in 2013):
C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Real-time\DAQmx\RT PXI DAQmx single channel PID.lvproj
If you do not have LabVIEW Real-time (RT), you can just open the VI:
C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Real-time\DAQmx\DAQmx Single channel PID.vi
and remove the Shared Variables from the code and it would run on a Host computer with a DAQ board.
05-10-2014 10:10 AM
Ot course, I am assuming you are using one of National Instruments Data Acquisition boards with at least one analog input/output that supports Single-Point I/O. If you have a third party board or a cRIO, this the code will be very different. However, the pattern of:
a) Configuring the board outside the Control and Simulation Loop,
b) Read input signal,
c) Process with PID,
d) Write output signal
e) Close the reference to a board after the simulation is stopped (with making the output of the controller zero).
still valid to any application.
05-10-2014 05:24 PM
thank you very much...
anyway can you give me what you done it??
i mean your VI.
so sorry sir
you may send that vi. to my email
ayo3bi@hotmail.com
05-10-2014 05:37 PM - edited 05-10-2014 05:38 PM
i found that by google 🙂
so i cannot solve that how to connect that DAQ to simulation maybe this other option
and what the function to connet to DAQ??
05-12-2014 10:38 AM
Ayubi,
Please go to your file system and open:
C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Real-time\DAQmx\RT PXI DAQmx single channel PID.lvproj
If you don't have this example, please let me know which version of LabVIEW you have and I can try to post this example.
05-12-2014 10:43 AM
Hi Ayubi,
You can find the exact example that Barp used at this location (he is using LabVIEW 2013) C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Real-time\DAQmx\DAQmx Single channel PID.vi
I recommend to get a better idea of how to create/configure/run a DAQmx task using the DAQmx API before incorporating it into your simulation loop. Here are several videos that will help you get started with the DAQmx API: http://www.ni.com/white-paper/5468/en/ [VIDEOS]
The functions referenced by the arrows in your screenshot are "Convert from Dynamic Data" and "Convert to Dynamic Data" express VIs.
05-13-2014 06:07 AM
thank you very much