Omron NB-series Operation Manual page 306

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

Advertisement

3 Functions of NB-Designer
Place 1 Function Key to execute Macro, and select "macro_0.c" in the drop-down menu as below and
input "=" in the label:
The Edit Window is displayed as follows.
Perform the offline test, input 5 into LW0 and 2 into LW1, and you will see the result as shown below:
The result should be 2.5000 instead of 2.0000.
LW0_R and LW1_R are [signed short] so that the division of one variable by another variable both in
integer type results in the variable also in integer type. In order to resolve this problem, the variable to
perform the division is necessary to be casted in [double] as follows.
LW2_W = (double)(LW0_R)/LW1_R;
3-264
NB-series Programmable Terminals NB-Designer Operation Manual(V106)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents