Jongmin.Kang Posted May 25, 2018 Report Share Posted May 25, 2018 Hi all. I just started studying the actor framework. I'm trying to do basic coding in this and the ni community while learning the basics. I would like to make a continuous measurement and logging system using the actor framework, but I'm in trouble. The way I originally code it is to put the 'read' function inside the state machine and pass the output of the function to the 'save loop' using the queue. Here are the questions 1. Is it correct to code in actor core to use some continuous action or a while loop? To be precise, is it necessary to create an actor core to write one 'read' function? Questions 2. If I do not use the actor core and put 'read' in the method vi and measure it for the amount of time I want it, I think I need a 'message' to continue passing automatically, is there a function that does such a function? Quote Link to comment
jacobson Posted May 25, 2018 Report Share Posted May 25, 2018 1 hour ago, Jongmin.Kang said: Here are the questions 1. Is it correct to code in actor core to use some continuous action or a while loop? To be precise, is it necessary to create an actor core to write one 'read' function? I don't know what the recommended way of doing what you want is but you can definitely put a second while loop in one of the children's actor core. You have to make sure you have a way to stop that while loop though. Maybe just put an event structure with a specific timeout and send a user event to stop the loop (and possibly another message to change the timeout)? 1 hour ago, Jongmin.Kang said: Questions 2. If I do not use the actor core and put 'read' in the method vi and measure it for the amount of time I want it, I think I need a 'message' to continue passing automatically, is there a function that does such a function? http://zone.ni.com/reference/en-XX/help/371361P-01/lvcomm/af_td_send/ Quote Link to comment
smithd Posted May 25, 2018 Report Share Posted May 25, 2018 I don't know if its for continuous measurements, but Eli's example here is I think a nice reference to look at: https://forums.ni.com/t5/LabVIEW-Development-Best/Measurement-Abstraction-Plugin-Framework-with-Optional-TestStand/ta-p/3531389 Quote Link to comment
drjdpowell Posted May 25, 2018 Report Share Posted May 25, 2018 Sounds similar to this current conversation on the AF group. Quote Link to comment
Jongmin.Kang Posted May 28, 2018 Author Report Share Posted May 28, 2018 jacobson, I heard your advice, I tried to code it by continuing 'read' through the Time-Delayed Send Message and ending the message by releasing the notifier. I am very grateful to you. Quote Link to comment
Jongmin.Kang Posted May 28, 2018 Author Report Share Posted May 28, 2018 smithd, It looks like a really good reference, but I did not run it because I did not have some vi even after downloading it. Thanks for the help! Quote Link to comment
Jongmin.Kang Posted May 28, 2018 Author Report Share Posted May 28, 2018 drjdpowell, that's right. It's very similar to what I wanted. It really helped a lot! Thanks! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.