Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

pipeline program in AF

     I want to use pipeline program in AF ,but I just want a single actor to handle multi-tasks parallelly .

     Now I use AF in myRIO, i need to process image (from usb camera) .There are : acquire image , Image Pre-processing,

image analyse .I create a vision class to handle these task, but I want to vision class can handle these task in same time ,

so I thought of pipeline programming, but as I know , actor do all task in 'do.vi', so i cann't do these task in same time .

     I don't want to create other actor class ,so if there are some other selection?

0 Kudos
Message 1 of 5
(4,038 Views)

I *think* I understand your question. There is a bit of a language barrier, but I'll do my best.

I think the answer is this:

  1. In your Actor Core.vi, create three parallel loops, and set up the usual pipeline/producer consumer relationship among these three loops (using queues).
  2. In the first loop, do acquire, then use a queue to pass the image to the second loop.
  3. In the second loop, dequeue the image and do the preprocessing. Then use another queue to send the image to the third loop.
  4. In the third loop, dequeue the image and od the analysis. When finished, send a message containing the completed analysis to your actor's self enqueuer.
  5. In the Do.vi of that message, do whatever you need to do with the finished analysis.

Make sense?

Message 2 of 5
(3,198 Views)

it is  a good suggestion! But  these three parallel loops in 'actor core.vi' cann't communicate with my other module easily like 'do.vi'-- in details : I cann't send msg to these parallel Loop, though i know i can let 'vision.actor' contain these parallel loops' queue. I am just lazy .

I just want actor can do parallel task without complicity .Maybe I am just lazy !but thank U!

0 Kudos
Message 3 of 5
(3,198 Views)

> Maybe I am just lazy !

Trust me -- you would not be the first programmer to say, "I just don't want to write all that code." There is a lot of weight involved in what I just described. I hope someday to have notations that make this more lightweight. But even if you take the Actor Framework out of the equation entirely, you're still going to have to build a hefty amount of communication infastructure for four loops that inter-connect with each other. What you are attempting to do is a pain any way you slice it.

Still, I'm glad I was able to help. Good luck!

0 Kudos
Message 4 of 5
(3,198 Views)

I would try to determine which tasks you want to have run asynchronously and they need to go in a separate loop. Most likely you need an Application level actor that launches a camera actor and a image processor actor and a UI actor.

I agree with AQ that you will need a certain number of loops regardless of your communication scheme.

Good luck!

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!

0 Kudos
Message 5 of 5
(3,198 Views)