From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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 Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

GUI - Actor Framework - Decisions

Hi there,

I think I am pretty clear about how to use the Actor framwork's and I would like to have some guidance about how to use the framework in my project.

The attached VI is a very simplified version of the actual layout.

Basically, there is only one device performing different types of measurements, sending TX and receiving RX messages through CAN and LIN buses.

My development strategy is that I intend to create an actor for everything related to the hardware measurements that I consider as the measurement bench.

This hardware will have to perform some asynchronous operations and will eventually send some messages / commands to others actors.

Those commands will contain for instance, the stuff (value type of course, I'm not willing to have messages containing references) related to the information do display to the end-user in different VIs.

The other actors representing different VIs in some containers (mostly for user interactions) will send and receive commands to this actor.

In short, I was thinking about creating about 10 actors and more:

  1. The most important one: the Bench (containing the settings and parameters in the class cluster) and performing the actions related to the hardware: inputs and outputs and inform other actors about what is (if doing performing actions synchronously) or what is available (if some things are asynchronously in a loop).

    Although, I am not sure if splitting the concerns of the Bench purposes into additional actions is really wise or not (especially since it will embed a VISA reference), it will probably require to additional lock accros the different Bench related actors with something like below:
    - Bench Master Actor (to send and receive message to the enduser actors and dispatch the work with the two other Bench related actors)
    - Bench Synchronous Actions Actor
    - Bench Asyncrhonous Actions Actor

    It's also in charge of receiving orders to start, stop, notify, performing actions asynchronously and / or synchronously.
  2. Actor (especially the core as): VI ML
  3. Same strategy for VI BRC
  4. Same strategy for VI TRC
  5. Same strategy for VI 1
  6. Same strategy for VI 2
  7. Same strategy for VI 3
  8. Same strategy for VI 4
  9. Optional: VI TM ... not really necessary I guess except to go with full actor everywhere..

Also, in some Actor Framework related examples, I'm not really sure that creating a library for each actor is really necesserary, is it?

Thank you.

-
Amit
CLAD
0 Kudos
Message 1 of 5
(5,536 Views)

Hi,

In general your idea looks good to me. Some questions:

Why are VI ML, VI BRC, VI TM  and VI TRC separate actors? Why not create a GUI actor that has a subpanel for VI1-4?

Do VI1-4 have to be open at once or is only one run at a time? are they known in advance?

About the library - I don't have the actor in a library unless I intend to create a packed library from it. I use virtual folders instead.

Good luck!

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
Message 2 of 5
(3,761 Views)

Hi Danielle,

Thank you for your reply.

Hi Danielle,

- Thanks for your reply.

Why are VI ML, VI BRC, VI TM  and VI TRC separate actors? Why not create a GUI actor that has a subpanel for VI1-4?

- We'd rather like having them separatly, mainly because they do have very different purposes.

               VI ML's status is depends on VI BRC.

               VI TM, VI TRC, VI BRC are independent.

Do VI1-4 have to be open at once or is only one run at a time? are they known in advance?

-Only one of among them is actually displayed but all of them must be loaded when the program is starting and yes they are know in advance (the updates are independent of selection in VI TM).

Thank you.

-
Amit
CLAD
Message 3 of 5
(3,761 Views)

As you have a number of subpanel actors, take a look at Simon's Win8 UI Demo, he has a viewable actor there that could help you get started.

Good luck,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
Message 4 of 5
(3,761 Views)

Hi,

Thank you that is helpful.

-Amit

-
Amit
CLAD
0 Kudos
Message 5 of 5
(3,761 Views)