Reading and writing files

Reading and writing files 1:

Using the sample programs

This document contains sample applications of our products for certain areas of application. The application notes provided here are based on typical features of our products and only serve as examples. The notes contained in this document explicitly do not refer to specific applications. The customer is therefore responsible for assessing and deciding whether the product is suitable for a particular application. We accept no responsibility for the completeness and correctness of the source code contained in this document. We reserve the right to modify the content of this document at any time and accept no responsibility for errors and missing information.

The 1 MB flash memory of the EL6070 can be used to store files.

The following sample program uses the TwinCAT functions of the Tc2_EtherCAT library for the FoE read and write access as well as the file access functions of the Tc2_System library with a fixed path „C:\EL6070_files\“. Hence, a drive “C:” and such folder have to be existing. The device configuration is also present within this example:
IPC + EK1100 + EL6070 + EL9011.

Explanatory notes for the sample program “EL6070_Access”

The sample program uses a TwinCAT 3 visualization. It illustrates file handling for the terminal on the left and file access to the control PC on the right. First, the data are loaded into the controller memory. Then they can either be loaded or saved on/ to the control computer as file, or they can be read to or written from the terminal:

Reading and writing files 3:
TwinCAT 3 - visualization of the sample program “EL6070_Access”

Notes:

Download:

Sample program “EL6070_Access”: Download

Preparations for starting the sample programs (tnzip file / TwinCAT 3)