LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure not executing

Solved!
Go to solution

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...

0 Kudos
Message 11 of 15
(603 Views)

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.

0 Kudos
Message 12 of 15
(600 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 15
(593 Views)

@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.

0 Kudos
Message 14 of 15
(582 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 15 of 15
(575 Views)