LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Any Possible to maintain the history of message displayed in that string indicator?

I want to maintain the separate text file history of Warning /Error Message while doing testing.

 

if Oil level is lower than defined range, in string indicator will display " Oil Level is Low". Similar kind of health monitoring  feature will be maintained during testing.

 

I just want to do logging to  maintain the history of message displayed in that string indicator. Whenever new warning/error message is updating in the string indicator. New Warning/Error Message also to be appended with existing data.

 

 

For example,

 

29/03.2021 01.13 PM Oil Level is low

29/03.2021  02.13 PM Oil temperature is high

 

 i attached basic functionality code for your understanding.

How can i achieve this  task?

0 Kudos
Message 1 of 9
(2,307 Views)

I want to maintain the separate text file history of Warning /Error Message while doing testing.

 

if Oil level is lower than defined range, in string indicator will display " Oil Level is Low". Similar kind of health monitoring  feature will be maintained during testing.

 

I just want to do logging to  maintain the history of message displayed in that string indicator. Whenever new warning/error message is updating in the string indicator. New Warning/Error Message also to be appended with existing data.

 

 

For example,

 

29/03.2021 01.13 PM Oil Level is low

29/03.2021  02.13 PM Oil temperature is high

How can i achieve this this task?

0 Kudos
Message 2 of 9
(2,312 Views)

Hi gowthameie,

 


@gowthameie wrote:

Whenever new warning/error message is updating in the string indicator. New Warning/Error Message also to be appended with existing data.

 

How can i achieve this this task?


Open your log file and set the file position to the end of the file, then write your new string(s) to the file.

 


@gowthameie wrote:

Whenever new warning/error message is updating in the string indicator.

 

How can i achieve this this task?


Write a string when it is different to the previous string…

 

Edit after merging your cross-posts into one thread:

You surely don't want to "Replace or create" your error logfile when you want to maintain a history! Why not use "open or create" instead? You forgot to set the fileposition before writing (aka appending) new data into the file!

 

And what's the point of that Rube-Goldberg? Comparing a boolean value with FALSE is the very same as a NOT - and this NOT is not needed as you can switch the conditional terminal of the loop!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 9
(2,306 Views)

Can you remodify my code and post?

0 Kudos
Message 4 of 9
(2,281 Views)

Along with date and time stamp how history can be maintained?

0 Kudos
Message 5 of 9
(2,275 Views)

Hi gowthameie,

 

I cannot edit your code because I'm using LV2017 right now…

 


@gowthameie wrote:

Along with date and time stamp how history can be maintained?


Use FormatIntoString with a format string like "%<%c>T\t%s\r\n" and wire the current timestamp and your message string…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(2,262 Views)

Lower version file is attached for your reference

0 Kudos
Message 7 of 9
(2,260 Views)

Hi gowthameie,

 

see this:

It doesn't make sense to provide an array of 12 error messages, but only check for two possible errors (IMHO).

And it makes absolutely no sense to index the wrong error messages according to your control labels!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(2,255 Views)

Maybe my Super Error Indicator will work for you.  It's one of the XControls in the zip.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 9 of 9
(2,227 Views)