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 Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

First try on Actor Framework

Thank you for your patience, and your great advices, Paul. Coming back soon.... Smiley Very Happy

 

Francesco

0 Kudos
Message 11 of 15
(873 Views)

Hi Paul,

 

I'm here with another question. Often I build application with a safety loop that monitor the states of a safety inputs connected to an emergency button, if the user press the button all the relè, power supply and any other dangerous device stop working.

Can I build this in the actor model? I was thinking of an "Emergency Actor", launched by Root Actor, that monitor the input for a fault; if its occur it send back to the Root Actor the Error Message that the Root Actor send to its direct childs and this, on cascading, to their respective childs until the message hits the Device Actors involved.

 

Could this be a solution?

0 Kudos
Message 12 of 15
(856 Views)

(If this is a safety E-Stop I hope there is a hardware circuit in place that is being interrupted and you arent relying on software for safety!)

 

But to answer the question, sure - although you are starting to get more into 'real' application design, where spending some time really thinking about how you want your actors to interact should start to come into play, and there are tons of different ways to approach it. If I was going to design an application like this, I would probably have a central controller, that handles interaction between actors - if it received an emergency stop message, rather than forwarding that message, I would just have it send a 'normal' device stop to the actor, rather than forwarding the message, so that the device actors do not need to be coupled in any way to the various emergency states of the system. 

0 Kudos
Message 13 of 15
(847 Views)

(Of course, these are redoundant actions on emergency press, we always have a certified security PLC that handle the security system. Still the software must standby if the button is pressed.)

So you will dinamically call and stopped the Actors involved when the test start and finish. Am i right?

 

0 Kudos
Message 14 of 15
(842 Views)

You can - I meant more like sending a message to the actor to tell it to go into an idle/stopped mode, rather than stopping the actor completely. Generally I launch and keep most of my actors running through the lifetime of the application, but many others do not, and instead do what you said where actors are starting and stopping throughout the application.

0 Kudos
Message 15 of 15
(832 Views)