Supported platforms: CODESYS 3.5 SAFETY

 

NVRAMCOPY (External FB)

Description

This FB provides NvRAM write and read access.

 

Limitations

NV-RAM copy shall be executed from non-safe application context.

 

Inputs

Input variable name

Data type

Range

Description

i_Enable

BOOL

 

Write or Read operation is started when i_Enable is changed to TRUE. The program resets flag when init is started.

i_NvRAMIndex

DWORD

Depends on HW. Indexing starts from 0.

The index of the NvRAM used.

i_WriteToNvRAM

BOOL

 

TRUE writes to NvRAM, FALSE reads from NvRAM.

i_DestAdr

DWORD

≠0

Data address to write or read to. When writing the address in NvRAM. When reading the address on application side.

i_ScrAdr

DWORD

≠0

Data address to write or read from. When writing the address on application side. When reading the address in NvRAM.

i_Length

DWORD

>0

Length of data to write or read.

Outputs

Output variable name

Data type

Range

Description

o_Done

BOOL

 

TRUE indicates that the function block has completed processing.

o_Busy

BOOL

 

TRUE indicates that the function block is still processing.

o_Error

BOOL

 

TRUE indicates that an error has occurred.

o_ErrorId

EPEC_SYSTEM. SYSTEM_ERROR_CODES

 

Occurred error code. See details in system library's Data Types page.

 

Example code

Application parameter NVMem implementation is included in SSeriesHardware library.

It is recommended to use non-volatile memory using Multitool Creator code template.

See also

 

Source file topic100458.htm

Last updated 19-Dec-2024