Omron NB Series Operation Manual page 297

Nb-series programmable terminals
Hide thumbs Also See for NB Series:
Table of Contents

Advertisement

3 Functions of NB-Designer
Before writing the Macrocode, please predefine the I/O variables.
Right-click the mouse in the "Parameters [macro_0.c]" window to make the following menu pop up.
Select "Add Variable" to make the following dialog box pop up.
Firstly specify the variable name.
There are 3 kinds of variables - Read variable, Write variable and Read/Write variable. Read variable
means Macrocode will obtain the value of the variable from the specified address; Write variable means
the result after the Macrocode executed will be written into the specified address and Read/Write
variable incorporates the features of the Read variable and the Write variable. Therefore, Read, Write
and Read/Write are the 3 different variables for the same address. It is recommended to use _R, _W
and _RW to differentiate the variables when you specify their names.
In the following example, LW0 and LW1 are Read variables and LW2 is Write variable, so we name
them as follows:
LW0_R, LW1_R, and LW2_W. Please note that the requirements for the variable names are consistent
with that for C language, and the special attention must be paid to the following points:
(1) The variable name is case-sensitive;
(2) The variable name can't be the number or begin with the number or include some special
characters such as space, slashes etc.
(3) The variable name can't be any reserved words of C language.
In the above example, the attributes of LW0_R are set as follows:
3-256
NB-series Programmable Terminals NB-Designer Operation Manual(V106)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents