03-29-2021 04:24 AM
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?
04-04-2021 09:36 AM
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.
04-09-2021 04:26 AM
Shared the code for your reference
04-13-2021 11:15 AM - edited 04-13-2021 11:16 AM
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).
I hope this helps.