Objectmix
Tags Register Mark Forums Read

Communicate between Labview Data Acquisition VI and Matlab antennacontrol GUI : labview

This is a discussion on Communicate between Labview Data Acquisition VI and Matlab antennacontrol GUI within the labview forums in Programming Languages category; Ok, here's some background behind what I'm trying to do.  I'm operating a radio astronomy synthesis imaging array.  It uses a Matlab GUI to control the azimuth and elevation of the antennas in the array, continually updating them to track astronomical objects.  I'm using a Labview VI to acquire data because we were unable to get Matlab to synchronously sample on multiple DAQ boards.  I'm using NI PCI-6115 boards, by the way.  I need to be able to move back and forth between one source (a calibrator) and another source (the object of interest).  However, I only want to acquire ...


Object Mix > Programming Languages > labview > Communicate between Labview Data Acquisition VI and Matlab antennacontrol GUI

Reply

 

LinkBack Thread Tools
  #1  
Old 05-12-2008, 03:40 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Communicate between Labview Data Acquisition VI and Matlab antennacontrol GUI

Ok, here's some background behind what I'm trying to do.  I'm operating a radio astronomy synthesis imaging array.  It uses a Matlab GUI to control the azimuth and elevation of the antennas in the array, continually updating them to track astronomical objects.  I'm using a Labview VI to acquire data because we were unable to get Matlab to synchronously sample on multiple DAQ boards.  I'm using NI PCI-6115 boards, by the way.  I need to be able to move back and forth between one source (a calibrator) and another source (the object of interest).  However, I only want to acquire data when the antennas are on source, so I need some way for the control software in Matlab to be able to tell the data acquisition software in Labview when the antennas have arrived so data can be acquired, and for the Labview software to tell Matlab when it's done acquiring so the antennas can be moved to the other source. I was thinking of having two separate text files for control signals, one for matlab to write to and labview to read from, and the other vice versa.  If anyone has any ideas as to how this could work better, I would greatly appreciate it.Thank you very much.Alan Stemmonsalanstem469@yahoo.com
Reply With Quote
  #2  
Old 05-13-2008, 04:10 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: Communicate between Labview Data Acquisition VI and Matlabantenna control GUI

Hi as469, Have you considered using ActiveX? LabVIEW has ActiveX VI's that allow you to do communication with other applications. You would have to check if the other software you are using supports this. If it does, this approach would be more involved to implement compared to writing/reading files but in the long run it would be a more robust application.
Reply With Quote
  #3  
Old 06-22-2009, 02:57 PM
Junior Member
 
Join Date: Jun 2009
Posts: 1
Carolyn is on a distinguished road
Default Re: Communicate between Labview Data Acquisition VI and Matlab antennacontrol GUI

Well, working with two languages is always more challenging that working with just one. This job would be easier if it were completely in LabVIEW.
Still, the best solution might depend on how much information is needed to be transferred. Some ideas:
If it's a simple signal like "READY" / "NOT READY", then perhaps the control code could write to a particular spare digital output port on the DAQ card. LabVIEW could read a particular spare digital input port from the same card, and a wire could carry the signal from one port to another.
I'm not familiar with MatLab's capabilities regarding external code (DLLs), but if it can call a DLL, then you could either A) compile the LabVIEW code into a DLL and call it from MatLab, or B) call a "glue"
module, in a DLL, that's a signalling module.
I'm also not familiar with MatLab's capabilities regarding TCP/IP communications, but if it can respond to a TCP connection, then you could establish a TCP link between the two programs, and communicate any amount of data at high speeds.
You might consider having the LabVIEW program acquiring data at all times, but detecting some feature in the data that signals that you are "on source". If you're "on source", the data collected is recorded into a file, otherwise, it's simply ignored. The 6115 is 10 MSamples/sec / chan so if you're bringing in anywhere near that amount of data, this might be too much of a CPU hog to work.
The file technique you mentioned could be made to work, but you have to pay attention to permissions and use them as signals.
Simultaneous reading and writing is tricky, and you'll need to be bulletproof. You want to make sure that a file is completely finished writing before yuo read it and act on it.

Hope that gives you some ideas.
Steve Bird
Reply With Quote
  #4  
Old 07-14-2009, 12:56 PM
Junior Member
 
Join Date: Jul 2009
Posts: 1
schieb2 is on a distinguished road
Default Re: Communicate between Labview Data Acquisition VI and Matlab antennacontrol GUI

If this is still an active problem, I suggest creating a GUI in Labview program to control the azimuth and elevation of the antennas in the array rather than using a Matlab GUI. I'm a Ph.D. student in astronomy (looking for a thesis topic) at James Cook University and a Labview Test Engineer. I would be very interested in working on this fascinating project to write the control software. email:schieb2@gmail.com
Regards, Bill
Reply With Quote
Reply

Thread Tools



All times are GMT -5. The time now is 12:35 PM.