LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Statemachine Eventlist

Solved!
Go to solution

Hi foum,

 

i using a state machine with Labview (states: start, recording, logging, report, stop) I would like to have a report in a text file with state changes, date and time. 
What would be a great way to do this?

 

Example:

Time         

00:00:00  Start

00:01:00  Recording

00:02:00  Logging

00:02:30   Recording

...

 

 

Thanks and best

Martin

0 Kudos
Message 1 of 24
(3,210 Views)

Are you aiming to have event driven recording (i.e. when a user presses a button) or just have it recording the time that it enters and exits each of your states?

 

If you know where it will be exiting each 'loop' of states from then you could simply use a case structure that is called at the end of the loop when the "start recording", "stop recording" "exit" states are called. This isn't very tidy for expandability however.

0 Kudos
Message 2 of 24
(3,203 Views)

Hi ogk.nz 

 

thanks for your answer. For me would be ok just recording the time that it enters and exits each state. 

I was thinking to save the states with timestamp somehow temporarily in an array then in recording write them to a file. 

Some ideas?

0 Kudos
Message 3 of 24
(3,199 Views)

Create an AE (Action Engine) with Init, Write and Close functionality, Init opens a log-file and stores the ref in a shift register, Write writes time and input string (which you'll put in each state) and close closes the file.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 24
(3,167 Views)

The Action Engine sounds like the best route.  You can also store the previous state in the Action Engine so that if you are in the same state you don't have to record.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 24
(3,140 Views)

I've used a logging loop as a another consumer loop before so all the logging overhead doesn't affect the other loops.  The logging file ref was opened in the init state and closed in the exit state.  How does this compare with the Action Engine logging?

 

Thanks.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 24
(3,130 Views)

@Billko i did just that the other week, an AE which held file ref and user event ref (as outputs) and a Message as input. A logging loop writes to file when event happens and the Message command sends the event. Depending on how often the logging happens and the other loops speed requirement it can be the better solution.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 7 of 24
(3,127 Views)

@Yamaeda wrote:

@billko i did just that the other week, an AE which held file ref and user event ref (as outputs) and a Message as input. A logging loop writes to file when event happens and the Message command sends the event. Depending on how often the logging happens and the other loops speed requirement it can be the better solution.

/Y


Thanks - that is exactly the info I needed.  I knew it was an "it depends" kind of an answer, and you answered specifically what it depended on.  (And I strongly suspected it was what you said it was.)

 

Again, thanks!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 24
(3,117 Views)

Hi guys,

 

thanks a lot for your advices but i am realtivy new working with Labview, there are some example how to do this with an action engine. Or how i will creat an action engine in labview.

Thanks 

Martin

0 Kudos
Message 9 of 24
(3,110 Views)

Action Engine


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 24
(3,102 Views)