07-01-2014 01:30 AM
Hi forum,
i am creating a power monitoring application in labview i would like to implement a event list. One of the events will be the rms value that i am calculating continuously if the rms value drops the event should get recorded in an array or shift register with time and date value. Later in logging state the data of the array or shift register should be written to a text file.
I have problems putting this into a program, i attached my first idea. i calculate the rms if the value is less than a nominal value the indicator change and this change (Time and String "rms min exceeded) should be stored in an shift register. Then in another state the data will be read from the shift register and written into text file.
Someone has a idea how i could do this thanks a lot!!
Martin
07-01-2014 07:20 AM
What is wrong with what you have?
The only thing I am noticing is that you are overwriting previous logs in your string. You need to concatinate your new errors to what you already had stored in the shift register.
07-02-2014 03:51 AM
Hi Martin,
I think you made a good apprach. You have chosen the right elements and structures. You are using the state machine, theoretically you could use the template "Producer Consumer design pattern (Events)". Then your user Interface will enver be blocket and so on. In this case you can esily react on user events. In your source code, you have to make sure that the stop case is executed, this is nod done yet for example.
Best Regards
07-02-2014 03:55 AM
and think about a timing if you are using a simple state machine. Use the wait (ms) vi to make sure, that your processor has a fixed amount of time for executing other applications.
07-02-2014 10:25 AM
Hi crossrulz,
thanks for your help. Yes thats one issue i have how I make it to dont overwrite the shift register entry? Do you have some ideas?
Martin