08-14-2014 09:36 AM
Is there any way I can send data in real time between the myRIO and the program? Is there a way I can have the user input values and have the program respond without having to stop and restart the program, or poll for changes? You mentioned something about User Events earlier...
08-14-2014 09:42 AM
I will describe high level what I mean, and someone else can give the details (I haven't done tons of cRIO stuff yet)
So there exists a few ways to send data to a cRIO device like a myRIO. Shared variables, RT FIFO, UDP, TCP etc... The easiest seems to be shared variables and works well for small amounts of data like a value change or a boolean saying to do something. Here is an article talking about some options.
Somewhere on the RT you will be polling looking for new data on that interface. When you get data you can then act on it. That can mean sending the data in a Queue to the part of the application (still on the RT) that needs it, or it can mean just using it right there. A User Event is just a glorified Queue and works the same way.
Poll for new data, act on that data.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-14-2014 09:53 AM
The program is actually on the myRIO. If you want to make another VI that runs on your desktop that can communicate with the myRIO, that is an option. I would recommend using Network Streams to send the data down to the myRIO from your desktop. It is a network connection after all.
I have pretty much deemed shared variables evil in almost all aspects. Yes, they do have their place. But they are way too easy to abuse since they are not expandable at all. It's the same argument as local variables.
08-14-2014 10:09 AM
@crossrulz wrote:
I have pretty much deemed shared variables evil in almost all aspects.
This is why I opened with "I am not a RIO expert" because all I know is from reading about them and a couple hands on sessions.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-14-2014 10:35 AM
@Hooovahh wrote:
@crossrulz wrote:
I have pretty much deemed shared variables evil in almost all aspects.
This is why I opened with "I am not a RIO expert" because all I know is from reading about them and a couple hands on sessions.
They are not limited to RT. I have used them in Windows and between desktop computers. If you really want to get an earful, go ask Stephen Loftus-Mercer what he thinks about them.