PLC Experts,
I have written an RSView32 application that generates a CSV file based on a trigger from the PLC. Each day a new file is created and data is logged to that file after each test cycle of the machine (about once every 5 minutes). The majority of the time all works well.
However, after reviewing the data files 1 out of every 10 or 12 files is filled with corrupt data. Opening with Notepad reveals gibberish characters.
Here is a section of the code that appends to the file.
Sub AppendtoIndivRejectFile()
Open ATDFile For Append Access Write As #1
Print #1, gTagDb.GetTag("JULIAN_DATE"); ",";
etc.......
Print #1, gTagDb.GetTag("IND_C_5_SEL"); ","
Close #1
End Sub
ATDFile is a string containing the filename.
Has anyone run across something like this?
Thanks in advance for your help.
Rickmmmmm
I have written an RSView32 application that generates a CSV file based on a trigger from the PLC. Each day a new file is created and data is logged to that file after each test cycle of the machine (about once every 5 minutes). The majority of the time all works well.
However, after reviewing the data files 1 out of every 10 or 12 files is filled with corrupt data. Opening with Notepad reveals gibberish characters.
Here is a section of the code that appends to the file.
Sub AppendtoIndivRejectFile()
Open ATDFile For Append Access Write As #1
Print #1, gTagDb.GetTag("JULIAN_DATE"); ",";
etc.......
Print #1, gTagDb.GetTag("IND_C_5_SEL"); ","
Close #1
End Sub
ATDFile is a string containing the filename.
Has anyone run across something like this?
Thanks in advance for your help.
Rickmmmmm