Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use the AF like PLC ??

I need help with implementation AF like PLC for my app. For example my app has 4 pneumatic cylinders (manipulator) . Manipulator run on 150 ms and giving commands for cylinders. Cylinders run on 50 ms.

 

It is possibly use the AF in real time control ?? And for continuous execution ?? Because  that cylinder has state: check position (is default position OK) -> Move -> Check position (cylinder change position) ->stop or retry 😉

Download All
0 Kudos
Message 1 of 11
(6,820 Views)

Yes, the AF works on real time systems and can be used for control. You can have a high-priority timed loop running on your Actor Core.vi and use RT FIFO to communicate between that loop and the message handling loop. I'm not sure what kind of detail you are asking for.

0 Kudos
Message 2 of 11
(5,063 Views)

Ok so my question is:

i have 4 cylinders (actors) and i want composition manipulator with this cylinders. And manipulator must working in sequence: up->left->down->up-> etc. And cylinder has also sequnce: position-> (default pos) -> move -> position (new pos) and after go to stop or if was timeout send error and retry go to default position if is OK go to desired position again. Cylinder has 2 sensors (idle, busy ) and valve for control.

Caller send to cylinder go to forward or backward (parameter direction) and than cylinder start its sequence. I want check position cylinder every 50 ms. If cylinder is in desired position send to caller: "process is done".

Do you have any app for AF control ??

0 Kudos
Message 3 of 11
(5,063 Views)

No, I do not have any existing app that you can look at that matches your particular setup, nor do I know anyone else who does. Having said that, what you are describing sounds like it should be straightforward to write. You are going to put a Timed Loop into the block diagram of the Cylinder.lvclass:Actor Core.vi and every 50ms, check the cylinder position. The problem you are going to run into is that you have four separate real-time loops (one on each cylinder). That means you are going to need to assign each loop to a separate CPU core of your real time system. Here is some information that may help you program such loops.

This is a "best practices" document that discusses threads, priorities, and execution system (discusses 1 timed loop per core)

http://zone.ni.com/reference/en-XX/help/370622K-01/lvrtbestpractices/rt_priorities/

Timed Loop specific whitepaper, talks about thread pools and isolating the timed loop on specific cores.

http://www.ni.com/white-paper/6583/en

Additional whitepaper that talks about parallel programming patterns, discusses CPU pool reservation VIs, etc...

http://www.ni.com/white-paper/6099/en/#toc6

Here's a link to a document that discusses timing loops so that they play "better" together, but it is less technical and fairly hand-wavy:

http://zone.ni.com/reference/en-XX/help/370622K-01/lvrtconcepts/timing_control_loops/#Timing_Timed_L...

0 Kudos
Message 4 of 11
(5,063 Views)

I need help with identify Actor in my app and how to comunicate with him. My big problem is that i do not know idetify architecture for my app. Because i want create reusable system 😉

So my app has requerements:

-checking pressure in pneumatic system if is not good turn off main valve and send message to controller app "pressure is not good"

-checking  distribution DC24V if is sensor status False everything stop

-control pneumatic cylinders in system, app has 5 cylinders (manipulator has 4 cylinders and 1 cylinder control Door)

-contro signall lights, semaphore has 4 lights (green, yellow, red, blue) this light signalization to operator status of the machine. Frequency 4Hz

-control operator interface, frequency 20Hz

Cylinder has 1-2 valves and 2 sensors for checking position. Checking position with frequency 20Hz.

For checking pressure of pneumatic system app has digital sensor, status is true or false. Check it every 250 ms and than On or Off valve. Frequency 4Hz

Could you tell me please how to create this app in ActorFramework ??

Edit: check pdf there is 3D sketch my machine 😉

Hier is a simulation if part is OK after test.

https://vimeo.com/88663315

Download All
0 Kudos
Message 5 of 11
(5,063 Views)

I think you just want one Manipulator actor that launches four Cylinder nested actors. Manipulator would be in charge of telling each Cylinder which CPU core to use. Each Cylinder would then do its work independently when told to run by the Manipulator.

0 Kudos
Message 6 of 11
(5,063 Views)

The Actor Framework is an asynchronous system.  A PLC is a synchronous system.

The behavior of a PLC is as follows:

1. Scan Inputs

2. Execute Ladder Logic

3. Set Outputs

4. Repeat steps 1-3

In addition, most PLC's allow online edits which allow you to change the program while running.  This is not possible with LabVIEW as it requires deployment.

If you are looking for an architecture that can behave like a distributed system of PLCs, then the Actor Framework would be a suitable architecture.  You will want to use LabVIEW Real-Time for reliabliity, the C series of controllers is highly recommended.

CLA, CTA
Message 7 of 11
(5,063 Views)

LVB wrote:

In addition, most PLC's allow online edits which allow you to change the program while running.  This is not possible with LabVIEW as it requires deployment.

While it is true that you cannot deploy new VIs on the fly like that, it is possible if you deploy new configuration data that contain new instructions... generally implies that your config data is sophisticated enough to express arbitrary programming logic, if that's the degree of reprogramming you need to be able to do.

0 Kudos
Message 8 of 11
(5,063 Views)

Yes this is exactly True. Manipulator speak to cylinder when run. I have idea cylinder has PAF actor he is his manager.

0 Kudos
Message 9 of 11
(5,063 Views)

I would like to know your opinion about this:

When you have got more Cylinders and you are reading their status from one DAQ device then should not be there one Actor which will read (and write) A/DI(O) on this hardware?

After that you could sample all channels in same time (of course is depend on your HW = multiplexed sampling vs. parallel sampling)

Inac zaujmavy projekt.

Nech sa dari.

0 Kudos
Message 10 of 11
(5,063 Views)