Hi everybody,
I'm currently trying to control a Matlab/Simulink simulation using a nice LabVIEW interface, but I'm experiencing some trouble reading the values back.
To make it simple, I send a numeric value using TCP write, Simulink processes it and then writes another numeric value back, which I read using TCP read.
I only connect to my local machine (the IP address could be "localhost", the result would be the same).
The returned value is then tested in order to display a particular picture according to it. (see attached subVI.vi)
My problem is: if I don't test the value (e.g I delete the subVI), the returned value is displayed correctly on the graph. But since I added the subVI, after reading several values (a few dozens maybe), LabVIEW won't read anything else but zero...
The data is updated by Simulink (I can monitor that in the model), but not read by LabVIEW. In the meantime, the control value sent by LabVIEW is read by Simulink, which means that the connection is still open...
I attached a picture of the main VI, but I believe the problem to be located somewhere in the subVI...
BTW I'm quite new to LabVIEW, and I'm sorry about the atrocities I might have coded in the VI
If anybody has an idea about what could be wrong in my VI, please let me know, any help would be much apreciated !
Regards,
Nono
PS: I'm using LabVIEW 7.1
Edit : 2nd post :
It's me again,
I've done some more tests and It seems like the problem comes from the vi "read JPEG file" or maybe from "Draw Flattened Pixmap" or both. In fact, they are executed in the while loop, which slows down LabVIEW.
Could someone tell me how to store a "picture" flow (output of Draw Flattened Pixmap.vi) in a local variable so that the reading files part could be done only once ?
Thanks in advance,
Regards,
Nono