Reading and writing Variables from labview
Jan from Switzerland  [6 posts]
9 years
i'm using the labview API example source file, and i have some trouble.

Why is so slow write and read variables from labview, with "rr_getVariable" and "rr_setVariable" functions?
It take about 4 seconds for this task.

Also other functions don't work very good.

Contrariwise "rr_getImage" works very well!



Anonymous 9 years

We reviewed the LabView CVI code and it appears to be ok. Can you include a short code snippet of how you are using the rr_getVariable so that we may be try again to replicate the issue that you are having.

Typically with those kinds of delays something is either not connecting or getting a response and then just timing out.  

Also, we assume you are working with the CVI code and not the vi examples?

Jan from Switzerland  [6 posts] 9 years
Hi Steven,
Yes, I'm using the CVI codes.
I added the "Joystick" button for get the X joystick variable from RR, using the attached *.robo file.

The SW crash when I try to enable the timer (continue display the image) and make a request of one variable, but one function without the other work well.
I think it's just an access priority question.

RR settings: API server Port 6060, Timeout=10, Threads=5

JS_X variable.zip
CVI File.zip
Anonymous 9 years

Thanks for the code, that helps to quickly narrow down the issue.

1. Try using a zero as a timeout in RR. That basically disables the timeout and will not close the connection ... this was probably not happening in your case but just for debugging purposes for now it is recommended.

2. There was a problem in the CVI api code that would cause a delay on a variable read. The rr_readMessage was waiting for more than the response given and thus caused a delay. The zip below includes your code with this corrected routine. It appears to work well for us now.

3. We did not get anything to crash so be sure to download the most recent copy of RR which may have solved that issue.

If you do still get a problem could you include your .exe in the zip so we can test exactly your version?

Jan from Switzerland  [6 posts] 9 years
Hi STeven,

Thanks for the help!

Now it works well.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index