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.

Actor Framework Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Linked Network Actor Example

This is a simple Linked Network Actor example I created in response to questions about how to use them. There are 2014 and 2015 versions.

This example uses a parent class "Interface" that defines the messages to be sent using the LNA. The methods in the Do.vi are dynamic dispatch and abstract in the Interface class. UI Actor and RT Actor both inherit from Interface and implement the methods.

There are 2 projects. "LNA Example.lvproj" is the PC project. "RT Project LNA Example.lvproj" is the RT example. This is a cRIO example, but you should be able to move the code from the RT project to another target.

I have this set up to run the RT first and then the PC.

All that happens here is a number is sent from the PC to the RT via the LNA. The RT adds a random number (0-1) and sends the result back to the PC for display.

I also implement a child of the LNA Connection Status Msg, which is the LNA's Zero Coupling message.

Casey Lamers


Phoenix, LLC


casey.lamers@phoenixwi.com


CLA, LabVIEW Champion


Check Out the Software Engineering Processes, Architecture, and Design track at NIWeek. 2018 I guarantee you will learn things you can use daily! I will be presenting!

Comments
unclad
NI Employee (retired)
on

Hi Casey,

I've tried to run the example with myRIO target. When it wouldn't work, I found the LNA Connected Status was not correct. It looked like the RT actor didn't send the "Connect" message to the Host actor. I cannot figure out why.

Connection Status.png

CaseyLamers1
Active Participant Active Participant
Active Participant
on

You may have some network settings issues. The LNA uses a pair of network stream connections. One reader and one writer. Windows firewall will prevent connections.

Your PC also needs to have the ethernet adapter used for the connection as the first adapter in the list. You can change the order by:

  • going to the "Network and Sharing Center"
  • then clicking on "Change adapter settings" on the left.
  • then in that window press the Alt button to see the menu.
  • click "Advanced"
  • select "Advanced Settings..."
  • on the "Adapters and Bindings" tab move your ethernet connection to the top of the "Connections:" list.

Hope that helps.

Casey

Casey Lamers


Phoenix, LLC


casey.lamers@phoenixwi.com


CLA, LabVIEW Champion


Check Out the Software Engineering Processes, Architecture, and Design track at NIWeek. 2018 I guarantee you will learn things you can use daily! I will be presenting!

unclad
NI Employee (retired)
on

Thanks, Casey.

It really was caused by the firewall. After I closed the firewall for the private network, it works.

dgd.gomez
Member
Member
on

You can load a compatible version LV 2013? Thank you.

Contributors