Jump to content
rscott9399

Using a network published variable to control an event structure on the RT side of a RIO

Recommended Posts

Hi all

 

Trying to use a network published variable to control the event structure of something in an RT loop of a rio project. 

When i try and add an event, it wont let me have access to that variable.

Any ideas?

Maybe create a local variable?

 

 

 

Share this post


Link to post
Share on other sites
13 hours ago, rscott9399 said:

Hi all

Trying to use a network published variable to control the event structure of something in an RT loop of a rio project. 

When i try and add an event, it wont let me have access to that variable.

Any ideas?

Maybe create a local variable?

Generally RT code doesn't have a UI, and as mentioned you have to use a special add-on to use events with shared variables. The usual equivalent is to use a messaging tool to handle communication and generate events in your RT code. I personally use HTTP and/or websockets since its free and there are many clients out there. I believe there is a tcp handler for drjdp's messenger lib (https://sine.ni.com/nips/cds/view/p/lang/en/nid/213091), actor framework has a networking addon, and for quick and dirty, AMC (https://www.ni.com/example/31091/en/) works.

 

To put it another way, where you might use a UI event (queue) structure on a windows machine, you would typically use asynchronous I/O (eg tcp, udp, serial) to feed a queue on the rt system.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.