More Advanced Programming; Applied Instructions Reference - Mitsubishi Electric FX2N Beginners Manual

Hide thumbs Also See for FX2N:
Table of Contents

Advertisement

More Advanced Programming

5
More Advanced Programming
The basic logic instructions listed in Chapter 3 can be used to emulate the functions of a
hard-wired contactor controller with a programmable logic controller. However, this only
scratches the surface of the capabilities of modern PLCs. Since every PLC is built around a
microprocessor they can also easily perform operations like mathematical calculations, com-
paring numbers, converting from one number system to another or processing analog values.
Functions like these that go beyond the capabilities of logic operations are performed with spe-
cial instructions, which are referred to as applied or application instructions .
5.1

Applied Instructions Reference

Applied instructions have short names that are based on the English names of their functions.
For example, the instruction for comparing two 16-bit or 32-bit numbers is called CMP, which is
short for compare .
When you program an applied instruction you enter the instruction name followed by the
device name. The following table shows all the applied instructions currently supported by the
MELSEC FX family of controllers. This list may look a little overwhelming at first, but don't worry
– you don't have to memorise them all! When you are programming you can use the powerful
Help functions of GX Works2 to find the instructions you need.
In this chapter we will only cover the more frequently-used instructions, which are shown with a
grey shaded background in the reference table. For full documentation of all the instructions
with examples please refer to the Programming Manual for the FX family.
Category
Program flow
functions
FX Beginners Manual
Instruc-
Function
tion
Conditional Jump to a program
CJ
position
CALL
Calls (executes) a subroutine
Subroutine Return, marks the end of a
SRET
subroutine
Interrupt Return, marks the end of an
IRET
interrupt routine
Enable Interrupt, enables processing
EI
of interrupt routines
Disable Interrupt, disables processing
DI
of interrupt routines
First End, marks end of main program
FEND
block
WDT
WatchDog Timer refresh
FOR
Marks beginning of a program loop
NEXT
Marks end of a program loop
Applied Instructions Reference
Controller
FX
3G
FX
2N
FX
FX
FX
1S
1N
3GC
FX
2NC
FX
3GE
©
©
©
©
FX
3U
FX
3S
FX
3UC
©
©
5 – 1

Advertisement

Table of Contents
loading

Table of Contents