Macro Function; Create A Simple Macro Block - Omron NB Series Operation Manual

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

Advertisement

3-9

Macro Function

Macro is an advanced HMI control method, which makes the function of the HMI more powerful. The
HMI can have the same logic and arithmetic functions with the PLC through the Macro programming.
Using Macro flexibly can realize more powerful functions that can not be realized by the common
component, and make the HMI more perfect.
NB-Series PT provides the new Macros different from the Macro scripting language mode in the other
HMIs, and the Macro is compatible with the standard C language (ANSI C89) completely. This section
will focus on the creation and usage of Macro through the examples instead of the grammar and the
basic knowledge of the C language.
3-9-1

Create a Simple Macro Block

The Macro block will realize the simple arithmetic function as shown below:
Read 2 signed data from LW0 and LW1, make LW0 divided by LW1, then place the double-precision
floating-point quotient in the 4 words from LW2 to LW5.
Press the
(Add Macrocode) icon in the database toolbar, or click [Macrocode...] in the [Option]
menu, then the following dialog box will pop up.
Select the HMI No. and input the file name, then click "OK" to enter the Macro Editing Window (i.e.
[macro_0.c]) , as shown below.
NB-series Programmable Terminals NB-Designer Operation Manual(V106)
3 Functions of NB-Designer
3
3-255

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents