09-14-2012 10:14 AM
The problem is, the only UDP example set is UDP Send and UDP receive.
This program sends data over UDP from one Labview program to another,
on the same computer. I want to transfer data from Labview on one
computer to Simulink on another computer and I do not know how to
modify the example to do that.
ayur
09-17-2012 05:04 AM
Hi Ayur!
The LabView side can be found in LabView's example finder (both sending and receiving). To find simulink side, check this page: http://www.mathworks.com/help/instrument/examples/basic-udp-communication.html
Of course, addresses and ports should be selected to match the sides. Firewall settings should be checked as well.
The type checking was described in this forum before.
Br,
Peter
09-17-2012 07:24 AM
Hi ayur,
Your program what you attached few posts ago contains formatting of data into a string.
This string format is used when you want to send bytes like this:
number 123 = '1','2','3'
The UDP write accepts strings as byte-stream. I'm confident to say that the Simulink interprets the data in binary format.
In this case you need to format your double into strings but in binary. So the result of a double will be 8 bytes, not an array of characters. For this I suggest to use the Flatten To String VI. Instead of using the Format Into String VI.
Hope it will work!
Best Regards,
Tamas Szekely
National Instruments
09-11-2015 07:19 AM
Hi, Can you send me the example you did before....I really want to see what is my problem. I have been in this trouble for connecting Simulink and LabVIEW for many days now....thanks a lot...
07-13-2016 03:55 PM
Would you by chance have the file with the solution that you found still available?
11-16-2022 11:01 AM
Hi, I have the same problem as the original post.
I have tried the same fixes and the VI provided. I am able to send data from Labview to Simulink, but I am unable to send data from Simulink to Labview.
I receive something but it is utter garbage. My guess is that there is a conversion error but I have tried EVERY data types combination and it still won't work.