Writing to Flash via Ladder    

You can use the Ladder element Data Table Write Row to write to the PLC Flash memory.

Note that you can write a value to a Data Table cell by:

In either case, the value is ‘burned’ into the Flash memory.  You cannot write a new value to that cell until you initialize it by downloading a Data Table containing initialized columns.

Writing to Flash

  1. In Project> Program Properties> General, select Allow writing to Flash via Data Tables Elements.

In the PLC, you must initialize the Data Table row you want to write to. If you do not do this, the PLC will not be able to write to the Flash memory during run-time.

 

  1. In the Data Table, right-click the column and select Clear Selected Cells.

 

The Column values appear as -1.

  1. Download the project to the PLC in order to initialize the Data Table column to
    FFFF (-1).

 

  1. Click on Source Operand to link the operand for Write to Row.

In the net below, when MB 10 is ON, the data in the Source Operand will be written to the Destination Cell of the Row Number determined by MI17.

 

Status messages are indicated by SI 264. When the function is successful, SI 264 contains 0.  You can monitor the success or failure of the function by building the net as shown below.

Since the OS does not initialize SI 264 after an error occurs, you must initialize SI 264 in your application. In the following table, the value of SI 264 indicates error messages.

Value

Message

Comments

1

Write not successful, Data Table row is busy

 

2

Write not successful, Flash row was  not initialized

Initialize the Data Table row as explained in Step 2

4

Maximum Row Length exceeded

The maximum length is 180 bytes

8

General Error

The Flash memory may not be working properly

 

 

Note

You cannot write to a row that contains data. Therefore, use the Row Number to move to a new row for each Write action.

To find the next empty row in the Data Table, you can use a Data Table Find function to search for –FFFF.