LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Any suggested debug skills for Actor Core?

Solved!
Go to solution

As we know Actor Core vi will generate a shared copy while running, so the probe doesn't work as normal. Any suggested debug skills for it?

0 Kudos
Message 1 of 7
(401 Views)

@hello_world_123 wrote:

As we know Actor Core vi will generate a shared copy while running, so the probe doesn't work as normal. Any suggested debug skills for it?


I don't use AF, but normally you'd put a breakpoint on the VI, and that pops up the clone when the breakpoint is triggered. Then use breakpoint manager to toggle the breakpoint(s).

 

Often the same clone is reused, so you don't always have to repeat steps.

 

However, there's no way anymore to stop the code and run the clone standalone. The run button is simply not there. Not sure if that would be useful for AF core, but it sure is for normal VIs...

 

Also, shift+ drag on a diagram should drop the VI with current values as constants on the diagram, but that feature also doesn't work for clones...

 

But you should be able to use probes and retain wire values.

0 Kudos
Message 2 of 7
(337 Views)
Solution
Accepted by topic author hello_world_123

Once you've got it running, you can open the main (non-clone) VI and click View- Browse Relationships- Reentrant Items and see a list of running clones. Click one of those and you'll open the actual Actor Core clone, and you can stick probes in it and do whatever you'd like. It can be confusing if you're launching a bunch though, as the reentrancy setting reuses clones. If you want to view things as a specific instance is starting up, I suggest starting it once so you can get the clone "in memory", then closing it and opening the (closed) clone using the method above. Now you can add probes and, when you launch it again, you'll reuse the same clone that was previously loaded into memory.

Message 3 of 7
(315 Views)

@hello_world_123 wrote:

As we know Actor Core vi will generate a shared copy while running, so the probe doesn't work as normal. Any suggested debug skills for it?


If you are using the actor framework you need to get used to messages as a coding paradigm. In that vain it is a informative task to make a debug wrapper class around the actor base class that has a messaging system that allows you to send the state of your actors (for debug purposes) back up to their parents. At the top most level you can have a message viewer VI that allows you to see the last state of any actor before and/or after any message is processed. 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 4 of 7
(292 Views)
Message 5 of 7
(265 Views)

Thank you very much! Very clear answer.

0 Kudos
Message 6 of 7
(214 Views)

Thank you! It's a good idea to add a message module. But for error debugging, a probe in the field would be more useful and clearer.

0 Kudos
Message 7 of 7
(213 Views)