LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can the USB NI DAQs be used for process control,eg.closed loop? or is too fast

can the USB NI DAQs be used for process control,eg.closed loop? or is too fast.

 

0 Kudos
Message 1 of 11
(4,366 Views)

Hi mho,

              Yes,USB NI DAQs be used for closed loop process control.

               see the link below:-

              http://www.ni.com/academic/students/learnlabview/control.htm 

 

            But from your question we can't infer much more.please provide much more details.

 

           Also see this example:-

            Example01.vi 24 KB   

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 2 of 11
(4,363 Views)

thanks danil33, actually I want to buy a new DAQ,and I want to see the suitable one for my application,I have to choose on of these DAQs (NI USB-6343, NI PCI-6229 or NI PCI-6230). I want to acquire the data from the sensors(pressure sensor and encoder) using labview and send it as feedback signal to the control diagram in matlab(Simulink) in real time, and send the control signal(the controller output) from matlab to the output device which is valve via labview. I have many points:

 

1-One of my friends said that" usb is very high speed. when it is applied to the close-loop for process control, may be the system can't support"   Do you think  NI USB-6343 can do this job or I have to choose PCI DAQ only?

 

2- I am not really good at the hardware, could you explain to me how can I choose the suitable DAQ depending on the sampling rate:NI PCI-6229 has a 833 kS/s    and NI PCI-6230 has a 500 kS/s for analog output which will be used to send the signal to the valve,how can I relate the sampling rate to my instrument?

 

3- Do you know how to connect labview with matlab/simulink?

 


0 Kudos
Message 3 of 11
(4,359 Views)

Hi mho,

             1.usb is very high speed that is correct.Better you can choose PCI DAQ.But thats upto you.

 

             2. see this:-

             https://www.ni.com/en-us/shop/model/pci-6229.html

        

            3.If Matlab support TCP/IP, that could be an option.

 

               Another simplest way to do it (assuming you running Windows) is to use a Matlab script.

              If both programs running on different systems:-

              

Most simple and slow - Create two  VI's  with shared variable on both machines, and use a matlab script to

share data. (this makes matlab some kind of "slave").

More advanced but still  relatively slow (Create two  VI's  with shared variable, on the Matlab machine build the .NET

dll, and it can be used on Matlab too ( at least at 2010b version, earlier version support only COM).

Create TCP/IP connection between two comps.

There is "out of the box" NI products, that communicate with Simulink models.You please do a simple search on that...OK

I think this link is also helpful for you:-

Attachment Procedimiento para la interface entre LabView 2009 y Matlab 2009b.pdf 1128 KB

Anyway All the best.Try....do it.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 4 of 11
(4,356 Views)

thanks very much,I apreciate your help alot.the last link seems to be very useful but it is in spanish if i am not mistaken, i will translate it and try it.I will tell you what happen with mw once I buy the DAQ. 

could you please give me your email address.

0 Kudos
Message 5 of 11
(4,345 Views)

Hi mho,

              Just inform us about it by posting in this thread.Happy to here from youSmiley Happy

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 6 of 11
(4,341 Views)

ok i will, thank you very much

0 Kudos
Message 7 of 11
(4,339 Views)

Wait do not rush up...  Why are you restricted to use the USB and PCI DAQ you specified? Also do not decide anything on the specication provided (500kS/s) that you can never achieve with that DAQ as it has lot other practical lags so you need to do a benchmark to test the speed or search NI for a benchmark result.

The DAQ selection really depend on the rate at which you are planning to run the Simulink model for the closed loop and if you do not have Simulation Interface Toolkit you will not be able to interface the model with LabVIEW.

You mentioned you are running the model real time so do you have a real time system? Its not easy to acquire signal through LabVIEW send the data to simulink model and then get the input and send the output through LabVIEW. You should be more realistic since most of the control loops runs atleast at 500Hz for precision control and with the PCI DAQ, Windows based system, Simulink running seperately.. its tough. Try to come up with the control loop requirement and the data acquisition requirements and the number of channels you will be using then its easy to suggest a correct DAQ that fits your application.

 

Good luck.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 8 of 11
(4,334 Views)

thanks P_Anand for your reply.Actually I choosed those three DAQs after doing some filteration,my collegue used PCI-6221 to control the same system in real time using Matlab only,so I have choosed the DAQs which have the same capability or higher,since I need two analog output channels to control two valves,and one analog input channel to receive the datafrom the pressure sensor and another counter channel to deal with the encoder signal.I choosed the suitable voltage for the channels since the out put is voltage from the valves and the pressure sensor. the only problem which I couldn't know how to relate the sampling time for the DAQ to my system since my collegue is using 833 KS/s for the analog output and I have a cheaper choice for the DAQ but it has less sampling equal 500 KS/s.is it depend on the operating frequency?

 

could you please give me an example for "Simulation Interface Toolkit".

 

what do you mean by " do you have a real time system" ?

 

sorry I am beginner in control. I appreciate your help,,,


 

  

0 Kudos
Message 9 of 11
(4,319 Views)

I believe its not a school project. First you need to be sure of some of the important things regarding your application.

 

1. What is the control you are going to do (In your case it may be position of level control) and at what rate it has to be done

2. Where you are going to develop the PID model (In simulink or LabVIEW). If that is Simulink as I told you need to have simulation Intefrace toolkit if you are going to develop the control model in LabVIEW then no need to worry about that.

3. Decide the rate at which the control model has to run and check for a DAQ card you want (If you are going to input and output at a rate of 500Hz your current selection is well and good even you can go for 1KHz but your windows Operating system won't support)

4. A Real Time system is similar to the CPU what we have but it runs on RT OS and the bus will be a PXI or a PXI Express so you will have determinestic execution.

 

Good luck

-----

The best solution is the one you find it by yourself
0 Kudos
Message 10 of 11
(4,313 Views)