05-07-2025 09:35 AM
Hi, I have a problem where I tried different ways and is not working and it doesnt make sense why it is not working. There is a project with 5 actors but the problem here is between 2 actors. The calling actor is caller User Interface and the nested actor is called Logger. Now I want to send two data from User Inteface to Logger and store in the Loggers object cluster data. They are Logging Path and Logging Header. So in Logger I created a method VI called Write Logging Path and Header and then created a message out of it.
And I have wired it to the VI input and then created the message out of it.
Now what I did in User Interface is two things.
1) I stored the Nested actor i.e Loggers enqueuer as private cluster data of User Interface and then created a VI to bundle it and then created a message out of it and initialised the program by launching the nested actor and adding to the bundle.
This happens in the actor core of User Interface class before call Parent method. So when everthing is done, I believe the Logging actors enqueuer should be among the private data of User Interface.
2) As step two I created a VI which uses the loggers enqueuer and connect to it the Send message created from above in the logger class. Then I saved this VI as LoggingPathAndHeader2Logger and I created a send message from this.
This is the VI. Now in the User Interfaces Actor core there is a helper loop and I have a button called start and when I press start a bunch of things happen along with using the self enqueuer of User Interface to execute the send message of LoggingPathAndHeader2Logger.
That is this. But the logging path and header is not going to the logger. How I know that is I put front panel.open in the method VI and when I run it, I will see open. And there is nothing there. Now the crazy thing is I did the same thing with another nested actor. Again User Interface is the calling actor and the nested actor is called DAQ and I pass a string data Device Port from User Interface to DAQ in the exact same way. It works there but not here. Thats what I dont understand. What could be causing this error. I have no idea. Incase the pics are not enough I have uploaded the whole project as a zip file, but here there are so many VIs and messages, it will be too complicated to browse through it. But if u want u can check it out mainly the actor core of the User Interface and the 2 VIs, one in user interface and other in logger which i mentioned above and its messages. You can check them out instead of checking the whole program. But if anyone can give me an idea of why this is happening, kindly let me know. I am not an expert in actor framework. Thank you.
05-07-2025 11:31 AM
That is this. But the logging path and header is not going to the logger. How I know that is I put front panel.open in the method VI and when I run it, I will see open. And there is nothing there.
What about adding a simple breakpoint in your receiving method VI instead?
check if Send LoggingPathAndHeader2Logger.vi produces an error.
Generally I would suggest to start editing your icons.
05-07-2025 11:44 AM
If the diagram opens, then the message was received, just with empty data. Now you have to figure out why the data is empty.
I put dummy data into ParameterFile:Pre-Launch Init because there is no configuration file, which leads to an error and the User Interface Actor Core not even starting.
Afterwards it worked insofar as the dummy data appeared in the message and UI.
As an aside: you do not need to send the nested enqueuers by message, you can just bundle them into the actor before calling Actor Core.vi. If you create a VI for launching the nested actors, you can relaunch the nested actors if the configuration changes. Ensure that the previous actors are stopped.
You should improve the error handling and create a log file where you write all errors and actor shutdowns.