From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-01-2020 05:08 AM
Hi! I’m creating a program in Labview with a MyRIO-1900 in the RT VI. Now I am trying to communicate with other MyRIOs through shared variables. The connection is meant to be in real time but it takes almost 30seconds to send and receive the information, I’m wondering if you have some tips so that the connection takes less time and is more effective. Thanks!
03-01-2020 08:26 AM
Don't use Shared Variables. I have had nothing but issues with them. Create dedicated TCP/IP connections or use UDP to send out your data. If you are trying to broadcast your data to many myRIOs, UDP is probably the way to do.
03-01-2020 09:04 AM
Thanks for the tips! The problem is that this is an university work and they say I must use shared variables...
03-01-2020 04:26 PM
Without seeing your code, without knowing anything about the network connection, and without knowing how you are setting up the Shared Variables (for example, what Target is hosting the Shared Variable Engine).
How are you communicating with your myRIO? Are you using TCP/IP? Is it working? Are you using USB?
If this is a Homework question, talk to your Instructor and get some clarification.
Bob Schor
03-02-2020 05:22 AM - edited 03-02-2020 05:23 AM
I am using the MyRIOs IP adress and it works but it takes like 30s to receive the information from the other myrio. Everything is through Wi-Fi.
03-02-2020 10:15 AM
Shared variables usually have buffers on by default (50 elements, server and client side). I suspect that either the read/write rates are such that it appears that the data is delayed (read rate is too slow compared to write rate) or there is some connectivity issue interfering with the read portion of the application, slowing it down.
Can you monitor your variables using Distributed System Manager (should be included in your LabVIEW install)? Take a look at that and see if your variables are updating close to real time. You may first need to go to "Actions >> Register Computer..." for your targets to show up there.
The only other thing I can think of is that 30 seconds sounds like a default timeout for something. May want to take a look at other functions in your read/write loops to see if they are interfering with the intended loop timing.