LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Correct use of the actor framework?

Hi all,

I was hoping for some advice before I start developing an application.  I want to try using the actor framework so I thought I would give it a go for this project.

It is a relatively simple application:

Image1.png

Update rates are at 1Khz max so the cRIO is in scan mode.  The cRIO will communicate with the host using 2 network streams.  One for sending and one for receiving data.

I want to use actor because there will be 3 screens used.  One to display the digital inputs, one to display the analogue inputs and one to set the digital outputs.  I thought this would be a good chance to have a go at using the framework because I could have 3 IO actors with one on each screen..  My initial ideas are as follows.

 

Host Application

  • Handle all the communication to the cRIO
  • Send any data it receives from the cRIO to the:
    • Digital out actor as a message
    • analogue out actor as a message
    • Input Data Logger actor as a message
    • Send any data it receives from the digital out actor to the:
      • cRIO
      • Ouput Data Logger actor as a message

Image2.png

I have attached the project file I am working with.  I have knocked something up using tabs which gives an idea of how the UI will look for each screen.

 

I’m really not sure if this is even remotely close to the way to do it.  Help please.

Lewis Gear CLA
LabVIEW UAV

0 Kudos
Message 1 of 2
(2,997 Views)

I'm not sure you need to split all of the outputs into separate actors. You could potentially wrap those up into one actor and create a method or small set of methods for each output type. Or, you could create a "Physical I/O" actor, and have that talk to the AO, DO, AI, and DI...then your top level application only needs to send messages like "DO : True" to the Physical I/O actor. Essentially, it abstracts it one more level, and might make things easier in the future if you decided to add other physical I/O (other cards, USB devices, etc.). This way, the Phsical I/O actor could handle the changes, and your top level application remains intact.

Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 2 of 2
(2,923 Views)