EasyManua.ls Logo

Omron NB-series User Manual

Omron NB-series
548 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #307 background imageLoading...
Page #307 background image
3-265
3 Functions of NB-Designer
NB-series Programmable Terminals NB-Designer Operation Manual(V106)
3-9 Macro Function
3
3-9-1 Create a Simple Macro Program
After editing the Macro in the procedure as the above, perform the test again. Then the result as follows
should be out.
Now the basic specification is completed. However, the Macro still have a problem. When entering “0”
into LW1 and executing the Macro, an error occurs and the error can affect the normal operation of the
system. In this case, a check should be entered into the operand.
Change the codes shown as below.
int MacroEntry()
{
//Judge whether LW1 is 0 or not in order to prevent “Divide-by-zero overflow” ;
if (LW1_R!=0)
//LW0 divides LW1and LW2 is obtained
LW2_W = (double)(LW0_R)/LW1_R;
return 0;
}
Execute it again. If the divisor is 0, the Macro will not execute division. Therefore, the program safety
will be improved.

Table of Contents

Other manuals for Omron NB-series

Question and Answer IconNeed help?

Do you have a question about the Omron NB-series and is the answer not in the manual?

Omron NB-series Specifications

General IconGeneral
Display TypeTFT LCD
Power Supply24 VDC
SoftwareNB-Designer
TouchscreenResistive
Communication PortsEthernet, RS-232, RS-485, USB
Memory128MB Flash, 64MB RAM
Operating Temperature0°C to 50°C
Protection RatingIP65 (front panel)
CPURISC processor
Storage Temperature-20°C to 60°C
DimensionsVaries depending on model
WeightVaries depending on model

Related product manuals