<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How to use SysFileOpen function?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/74182bd155/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/74182bd155/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/74182bd155/</id><updated>2020-02-27T14:10:48.277000Z</updated><subtitle>Recent posts to How to use SysFileOpen function?</subtitle><entry><title>How to use SysFileOpen function?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/74182bd155/?limit=25#96c8" rel="alternate"/><published>2020-02-27T14:10:48.277000Z</published><updated>2020-02-27T14:10:48.277000Z</updated><author><name>DaveLuscher</name><uri>https://forge.codesys.com/u/daveluscher/</uri></author><id>https://forge.codesys.comd670f5d678f58c424e7b7fda4920180941c2c3d5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Strings&lt;/p&gt;
&lt;p&gt;Sadly this is a slow forum where I have not got any help in the past. To get the ball rolling here some hints on the SysFileOpen. The third item is a pointer to an error code. e.g.&lt;br/&gt;
VAR&lt;br/&gt;
   rte:   RTS_IEC_RESULT;  //Error code according to runtime error list&lt;br/&gt;
   fh:    RTS_IEC_HANDLE;  // file handle&lt;br/&gt;
   fileName: STRING&lt;span&gt;[63]&lt;/span&gt; := '\dir\myfile.bin';&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;in code area&lt;/p&gt;
&lt;p&gt;fh := SysFileOpen( fileName, AM_READ, ADR(rte));&lt;/p&gt;
&lt;p&gt;good luck&lt;/p&gt;
&lt;p&gt;DaveLuscher&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to use SysFileOpen function?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/74182bd155/?limit=25#33ce" rel="alternate"/><published>2020-02-27T14:10:47.264000Z</published><updated>2020-02-27T14:10:47.264000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com12562d5805bb1610b25334cdc8d14ed4b34c5950</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; 8Strings&lt;/p&gt;
&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;I am new to CoDeSys. I am trying to use the function SysFileOpen to open a file, I saw that on the 2.3 versione the usage was:&lt;/p&gt;
&lt;p&gt;SysFileOpen(´filename´, ´access mode´);&lt;/p&gt;
&lt;p&gt;How does it work on the version 3?&lt;/p&gt;
&lt;p&gt;From the documentation I see:&lt;/p&gt;
&lt;p&gt;SysFileOpen(´filename´, ´access mode´, pointer to an error object);&lt;/p&gt;
&lt;p&gt;I was adding the CmpError Library to my project but doesn´t seem to recognize any of the contained error objects declared in there.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;8Strings.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>