Chennai LUG (CHNLUG)

cancel
Showing results for 
Search instead for 
Did you mean: 

Any Possibility to logging Indicator updation History?

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, i am expecting my test file should contain following items

 

29/03.2021 01.13 PM Oil Level is low

29/03.2021  02.13 PM Oil temperature is high

 

how to achieve this task?

0 Kudos
Message 1 of 4
(2,815 Views)

Hi gowthameie,

 

Please attach the your piece of code or a screenshot of the same to understand what you have tried and what is the problem in achieving your requirement.

 

It would help the community members to understand it better and provide suggestions.

 

Thanks.

 

Best Regards,
Muruganandhan S,
Certified LabVIEW Architect (CLA)
ISTQB Certified Test Automation Engineer
0 Kudos
Message 2 of 4
(2,762 Views)

Shared the code for your reference

0 Kudos
Message 3 of 4
(2,746 Views)

Hi Gowthameie,

 

You should use "Set File Position Function" available in File IO function programming palette to achieve this. It moves the position of the current file mark of the file identified by refnum to the position indicated by offset (in bytes) according to the mode in from. You can use "end" this will set the marker at end and the logging will be appended at the end.

 

Refer to following example code (you have create text file before running this).

 

writetotext.png

 

I hope this helps.

Regards,
Dharani | CLA | CTD
0 Kudos
Message 4 of 4
(2,729 Views)