Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

need help interfacing to (DPM) Module coded in Matlab or C++

Hello All..real newbie here...first time ever with forums...so take it easy on me please....just getting started with Labview.  We are wanting to write a vi that:

  1. collect  data from sensors (e.g., pressure transducer, temperature sensor, gas flow meter, etc) and pass it to a “Data Processing Module (DPM)”, coded in Matlab or C++, through Labview. Data sampling can take place at different frequencies, depending on dynamic system behavior.
  2. DPM will process the data. This may take few minutes to few hours.

  3. Next, the PROCCESSED data will be passed from DPM to “System Model Updating Module (SMUM)” coded in Latlab or C++. SMUM will take maximum few hours to update the system model.

  4. Then, the updated model from SMUM will be used by “Optimization Module (OM)”, coded in Latlab or C++, to find optimum system control strategies (e.g. optimum pressure, temperature, etc.). This may take few hours.

  5. Finally, OM will pass the optimum system control strategies to control devices through Labview.

  6. Repeating step 1-5

Do I want to use a MathScript node to accomplish this??

Thanks for any assistance.....

 

0 Kudos
Message 1 of 2
(2,984 Views)
Hello,
 
The mathscript node is not an interface to Matlab, so I'm not sure that's what you're looking for.  It does allow you to write text-based code and integrate it into your LabVIEW code. See the following for more details about MathScript Nodes:
 
NI LabVIEW MathScript

[broken link removed]

 
It sounds like you have the following major tasks to look at:
 
1. Acquire Data in LabVIEW
2. Pass data to DPM and process
3. Pass DPM processed data to OM and process
4. Pass OM processed data to LabVIEW
5. Use LabVIEW to control devices.
 
For 1, I presume you will be using NI hardware, or perhaps standalone instruments communicating via serial or GPIB.  If you're using NI hardware, specific questions about acquiring data are best fielded in the DAQ forum, but basically you'll be using our DAQ driver for the device you have, which exposes a nice API for configuring the acquisition, starting the acquisition, and of course getting the data.  If you're talking to instruments via serial or GPIB, those questions will be best fielded in the instrument control forum.
 
For 2, you'll need to know how the DPM expects data.  Perhaps it has an activeX server - in this case, you'll be able to use LabVIEW to access it through ActvieX.  Of course if you can program on the DPM side, you could simply write files in LabVIEW (streaming your data to disk, or processing a bit first and then writing to file) and then read those files from the DPM side.  Or a combination of those methods might be in order.
 
For 3, this is completely separate from LabVIEW I think, and unfortunately I don't have any relevant experience.
 
For 4, the same methods noted for 2 apply.  LabVIEW can act as an activeX client and server, and you have the freedom to write and read files as necessary.
 
For 5, this is probably similar to 1, where you are going to be doing some "instrument control" perhaps via serial or some other peripheral connection to your computer.  The details of how to program that will depend on the devices, however, if you're looking to talk via serial or GPIB (or other peripheral ports) you can use NI-VISA (this is exposed as an easy to use API in LabVIEW).  Generally, the instrument control forum is good place for those questions as well.
 
Maybe others will have more specific experience with DPM and OM, but hopefully this gives you a little clearer picture about what may be involved in terms of programming, and where to direct more specific questions as you begin developing.
 
Thank you,
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 2 of 2
(2,967 Views)