04-04-2012 03:35 AM
Hi osowoaji,
In most cases, a message such as "the specified network address is currently in use" would suggest that you're not closing your TCP connection, yet from your screenshot as long as you are ending your program with your stop button, rather than using the abort on the toolbar this shouldn' be an issue. Try closing & reopening your VI then rerunning the code. Does this still bring up the same issue?
When you say that having a listener VIs in LabVIEW is not working, what happens? Do you receive any errors? Or is there just no data being passed through?
As LabVIEW to LabVIEW works and Simulink to Simulink works, I can only suggest that it'd be an issue with the two communicating with one another. The Simulation Interface Toolkit actually uses TCP/IP behind the scenes, so I'd suggest the next option is to download an evaluation of this toolkit and to check if this works. This will show that ultimately with your programs that Simulink & LabVIEW can establish a connection.
Have you checked in Simulink if there are any options/settings to enable/disable other programs from accessing it via TCP/IP?
Best wishes,
04-04-2012 04:42 AM
Hi Tori,when i closed and reopened theVI i did not get that message at first but after running it a few times i got the message again.When i said the listener vi in Labview did not work i meant it timed out because it was not able to establish a connection with Simulink. With all that said,i was trying to communicate on one computer and it didnt work.I then tried communicating from two computers(Labview on one and simulink on the other) and it worked.A connection was established and data was transfered.The problem now is, what i send from Labview or Simulink is not the same as what i receive,so i am thinking this might be due to data mismatch at the receiver side or something
04-04-2012 12:00 PM
@osowoaji wrote:
The problem now is, what i send from Labview or Simulink is not the same as what i receive,so i am thinking this might be due to data mismatch at the receiver side or something
There's a reasonable chance this is an issue of byte ordering. Are you using flatten to string and unflatten from string? If so, try changing the byte order (endianness) input on one end.
04-04-2012 03:10 PM
I have looked at the easy example using the SIT given here http://zone.ni.com/devzone/cda/tut/p/id/3057 and it worked.I have tried mapping this attached one tank system but it doesnt seem to be working using simulation interface toolkit.Please how can i map this to show the height/level both in the tank and on the grap?Since the other way is not working i want to try the SIT.Thanks for your assistance
Osowoaji
04-10-2012 08:01 AM
Still can figure out mapping the tank system in simulink with the user interface in Labview.Please any help?i attached a screen shot earlier
04-11-2012 06:36 AM
Hi Osowaji,
Hope you've had a nice Easter!
Are you seeing any outputs to LabVIEW at all through your model? I'd suggest that you may need the In1 & Out1 as shown on the tutorial within your .mdl file from SImulink. To output your results to a graph in LabVIEW, your result does not need to be outputted to a scope.
If you change your scope to an Out function in Simulink, does this now appear in your window stating to "Specify Signals for Indicator"?
Let me know how you get along with this!
Kind regards,
04-11-2012 07:37 AM
Hey Tori,yes i did have a nice easter thanks.Hope you had a nice one too.Thanks for your reply,i figured it out yesterday.I did not remove the scope as i wanted to make sure it was the same output i was getting on both simulink and Labview.To show the level in the tank and on the graph in Labview i mapped them to the integrator.Thanks again
Osowoaji
04-11-2012 08:33 AM
Hi Osowaji,
Glad to hear you got it sorted!
Is it now showing as you expected on the tank?
Thanks,
04-11-2012 08:40 AM
Yes it is showing as i expected.Will use the SIT for now but will still like to get them talking directly through TCP/IP.Still havent figured out that part yet.Thanks again
04-16-2012 04:32 AM
Hi guys,i have suceeded in linking simulink and Labview using the SIT and everything is working fine.The only problem is the time(x-axis) on the graph in Labview does not correspond to that on the scope(graph) of the simulink.Any idea how i can make the two the same?Thanks
Osowoaji