02-26-2024 02:38 AM
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?
Solved! Go to Solution.
02-26-2024 09:25 AM - edited 02-26-2024 09:26 AM
@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.
02-26-2024 12:30 PM
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.
02-26-2024 05:00 PM
@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.
02-27-2024 02:06 AM
FYI: an earlier conversation on Actor Framework and debugging: https://forums.ni.com/t5/Actor-Framework-Discussions/How-to-probe-private-data-of-actor-when-running...
02-29-2024 02:07 AM
Thank you very much! Very clear answer.
02-29-2024 02:10 AM
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.