LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

decode flattened data in matlab

I have a VI that has to communicate fairly closely with another computer running Matlab.  I have a TCP/IP connection established between the two computers and LabView calls functions in Matlab by function name.  I want to write a wrapper that will take the function name and some parameters (each an associated name, possibly an array, and data type) then send that through TCP/IP where it the parameters will be parsed and popped into a structure.  I was curious if anyone knows of anything similar or has recommendations.  My current plan is to just flatten to string and send the type description and data string through the pipe, and do all the parsing work at the Matlab side, but I worry what will happen if LabView changes the values for the type descriptors.

Thanks,
James
0 Kudos
Message 1 of 3
(3,137 Views)

Hi James,

NI will only possibly change the type descriptors between versions of LabVIEW and so as long as you use the same one you will be fine. Your idea sounds fine, but you could always check out this post with some other ideas. Hope this helps!

Stephanie

 

0 Kudos
Message 2 of 3
(3,117 Views)
I wouldn't worry a whole lot about things because to this point, NI hasn't been overly anxious to muck around with the format of flattened data structures. They did it once between V4 and V5 (to address an issue with booleans as I recall) and again between V7 and V8 (to make the size fields bigger). In any case, you can tell a V8 flatten to string function to perform the same as the V7 function.

Still at the end of the day the biggest advantage you have is NI's conformance with standards like IEEE floating point, and the extent to which they have documented flattened data structures. With such features you will always be able to get at your data. For example, I routinely save LV data structures as BLOBs in an Oracle database. One of our IT support guys was able to write stored procedures to pull the LV structures out and and let non-LV applications use the data - and it only took him about an afternoon to do it!

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 3
(3,103 Views)