06-23-2014 11:23 PM - edited 06-23-2014 11:35 PM
Hi all
thanks for you post ! Action engine sound interessting, but i have allready the statemachine similar to this in the attachment in a case structure, so i should add to every state another internal state (init, write, close)?
THere are some example how to do this?
Thank you very much
Martin
06-23-2014 11:44 PM
An action engine is simply a VI that is designed to perform a single task very the same way with little vairation. In your case the action engine would take in the time, currently entering state of the state machine and the file to which you wish to log the data. Once you have this VI working all you need to do is slot it in the beginning of your various states so that it records the new state before performing any action within the state.
06-24-2014 12:30 AM
so basically i will create a vi with three cases and a new state in my state machine so every time i change the state the state machine gets first in the action engine state writes the state and timestamp into a file and then continuous?
06-24-2014 02:45 AM
Hi,
these AE are also called FGV (Functional Global Variable).
Regards,
Philipp
06-24-2014 03:45 AM
@Wendler wrote:
Hi,
these AE are also called FGV (Functional Global Variable).
Regards,
Philipp
Yes and no, i make the distinction that a FGV only has get/set functionality, making it a data storage or a Global variable as a VI. An AE can be more advanced, as in this case writing to disk and having more states, basically making it a 'light object'. Not all agree with me on this distinction though. 🙂
/Y
06-24-2014 03:45 AM
Hi,
yuo should use the AE/FGV like the attached example (LV 2013)
Philipp
06-24-2014 03:48 AM
06-24-2014 12:00 PM
Hi all,
thanks a lot for your help and the examples thats great.
I tried using this example but i get an error 1 code in closing the txt file "AN input parameter is invalid" someone has an idea what could be the reason for this and how i could fix it.
Thanks again
Martin
06-24-2014 12:04 PM
You need to call the Open File case of that Action Engine before your loop. And also make sure you call the Close case after the loop.
06-24-2014 12:38 PM
Hi crossruiz,
thanks for your fast answer! opening the text file works now i create the header but i am still stocking how i could implement the vi into my application. I think i wired something wrong implementing the vi as the operation state is not changing.
Martin