<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Activity for lmdejong</title><link href="https://forge.codesys.com/u/lmdejong/activity/" rel="alternate"/><id>https://forge.codesys.com/u/lmdejong/activity/</id><updated>2020-06-08T08:01:23.003000Z</updated><subtitle>Recent activity for lmdejong</subtitle><entry><title>lmdejong posted a comment on discussion Runtime</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#6656" rel="alternate"/><published>2020-06-08T08:01:23.003000Z</published><updated>2020-06-08T08:01:23.003000Z</updated><author><name>lmdejong</name><uri>https://forge.codesys.com/u/lmdejong/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#6656</id><summary type="html">Sure, no problem</summary></entry><entry><title>lmdejong posted a comment on discussion Runtime</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#4e8e" rel="alternate"/><published>2020-06-08T06:07:19.476000Z</published><updated>2020-06-08T06:07:19.476000Z</updated><author><name>lmdejong</name><uri>https://forge.codesys.com/u/lmdejong/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#4e8e</id><summary type="html">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. PROGRAM LogManager VAR POU_ERROR: BOOL; ManagerState: INT:=0; ErrorAtState: INT:=0; State_eError: FILE.ERROR; hFile: FILE.CAA.HANDLE; filop: FILE.Open; filcl: FILE.Close; filwr: FILE.Write;...</summary></entry><entry><title>lmdejong posted a comment on discussion Runtime</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#d58b" rel="alternate"/><published>2020-06-08T05:43:28.271000Z</published><updated>2020-06-08T05:43:28.271000Z</updated><author><name>lmdejong</name><uri>https://forge.codesys.com/u/lmdejong/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#d58b</id><summary type="html">SOLVED: Been working on this too long, didn't see a typo. The errorcode remains unfound though!</summary></entry><entry><title>lmdejong posted a comment on discussion Runtime</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#4f41" rel="alternate"/><published>2020-05-25T12:12:05.708000Z</published><updated>2020-05-25T12:12:05.708000Z</updated><author><name>lmdejong</name><uri>https://forge.codesys.com/u/lmdejong/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#4f41</id><summary type="html">The actual problem could be in here: 42: // New file created - Write header //Creation of table header string sData := ''; FOR j := 0 TO SIZEOF(HeaderNames) DO sData := CONCAT(sData, HeaderNames[j]); sData := CONCAT(sData, ';'); END_FOR filwr.hFile := hFile; filwr.pBuffer := ADR(sTestString); szFileSize1:= SIZEOF(sTestString); filwr.szSize := szFileSize1; filwr.udiTimeOut := 100000; // 100ms TimeOut filwr (xExecute := TRUE); IF filwr.xDone THEN ManagerState := 42; filwr (xExecute := FALSE); END_IF...</summary></entry><entry><title>lmdejong modified a comment on discussion Runtime</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#7825" rel="alternate"/><published>2020-05-25T12:10:50.287000Z</published><updated>2020-05-25T12:10:50.287000Z</updated><author><name>lmdejong</name><uri>https://forge.codesys.com/u/lmdejong/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#7825</id><summary type="html">[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...</summary></entry><entry><title>lmdejong modified a comment on discussion Runtime</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#7825" rel="alternate"/><published>2020-05-25T10:26:55.344000Z</published><updated>2020-05-25T10:26:55.344000Z</updated><author><name>lmdejong</name><uri>https://forge.codesys.com/u/lmdejong/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#7825</id><summary type="html">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...</summary></entry><entry><title>lmdejong modified a comment on discussion Runtime</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#7825" rel="alternate"/><published>2020-05-25T10:25:32.012000Z</published><updated>2020-05-25T10:25:32.012000Z</updated><author><name>lmdejong</name><uri>https://forge.codesys.com/u/lmdejong/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#7825</id><summary type="html">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...</summary></entry><entry><title>lmdejong posted a comment on discussion Runtime</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#7825" rel="alternate"/><published>2020-05-25T10:23:08.012000Z</published><updated>2020-05-25T10:23:08.012000Z</updated><author><name>lmdejong</name><uri>https://forge.codesys.com/u/lmdejong/profile/</uri></author><id>https://forge.codesys.com/forge/talk/Runtime/thread/dc52c31357/?limit=25#7825</id><summary type="html">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...</summary></entry></feed>