User manual

IEC61131 User and Reference Manual
April 22, 2008
141
Permanent Non-Volatile Modbus Registers
By default, the controller has a selection of Modbus registers already defined. These are the
Permanent Non-volatile Modbus Registers and consist of the following:
For Micro16 and SCADAPack, SCADAPack LP, SCADAPack 100, SCADASense 4202
controllers:
Register Type
Address Range
Coil Registers
00001 to 00128
Holding Registers
40001 to 40200
For SCADAPack 330/334, SCADAPack 350, SCADAPack 32 and SCADASense 4203
controllers:
Register Type
Address Range
Coil Registers
00001 to 00512
Holding Registers
40001 to 42000
These registers reside in non-volatile memory so they retain their values when the controller
is reset or while an ISaGRAF application or C/C++ application is being downloaded. These
registers may be used to store data during application downloads.
To initialize all Permanent Registers to zero, select Initialize Controller from the Initialize
Controller dialog. This dialog is selected using the Controller | Initialize command from the
Tools menu on the Programs window. The Permanent Registers are also set to zero on a
Cold Boot.
Using Permanent Registers in an ISaGRAF Project
Variables declared with the Retain attribute reside in non-volatile memory so they retain their
values when the controller is reset. But when a new version of the project is downloaded, the
retained variables are reset to zero.
To save variable data during application downloads; the variable data may be copied to a
Permanent Register.
Declare Variables in ISaGRAF Dictionary
To do this declare the variable in the ISaGRAF Dictionary but do not assign a Network
Address to the variable.
Save Data in Permanent Registers each Scan
Save the contents of the variable each scan using one of these Function Blocks:
Function Block
Description
setregb
Set value of boolean register.
setregf
Set value of floating point register.
setregsl
Set value of signed long integer register.
setregss
Set value of signed short integer register.
setregus
Set value of unsigned short integer
register.
Read Data from Permanent Registers on Startup
After downloading a new version of this ISaGRAF project, the saved data can be restored to
these two variables by reading from the Permanent Registers on the first scan only. Copy