LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

AF: Use Timed Loop in Actor Core.vi error -808

Dear friends, I am currently working with AF and I've been presented with a problem using "Timed Loop" in the "Core Actor.vi".

 

The problem is the following, when multiple instances of an AF that contains a "Actor Core.vi" with a "Timed Loop" which is given a "Structure Name" to be able to stop it from the "Stop Core.vi" or another part of the code using "Stop Timed Structure.vi". When this actor, it runs and stops several times, the -808 error occurs.

 

As I have observed, the error occurs when the "Structure Name" of the loop is assigned for the first time to an instance, and later it is assigned to another, this happens because the "Actor Core.vi" is defined as "Shared clone reentrant execution".

 

I can think of several options to solve the problem, such as using the "VI Clone Name" of the "Actor Core.vi", to assign it on behalf of the "Timed Loop", but none of the options pleases me. I would like to know if anyone has found any creative way to solve this problem.

 

I attach a VI that does not use AF and reproduces the same error terms.

0 Kudos
Message 1 of 4
(2,919 Views)

Yeah, you're right, the structure name must be unique. I agree that the the VI clone name would be a good way to go

A 'Creative way' would be to use the self-enqueuer reference (flatten to string) as this is guaranteed to be a unique identifier

0 Kudos
Message 2 of 4
(2,876 Views)

Why don't those options please you? 

 

I usually give my actors names - a string field in the class data that uniquely identifies the actor to aide in debug, especially if I am launching multiple copies of an actor. The launcher supplies the name before launching the actor - Something like 'DAQ 6221 Slot 3 Actor', which I then append to data log entries, errors etc. 

 

You could do something similar, and then flatten the enqueuer and append it to the name - 'Actor X - UID 123' if you wanted to guarantee uniqueness.

0 Kudos
Message 3 of 4
(2,870 Views)

Hi @paul.r, regarding your question: 

 

Why don't those options please you? 

 

I usually give my actors names - a string field in the class data that uniquely identifies the actor to aide in debug, especially if I am launching multiple copies of an actor. The launcher supplies the name before launching the actor - Something like 'DAQ 6221 Slot 3 Actor', which I then append to data log entries, errors etc. 


I totally agree, it's the same method that I use to identify the actors.

 

With respect to the example you have provided, I will try to put you in situation. Suppose we have a system with 6 Slots, with the following names:

 

'DAQ1 Slot1 Actor'
'DAQ2 Slot2 Actor'
'DAQ3 Slot3 Actor'
'DAQ4 Slot4 Actor'
'DAQ5 Slot5 Actor'
'DAQ6 Slot6 Actor'

 

And the system only uses 3 Slots at the same time, being able to make a recorfiguration to change the modules that are being executed. That is, you can start from an initial situation, where the actors are running:

 

'DAQ1 Slot1 Actor'
'DAQ2 Slot2 Actor'
'DAQ3 Slot3 Actor'

 

And without stopping the application you decide to change the actors:

 

'DAQ4 Slot4 Actor'
'DAQ5 Slot5 Actor'
'DAQ6 Slot6 Actor'

 

The situation would be the following, when started

 

                 Actor Core.vi                       User Name         Structure Name

...: Actor Core.vi:0000001 (clone) | DAQ1 Slot1 Actor | DAQ1 Slot1 Actor
...: Actor Core.vi:0000002 (clone) | DAQ2 Slot2 Actor | DAQ2 Slot2 Actor
...: Actor Core.vi:0000003 (clone) | DAQ3 Slot3 Actor | DAQ3 Slot3 Actor

 

And when the system is reconfigured

 

                 Actor Core.vi                       User Name         Structure Name
...: Actor Core.vi:0000001 (clone) | DAQ4 Slot4 Actor | DAQ4 Slot4 Actor
...: Actor Core.vi:0000002 (clone) | DAQ5 Slot5 Actor | DAQ5 Slot5 Actor
...: Actor Core.vi:0000003 (clone) | DAQ6 Slot6 Actor | DAQ6 Slot6 Actor

 

When reconfiguring the system, the error -808 occurs, because the "Structure name" of the "Time Loop" can not be reconfigured, for this reason, the proposed solution was to use the "VI Clone Name" of the "Actor Core.vi", but it complicates the management of the Actors.

 

Regards.

0 Kudos
Message 4 of 4
(2,842 Views)