[Snippet of code in first response which throws the error]
Hi,
I'm creating a program for a machine that should test our products. The testing sequence is complete but I am unable to log the data.
I'm able to create a folder and a file to write to. But I'm unable to write to the file.
The filwr FB gives me an error on eError of value 1. At the moment I'm at a loss, any help would be appreciated.
The code below ends up at ManagerState 90 with POU_ERROR = TRUE and ErrorAtState = 42 with State_eError = 1.
1 is not present in the Error ENUM of the CAA_File library hence the reason I'm posting this.
I'm running this on a M241 Schneider Electric PLC in SoMachine V4.3. I need to revert the CAA library to the v3.5.3.0 instead of v3.5.3.132 because otherwise the PLC throws 2 unresolved references: FILE_CLOSE and FILE_DIRCLOSE.
Last edit: lmdejong 2020-05-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
[Snippet of code in first response which throws the error]
Hi,
I'm creating a program for a machine that should test our products. The testing sequence is complete but I am unable to log the data.
I'm able to create a folder and a file to write to. But I'm unable to write to the file.
The filwr FB gives me an error on eError of value 1. At the moment I'm at a loss, any help would be appreciated.
The code below ends up at ManagerState 90 with POU_ERROR = TRUE and ErrorAtState = 42 with State_eError = 1.
1 is not present in the Error ENUM of the CAA_File library hence the reason I'm posting this.
I'm running this on a M241 Schneider Electric PLC in SoMachine V4.3. I need to revert the CAA library to the v3.5.3.0 instead of v3.5.3.132 because otherwise the PLC throws 2 unresolved references: FILE_CLOSE and FILE_DIRCLOSE.
Last edit: lmdejong 2020-05-25
more posts ...
The actual problem could be in here:
As far as I know this is exactly as in the example from the CAA_File documentation.
SOLVED: Been working on this too long, didn't see a typo. The errorcode remains unfound though!
Would you mind correcting this typo so we can c/p your solution?
That would be awesome!
The error is in step 42, writing step. I circle it back to step 42 and try to write again without resetting the write function.
There is the error.
Below is the final code.
I had to add some extra steps to reset the write function because when u start a file it writes two lines, one to create the table header.
Thanks for posting this! Would you mind if I submit this into the code snippet corner? As this seems a good snippet for it
Sure, no problem