EasyManuals Logo
Home>Beckhoff>Controller>BC3150

Beckhoff BC3150 User Manual

Beckhoff BC3150
104 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #58 background imageLoading...
Page #58 background image
Programming
BC315058 Version: 2.1.0
5.4 Remanent data
2000kbyte of remanent data are available for the BX controller. These data are declared as VARRETAIN in
PLC Control:
Example
VARRETAIN
Test:BOOL;
Count:INT;
END_VAR
Retain data are located between VAR RETAIN and END_VAR. These data are stored in a NOVRAM and
are consistent across the whole 2kbyte range. The RETAIN data are stored in the NOVRAM after each
cycle. For 2kbyte approx. 2ms are required (for 1kbyte approx. 1ms). The variables can be configured
locally or globally. Allocated variables (%MB, %QB, %IB) cannot be used as remanent data.
Note
Do not use VAR_RETAIN in function blocks
VAR_RETAIN should not be used in function blocks. All FB data are copied into the retain
memory. This leads to an unnecessary increase in cycle time, and the retain memory is
filled with unnecessary data.
Note
Do not use variables with address as remanent data
Variables that have been assigned an address (%MB, %QB, %IB) must not be used as re-
manent data.
Example for remanent data in the function block
This should be avoided, if possible, since all the data of a function block, in which even just a single
remanent bit is found, are stored by default. A program sample can be found below.
Function block test (no program code required - in ST semicolon is sufficient)
FUNCTION_BLOCKTest
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
END_VAR
VAR_IN_OUT
Counter:INT;
END_VAR
MAIN program
PROGRAMMAIN
VAR
fb_Test:Test;
END_VAR
VARRETAIN
iCounter1:INT;
END_VAR
fb_Test(Counter:=iCounter1);

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Beckhoff BC3150 and is the answer not in the manual?

Beckhoff BC3150 Specifications

General IconGeneral
BrandBeckhoff
ModelBC3150
CategoryController
LanguageEnglish

Related product manuals