3-263
3 Functions of NB-Designer
NB-series Programmable Terminals NB-Designer Operation Manual(V106)
3-9 Mac
ro F
unc
tion
3
3-9-1 C
reate a
S
imple Macro Prog
ram
In the example below, the Properties of LW0_R are set as follows:
Here, specify “signed int.” from “Storage Format”, “Read” from “R/W”, “LW” from “Area” and “0” from
“Address” respectively. After the specification, click the “OK” button, then this variable will be seen in
“Macro Variable Table [macro_0.c]” window.
Note
The variables used in the Macro are necessary to be registered to the [Macro Variables Table] in advance.
Specify LW1_R and make its address to LW1, then set the address of LW2_W to LW2 by the same
method.
Note
When the Storage Format is set to “double”, the Word Length will automatically become 4, i.e. this variable
will occupy LW2 to LW5.
After the completion of setup, the “Macro Variable Table [macro_0.c]” window is shown as below:
After defining the variables, we should write the following Macro:
int MacroEntry()
{
//LW0 is divided by LW1and LW2 is obtained
LW2_W=LW0_R/LW1_R;
return 0;
}
Once it is saved, the simple Macro is completed. At this time, go to the Edit Window to make the
editions as shown below:
Place 2 Number Input components corresponding to LW0 and LW1 respectively;
Place 1 text component and enter “/” to represent division.
Place 1 Number Display component corresponding to LW2, and set the Storage Format to “double” (i.e.
double-precision floating-point) and both the Integer and Decimal to “4”;
Содержание NB10W-TW01B
Страница 4: ......
Страница 10: ...Terminology 6 NB series Programmable Terminals NB Designer Operation Manual V106 ...
Страница 448: ...3 Functions of NB Designer 3 406 NB series Programmable Terminals NB Designer Operation Manual V106 ...
Страница 450: ...3 Functions of NB Designer 3 408 NB series Programmable Terminals NB Designer Operation Manual V106 ...
Страница 462: ...4 Functions of NBManager 4 10 NB series Programmable Terminals NB Designer Operation Manual V106 ...
Страница 472: ...4 Functions of NBManager 4 20 NB series Programmable Terminals NB Designer Operation Manual V106 ...
Страница 482: ...5 Maintenance and Abnormality Handling 5 10 NB series Programmable Terminals NB Designer Operation Manual V106 ...
Страница 528: ...8 Web Interface 8 10 NB series Programmable Terminals NB Designer Operation Manual V106 ...
Страница 544: ...Appendices A 16 NB series Programmable Terminals NB Designer Operation Manual V106 ...
Страница 546: ...Revision 2 NB series Programmable Terminals NB Designer Operation Manual V106 ...
Страница 547: ......