Omron NB-series Operation Manual page 304

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

Advertisement

3 Functions of NB-Designer
Before writing the Macro, please predefine the I/O variables.
Right-click the mouse in the "Macro Variable Table [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 Macro will obtain the value of the variable from the specified address; Write variable means the
result after the Macro 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 regulations 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.
(4) Specify the array length in the range from 2 to 1024. The array length of the value in unsigned short
type cannot be specified to 4. The array length of the value in int type or float type cannot be
specified to 2. (The specification of the function is different from the one of the standard C
language)
3-262
NB-series Programmable Terminals NB-Designer Operation Manual(V106)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents