Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Actor Framework on compactRIO Real Time

I am really interested in using Actor Framework on a real time system, specifically compactRIOs.  I have had a lot of success in running AF as part of a Windows application, and have a moderate understanding of how it works.  However, when I go to run it as part of a real time project, I run into trouble.

There seems to be something in the Launch Actor.vi that causes the compactRIO to lock up.  After you deploy the project, LabVIEW gives an error that it can't connect to the compactRIO, our project doesn't run, and the only way to get the compactRIO responding again is to pull the plug.

I have tried to boil this down to as simple of a startup sequence as I can.  If I try to run a VI with just the Launch Actor.vi in it, it still crashes in the same way.  As a debug, we created a project from scratch that launched a simple VI using the start asyncronous vi used in Launch Actor.  We started it with the same options (reentrant, fire & forget) that Launch Actor uses.  It was able to run fine, and the simple VI inside ran as it was supposed to.  My question is not only if anyone has an answer for why this is happening, but also if anyone has any ideas as to where to start looking for what's causing it to lock up?

0 Kudos
Message 1 of 21
(8,673 Views)

I am very interested in someone working with this on real time systems, also! I'm pleased to hear someone (you) is working with it. There's a couple folks around NI who are planning to do something, but haven't yet. It's outside of my personal domain, so I don't have any direct knowledge to share with you. If I hear from anyone else, I'll point them toward this thread.

In the meantime, please keep me aprised (through this forum) of anything you discover about your hang.

0 Kudos
Message 2 of 21
(4,483 Views)

Any actions placed before the Launch Actor.vi will not run either, it seems to be when you define the static reference to the Main Actor.vi. Interestingly, if you disable the static reference to Main Actor.vi in Launch Actor.vi, it will not crash the compactRIO.  (Obviously nothing works, but at least it doesn't die!)

0 Kudos
Message 3 of 21
(4,483 Views)

If you disable reentrant execution on the Main Actor vi, you can successfully launch an actor and have it respond to messages, etc.  However, this makes it difficult to have multiple actors communicating with each other, correct?

0 Kudos
Message 4 of 21
(4,483 Views)

Without looking at the code, I'm guessing it uses a strictly typed reference to the actor core VI wired into the type input of the OVR primitive. Try replacing this with a static reference which only has the conpane info and see if that helps. The easiest way is probably either to create one from the strict ref (create indicator, change to constant) or to create a constant from the terminal and then right click and use the browse section to find the connector pane pattern you need.


___________________
Try to take over the world!
0 Kudos
Message 5 of 21
(4,483 Views)

Although this stops it from locking up the cRIO, Launch Actor returns error 1026, invalid VI Reference, and the code does not work.

0 Kudos
Message 6 of 21
(4,483 Views)

I'm assuming you simply replaced the strict ref with the new one. That won't work because you still need the reference to the VI in order to get the VI's name. Only the reference going into the type input should not be linked to the VI.

I don't even know for sure if this will help, but I have seen cases where using the strict ref causes LV to lock the class, so this is probably something which is worth trying.


___________________
Try to take over the world!
0 Kudos
Message 7 of 21
(4,483 Views)

Ok, I changed the code so that the strict ref was going into the name propery node and the conpane was going into the type terminal on the OVR.  This causes the cRIO to crash...

0 Kudos
Message 8 of 21
(4,483 Views)

Now we're talking a crash... I'm going to put you in contact with a PSE who can help you upload your code along with specs of your CRio so we can investigate this further.

0 Kudos
Message 9 of 21
(4,483 Views)

@Aristos, we'd be happy to help...

Whoops, I was wrong, the following doesn't work...  I got back from lunch and nothing worked anymore.

However, we've found a quick solution, and that is to use 2010 backport that Kurt Grice put together.  Because we've got deadlines to meet, we are stuck with this.  If that PSE would just try to get a VI together with just that Launch Actor.vi in it, they would be able to replicate the circumstances...

Message was edited by: psyklopz

0 Kudos
Message 10 of 21
(4,483 Views)