<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Using the filesystem?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/2fd3206e7d/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/2fd3206e7d/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/2fd3206e7d/</id><updated>2020-02-27T17:33:17.700000Z</updated><subtitle>Recent posts to Using the filesystem?</subtitle><entry><title>Using the filesystem?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/2fd3206e7d/?limit=25#100e" rel="alternate"/><published>2020-02-27T17:33:17.700000Z</published><updated>2020-02-27T17:33:17.700000Z</updated><author><name>Moderator3S</name><uri>https://forge.codesys.com/u/moderator3s/</uri></author><id>https://forge.codesys.comfa4e022d81cf12380732426a8c590beccd1441d8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Urban,&lt;/p&gt;
&lt;p&gt;the steps are:&lt;/p&gt;
&lt;p&gt;download the file utilities example from the store.&lt;br/&gt;
Then as usually the procedure is open it from&lt;/p&gt;
&lt;p&gt;"c:\Users\&amp;lt;your user="" name=""&amp;gt;\CODESYS Examples\File Utilities\FileUtilities.project" &amp;lt;/your&amp;gt;&lt;/p&gt;
&lt;p&gt;rightclick on the plc device and update the plc to raspberry pi device.. and update whole project to actual Compiler&lt;br/&gt;
settings etc...&lt;br/&gt;
Then you need the path settings to your demands:&lt;/p&gt;
&lt;p&gt;PROGRAM SystemFile&lt;br/&gt;
VAR&lt;br/&gt;
    (&lt;em&gt; The file names can be adapted &lt;/em&gt;)&lt;br/&gt;
    szFileName      : STRING(128) := '/home/pi/Test.txt';&lt;br/&gt;
    szFileNameCopy  : STRING(128) := '/home/pi/TestCopy.txt';&lt;br/&gt;
    szPathName      : STRING(128);&lt;/p&gt;
&lt;p&gt;PROGRAM SystemDir&lt;br/&gt;
VAR&lt;br/&gt;
    (&lt;em&gt; The file names can be adapted &lt;/em&gt;)&lt;br/&gt;
    sDirName        : STRING:= '/home/pi/delete';&lt;br/&gt;
    sFirstFileName  : STRING:= '/home/pi/firstTest.txt';&lt;br/&gt;
    sSecondFileName : STRING:= '/home/pi/secondTest.txt';&lt;br/&gt;
    sThirdFileName  : STRING:= '/home/pi/thirdTest.txt';&lt;/p&gt;
&lt;p&gt;PROGRAM CAA_File&lt;br/&gt;
VAR&lt;br/&gt;
    (&lt;em&gt; The file names can be adapted &lt;/em&gt;)&lt;br/&gt;
    sFileName       : CAA.FILENAME := '/home/pi/CAAFile.txt';&lt;br/&gt;
    sFileNameCopy   : CAA.FILENAME := '/home/pi/CAAFileCopy.txt';&lt;/p&gt;
&lt;p&gt;PROGRAM CAA_Dir&lt;br/&gt;
VAR&lt;br/&gt;
    sDirNewName     : CAA.FILENAME:='/home/pi/NewDirectory'; (&lt;em&gt; This path can be adapted &lt;/em&gt;)&lt;br/&gt;
    sDirNextName    : CAA.FILENAME:='/home/pi/NextDirectory'; (&lt;em&gt; This path can be adapted &lt;/em&gt;)&lt;br/&gt;
    sFileName       : CAA.FILENAME:= 'Test.txt'; (&lt;em&gt; The name for the file to be created &lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Using the filesystem?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/2fd3206e7d/?limit=25#7803" rel="alternate"/><published>2020-02-27T17:33:16.551000Z</published><updated>2020-02-27T17:33:16.551000Z</updated><author><name>urbanlarsson</name><uri>https://forge.codesys.com/u/urbanlarsson/</uri></author><id>https://forge.codesys.com5495d70b7240253ef65c5aebeebe7045ec0cd5a7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Im a newbe on both codesys and Linux, is there any function for Reading/Writing files to the memorycard?&lt;/p&gt;
&lt;p&gt;I want to use the card for config-files and logging.&lt;/p&gt;
&lt;p&gt;/U&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>