Customization example 1 – Yaskawa MotionWorks IEC Toolboxes User Manual

Page 236

Advertising
background image

File_RW Toolbox: Function Blocks

MotionWorks IEC61131-3 Toolboxes: 2013-09-13

223

10123

Column Start Error. The data is corrupted.

10124

Unsupported Case condition.

10125

Conversion Error. Check the ErrorRow and ErrorCol outputs for details

10126

NoDataError - The End Of File was reached, but the record count is zero

10127

TooManyRecords - DataType is not large enough

10128

MaxNotDefined - User must set the maximum number of records that can be added to
structure.

10129

No Carriage return found in CSV buffer. The function searched the file for twice the length
of the specified buffer and was unable to find a carriage return indicating the end of a row.
Either the buffer size is too small, or the data is invalid.

Customization Example 1

Write_CSV_File must be customized to accommodate your data. Some supporting functions used by
Write_CSV_File (ReadBuffer and ReadValue) do not require customization and can remain in the
File_RW_Toolbox. Two locations requiring customization are identified in the function block by several rows of
comments indicating the need to customize. To effectively use this function, follow these steps:

1) Copy & paste the MyDataStruct and associated datatypes into your project, and rename them to avoid
conflict with MyDataStruct in the File_RW_Template.

2) Modify the "MyData" dataType definition shown above such that it represents the data to be written. An
example follows which shows a customized datatype:

Advertising