I made a program that contains a state machine, and I want to generate an error report in a TXT file. But what I want to do is book a special area in the txt file For each of the stages of the state machine such as the first step in the error report will occupy the line 1 to line 10 txt file.
I want to know if it is feasible to LabVIEW or not, if yes how can I do?
Yes you can use LabVIEW to do this. You could make different arrays of strings and when you are done writing to the array save them all every time.
i send you a demo program
what i want is to creat a error rapport andfile save it in a TXT file
for exemple whene the user push the bouton "prog pix" we excute the state machine and if there is an error save it into the txt in a specifie area for exxemple from line 1 to line 10 whithout delete the other line of the file
I've tried to make an example along the lines of the other advice given in the thread.
This is just a basic example which I hope will help you get started. You could also use a single 2D array of strings (as opposed to multiple 1D as in the example) and use the Enum value to select which row to update - this is probably more scalable than my solution here.
If you have any questions I'm happy to help!
Try this little gizmo I keep around.]
Just put it on the error chain- it logs up to Log max (10) errors to Error Log.txt in the default data directory. The newest error is on top in the file
thank you for your answer, but in my vi in every stage i've different 1D arrays
i send you a screen print to see un exemple