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 ...
![]() |
| | LinkBack | Thread Tools |
|
#1
| |||
| |||
| |
|
#2
| |||
| |||
| 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. |
|
#3
| |||
| |||
| 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 |
|
#4
| |||
| |||
| 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 |



