Professional Documents
Culture Documents
* The manual number is noted at the lower left corner of the front cover.
Release Date Manual Number Revision
7/2007 FXTRN0573023-A Rev A - Created new manual (taken largely from the MEAU
FX Training Manual, Rev F)
7/2007 FXTRN0573023-AA4 Rev A with A4 Paper Size and layout changes
5/2008 FXTRN0573023-B Rev B
- Added information on FX3UC
- Added Windows Vista compatibility
- Minor text/layout revisions and corrections
Disclaimer: This manual does not imply guarantee or implementation right for industrial ownership or
implementation of other rights. Mitsubishi Electric Corporation is not responsible for industrial
ownership problems caused by use of the contents of this manual.
Table of Contents
i
CHAPTER 5 Numeric Data in PLCs 45
CHAPTER 7 Addressing 55
8.1 Addressing............................................................................................... 59
8.2 Indicator Lights ........................................................................................ 60
8.3 Operator Interface.................................................................................... 60
ii
CHAPTER 12 Timers and Counters 79
12.1 Timers...................................................................................................... 79
12.2 Counters .................................................................................................. 80
12.3 Program Examples .................................................................................. 85
12.4 Additional Timer Instructions.................................................................... 87
12.5 Exercise Timers and Counters.............................................................. 88
12.6 Exercise Conveyor Control ................................................................... 88
iii
CHAPTER 15 Documentation and Printing 123
Appendix 129
iv
CHAPTER 1 Introduction & Overview
Welcome to the FX series programmers training course. This course is intended for
designers and control engineers, responsible for developing application programs using
the FX series programmable logic controller (PLC). Apart from traditional product
training concentrating on tools, a portion of this training is devoted to design, with the
intention of laying a foundation for a successful and short design and debugging cycle.
This class is meant for those with basic electronics knowledge, and some
exposure to industrial control concepts. Experience with PLC ladder code or any
computer programming language is also advantageous.
1
1.4 Course Description
CHAPTER 7 Addressing
This chapter covers the rules of addressing on both the right side and left side
bus of the FX3U, including limitations on the maximum number of I/O.
2
CHAPTER 13 - Applied Instructions
This chapter covers many advanced instructions: data manipulation instructions,
arithmetic instructions, comparison instructions, conversion instructions, logical
operations, FX3U left side bus utilization methods, and TO/FROM instructions.
This chapter contains many example applications using the applied instructions.
Q SERIES
FX SERIES
The FX series PLC will be covered in this class. There are many programming
similarities between the FX and Q series controllers. The FX series simply
incorporates inputs, outputs, power supply and processor into one package!
3
4
CHAPTER 2 FX Series Hardware Review
This chapter discusses the hardware structure of the FX series programmable logic
controller (PLC), including a review of the different CPU types, input/output modules
and other related hardware and devices.
There are three general sections to all PLCs: INPUT, CPU, and OUTPUT.
INPUT
The input section consists of integrated input terminals, or
extension input terminals, that the input devices of the application
will be wired to, like limit switches, or transistor sensors, etc. When
the input voltage reaches its specified level the input becomes
active. Once active, the input can be read by the PLC.
CPU
The CPU is the backbone of the PLC which runs and manages all
of the system processes. Each FX series model has a different
CPU type. Therefore, the FX model (and CPU) needs to be
selected depending on the requirements of the application.
OUTPUTS
The output section consists of integrated output terminals and
extension output terminals that are controlled by the CPU. Based
on the condition of the inputs, the CPU will judge which outputs
should turn ON, activating machine devices like lights, buzzers,
relays, solenoids, or motors.
The three sections are controlled by user-written sequencing software called the
ladder program, which takes the place of hard-wired circuits. The relationship
between inputs and outputs is controlled by the logic in the ladder program.
Because hard-wired circuits are now replaced by software logic, machine
modifications and improvements are much easier to implement.
5
2.2 The FX Line of PLCs
All of the PLCs in the FX line have certain characteristics in common:
1) An integrated power supply. Most of the PLCs in this line have a built in
power supply that requires 100-240 VAC power. Several of the PLCs have a
DC power version available as well.
2) Integrated I/O. Each main unit has a specific number of inputs and outputs,
depending on the model chosen. The inputs are typically DC, although
certain models have AC inputs as well. All models have relay and transistor
output versions available (except the FX0S), and several offer triac outputs.
The F series of PLCs was originally introduced in 1981 with the F PLC. The F
was then improved and revised several times, resulting in the F1, F1J and F2
models. After the F2 came the FX series PLCs. These models included the FX,
FX0, FX1, FX2, FX0S, FX0N, and FX2C, as well as the current offerings, the
FX1S, FX1N, FX2N, FX2NC, and FX3U. By 2006, sales of Mitsubishi F series
PLCs exceeded 7 million units worldwide!
FX1S
The FX1S PLC has the small footprint like the FX0S, but with many more
capabilities. The FX1S has more I/O (up to 30), more internal devices, and has
motion control capability with up to 100kHz pulse train output and built-in
positioning instructions. A small HMI (the FX1N-5DM) can be connected to the
front and used to monitor and change timers, counters and data registers. The
FX1S can use one board, but has no expansion bus.
FX1N
The FX1N provides the mid-range number of I/O points similar to the FX0N, but
with more capabilities and expandability. The FX1N has more internal devices
than the FX0N (1536 M relays and 235 counters), and has motion control
capability equivalent to the FX1S. The FX1N also has a number of boards that
can be added to provide additional I/O or allow the connection of FX0N
communication modules. The right side expansion bus can be connected with
special function modules enabling further I/O, analog, positioning, or
communication capacity. The FX1N-5DM can also be connected to the FX1N.
6
FX2N
FX2NC
Similar to the FX2N in all respects except for no built-in real-time clock and a 24V
DC power supply only, the FX2NC uses connector-type distributed I/O instead of
I/O terminals. The result is a powerful, expandable, super-compact PLC main
unit less than 1/3 the size of the smallest FX2N. Boards are replaced with
special adapter units, and right side expansion bus special function modules can
still be connected.
FX3U
FX3UC
The FX3UC is the ultra-compact version of the FX3U processor with connector-
type distributed I/O, like the FX2NC. It retains almost all features of the FX3U but
does not the support use of the expansion boards and high-speed I/O adapters
on the left side expansion bus, as well as the FX3U-7DM display module, due to
form factor restrictions. The FX3UC right side expansion bus can be converted to
the standard right side expansion bus using either the FX2NC-CNV-IF, or the
FX3UC-1PS-5V.
This training course will make use of the FX3U series PLC. However, most of
what is covered will apply to the entire FX series PLC line.
7
2.3 Hardware Components
Main Units
1) The CPU. This is the main processing power behind the PLC; reading inputs,
calculating logic and mathematics, and writing to outputs.
2) Integrated power supply. This provides power to the CPU, inputs, and a
limited number of connected extension blocks, special function blocks and
special adapters.
8
Powered Extension Units
2) Integrated inputs. <30VDC and <264VAC input units are available. The
number of inputs is either 16 or 24, depending on the model selected.
9
Non-powered Extension Blocks
For FX2NC and FX3UC PLCs, an FX2NC-CNV-IF (or FX3UC-1PS-5V for the
FX3UC only) must be used to connect FX2N extension units or blocks. Additional
FX2NC series extension blocks are also available.
2.4 Inputs
Input devices are the interface between PLCs and machines. The FX PLC main
unit has a number of integrated inputs available. If more are needed, input
extension units and extension blocks are available to be connected.
DC Inputs
o Fast response
o 90% of new designs use this type of input
o 24VDC input voltage
o Sink or Source logic
AC Inputs
o Slow response
o Easy to interface AC devices
o 120VAC input voltage
Integrated Inputs
10
SINK or SOURCE logic refers to the voltage level that will cause the input to
become active.
11
The input trigger levels vary, depending on the module type. Generally, the input
becomes active at the 2/3 level and then back to inactive at the 1/3 level.
For example, a +24VDC input will become active when the input voltage reaches
16VDC, and then become inactive when the voltage reaches 8VDC.
24V
16V
VOLTAGE LEVEL
8V
0V
OFF
DIGITAL INPUT is ON
ON
10ms 10ms
The standard input device has a 10ms input filter. This is done deliberately for
switch de-bounce. As switch contacts close, the mechanical contacts actually
bounce slightly, causing the input voltage to fluctuate rapidly for a short period of
time. This 10ms delay allows the switch contacts time to stop bouncing.
It is possible to adjust the input filter constant. This is explained in Section 14.2
of this Training Manual.
Typically if more than 20 pulses per second are required, a high-speed counter
module or the built-in high-speed inputs should be used. For more details on
internal high-speed counters, refer to Section 12.2 of this Training Manual.
The PLC main unit will contain 8, 16, 24, 32, 40, or 64 built-in physical inputs.
Extension units offer either 16 or 24 additional input points. Extension blocks
offer 8 or 16 additional input points. All input points can be switched between
sink or source logic.
2.5 Outputs
Output devices allow the PLC to control and interface with other machines and
equipment. The FX PLC main unit has a number of integrated outputs available.
If more are needed, output extension units and extension blocks are available to
be connected.
12
Integrated Outputs
Relay Outputs
Triac Outputs
Transistor Outputs
RELAY OUTPUTS
Relays are dry contacts; whatever is input on the common terminal is switched
out when the output becomes activate. This is the most common type of output
terminal used. Loads up to 2 Amps, 100VAC~240VAC or 30VDCcan be
switched, with a maximum of 8 Amps per common. Most base units and
extension modules have four outputs per common.
TRIAC OUTPUTS
Triacs are solid state AC switches. When the output becomes active the terminal
connects the load to the AC source. Load switching is up to 0.3Amps at 240VAC
per point, with a maximum of 0.8 Amps per common. Each base unit or
extension module has up to four outputs per common.
TRANSISTOR OUTPUTS
Fast response is the main characteristic. Transistors are solid state DC
switches. When the output becomes active, the terminal connects the load to the
DC source. Load switching is up to 0.5Amps per point, with a maximum of 0.8
Amps per common. 5 to 30VDC can be switched. Most base units and
extension modules have four outputs per common. Transistor outputs are
required for high-speed pulse train outputs from the PLC main unit.
13
2.6 Analog Modules and Special Adapters
All of the hardware that has been discussed thus far has used discrete I/O; the
inputs or outputs are either ON or OFF. This is acceptable if all the inputs in the
PLC system are switches or simple sensors, and the outputs simply need to be
turned ON and OFF. However, if it is necessary for the FX PLC to monitor or
control a temperature or other variable voltage input/output, an analog special
function module (SFM) or special adapter (ADP) is required. Analog boards (BD)
for the FX1S, FX1N, and FX2N are not described in this document.
There are 3 types of Analog SFMs: Analog Input modules, Analog Output
modules, and Combination Analog Input/Output modules. All are used with I/O
points that have more states than just ON or OFF. Examples of analog inputs
would be a velocity reading or pressure reading. An example of an analog output
would be the variable speed of a motor.
The input modules come with 2, 4, or 8 analog input channels. These are the
FX2N-2AD, FX2N-4AD, and FX2N-8AD, respectively. The output modules come
with 2 or 4 channels. These are the FX2N-2DA and FX2N-4DA, respectively.
There are 2 combination modules: the FX0N-3A has 2 input channels and 1
output channel, the FX2N-5A has 4 input channels and 1 output channel. For
the FX3U and FX3UC series only, there are two other analog modules, the
FX3U-4AD and FX3U-4DA, which are like the FX2N-4AD and FX2N-4DA, but
support higher resolution and faster processing.
All the modules measure or output varied current or voltage, usually 20mA to
+20mA, 4 to 20mA, or 10V to +10V, as set by the programmer. Depending on
the type of module, data is received from either the PLC or from the analog input
channels and the raw number data is interpreted as either the current or voltage
level to be output (if from the PLC, digital to analog, or DA), or the analog value
read from the input channel (if from an analog input, analog to digital, or AD).
Programming Example
14
Temperature Input Modules
These modules are similar to the other 4 input channel analog modules except
for the type of input devices which can be connected. With the FX2N-4AD-TC,
thermocouple temperature sensors are used for temperature detection which
produce changes in voltage. Type J and Type K thermocouples are supported.
With the FX2N-4AD-PT, platinum temperature sensors (PT-100 RTD) are used.
These sensors can detect very small temperature changes (i.e. 0.2C to 0.3C,
0.36F to 0.54F). The FX2N-8AD modules inputs can also be configured for
type K, J, or T thermocouples.
15
Single-Axis Positioning Modules
The FX2N-1PG (PG meaning Pulse Generator) module
creates a pulse train output that can be used for motion
control applications. This module accepts 24VDC inputs
and produces pulse trains at speeds up to 100kHz. The
FX2N-1PG attaches to the right side expansion bus.
16
FX3U Left Side Bus High-Speed Input Adapter
The FX3U-4HSX-ADP special adapter connects to the left
side expansion bus of the FX3U and enhances the existing
100kHz high-speed counting ability of the FX3U main unit to
200kHz. The FX3U-4HSX-ADP does not require TO/FROM
instructions (discussed later) and instead directly routs the
high-speed inputs into X0-X3 or X4-X7 (depending on the
adapters address). A maximum of two high-speed input
adapters can be used on an FX3U CPU, providing up to eight
high-speed inputs. These special adapters must be located
directly next to the left side of the PLC or connected to the left
side of the FX3U-2HSY-ADP high-speed output adapter.
The FX family has several options that can be used to add communication
abilities and expand the flexibility of the FX system. Network connection
modules will be discussed in the next section of the training manual. In this
section, only modules, boards, and special adapters used to augment the serial
communication ability of the PLC will be discussed.
The FX3U and FX3UC PLCs support the addition of two serial ports via the left
side bus. For the FX3U, if using a communication BD board, only one additional
communication ADP module can be used. When using the FX3UC, or the FX3U
with an FX3U-CNV-BD board, two additional communication ADP modules can
be used. Communication BDs and ADPs for the FX1S, FX1N, FX2N, and
FX2NC are not pictured in this document.
17
RS-232 Communication Interface Adapter and Module
To add an RS-232 communication port to the FX3U PLC, the FX3U-232ADP,
FX3U-232ADP-MB, FX2N-232IF or FX3U-232-BD must be attached. For the
FX3UC, only the FX3U-232ADP, FX3U-232ADP-MB, and FX2N-232IF can be
attached.
For the FX1S, FX1N, FX2N, and FX2NC, the FX2NC-232ADP will work.
However, the FX*N-CNV-BD is required for PLCs other than the FX2NC in order
to use the FX2NC-232ADP. An FX1N and FX2N 232-BD are also available.
This board connects to the port located on the left side of the
FX3U PLC. Unlike with the FX2N-232IF and FX3U-232ADP,
this connection location takes up no extra space in the PLC
system.
Like the 232ADP, this board may require special ladder code
and or parameter setup in the PLC to configure the
communication port. If using an open protocol, the RS or
RS2 instruction is required to transmit and receive data.
18
RS-422 Communication Board FX3U-422-BD
The Mitsubishi HMI line commonly connects to FX series PLCs
through the programming ports. If the programmer needs to
interface with the PLC program without disconnecting the HMI,
either transparent mode (through the HMI) or a communication
board are the simplest ways to accomplish this goal. The
board simply adds a second programming port to the PLC, with
no need for any ladder code or parameter setup. Note that an
HMI can interface with the PLC through this port as well as the
built-in programming port. An FX1N and FX2N 422-BD are
also available.
The FX series PLC has several networking capabilities that can be added on to
the main unit. These allow the PLC to operate on a far larger system than could
be possible with a FX main unit PLC. Restrictions to the number and
combination of modules that can be attached may apply. Refer to the users
manuals for more details.
The FX3U-485ADP allows the same functionality as the FX3U-485-BD, but with
a stronger signal rated for longer distances. This adapter also occupies one
serial port of the FX3U or FX3UC.
For the FX1S, FX1N, FX2N, and FX2NC, the available adapter for an RS-485
connection is the FX2NC-485ADP, which requires the use of an FX*N-CNV-BD
converter board to connect to the PLC (except for the FX2NC). An FX1N and
FX2N 485-BD are also available. All of these occupy one serial port.
This module allows the FX2N, FX2NC, FX3U, or FX3UC to use the AS-I network
to control and monitor up to 31 field devices.
This module allows an FX1N, FX2N, FX2NC, FX3U, or FX3UC PLC to be the
master on a CC-Link network with up to 15 slave stations.
20
CC-Link Interface Module FX2N-32CCL
The FX2N-32CCL allows the FX1N, FX2N, FX2NC,
FX3U, or FX3UC PLC to connect to the CC-Link network
as a remote device station. The CC-link master controls
the FX PLC by writing data to the buffer memory of the
FX2N-32CCL, which then in turn transfers data to and
from the PLC.
All PLCs in the FX family have an integrated power supply. The power supply
accepts either 85-264VAC or 24VDC (12VDC on select FX1N models).
The AC-powered FX PLCs generate 2 types of bus power: 5VDC and 24VDC.
The amount of current on each supply varies depending on model and size of the
PLC. Check the hardware manual of the product in question for more details.
The DC-powered FX PLCs only contain the internal 5VDC bus.
The 5VDC bus provides power to the CPU and extension blocks. Because there
is a finite amount of power generated, this limits the number of extension blocks
that can be connected.
22
The AC-powered FX PLCs have 0V and 24V terminals built-in. The power
provided can be used for discrete I/O extensions, and is also available for the
powering of accessories such as sensors and HMIs. Be careful not to exceed
the rated capacity of the power supply.
As has been stated before, the built-in power supply can only support a
certain number of extension block and special function blocks.
For the FX3UC 5V bus calculations, refer to Section 1.9 of the FX3UC
Users Manual - Hardware Edition.
4) Add up the total current consumption and subtract it from the total
current capacity available.
23
NOTE: These tables are in Chapter 6 of the FX3U Users Manual -
Hardware Edition.
TABLE 3: FX2N-32E*
TABLE 4: FX2N-48E*
24
TABLE 5: 24VDC and 5VDC Supply Capacities
25
FX2N Powered Extension Units
26
FX2N Non-powered Extension Blocks
27
Special Function Modules (Continued)
28
Worksheet for Exercise 2.12
29
2.12 EXERCISE Power Supply Calculation
Using the worksheet on the previous page, combined with the preceding tables,
use the steps as discussed previously to determine the power consumption of
the system above.
30
2.13 Memory Types
The built-in internal memory of the FX series PLCs can not be expanded.
However, memory cassettes are available for each model which can be used in
place of the internal program memory, sometimes even if the memory cassette is
of a larger capacity than the internal memory of the PLC. Memory cassettes can
also add portability to a program. The program is saved in the cassette, and
when the cassette is connected to another PLC, the ladder program in the
cassette is processed by the CPU instead of the one in the PLC program
memory, which is retained. Special memory cards with the program loader
option allow the memory card to read or overwrite the program in the PLC.
Note that since the PLC uses the cassette instead of the PLC program memory,
the cassette memory is not cumulative with the program memory of the PLC.
Depending on the PLC type, there are four types of memory cassette: RAM,
EPROM, EEPROM and FLROM. Each type has its advantages and
disadvantages. The PLC type, application, and level of security required will
dictate which type of memory should be used.
The chart below details the internal capacity, types of memory cassette, and
deviations of memory cassette capacity available for each FX series PLC model.
31
PLC Type Internal RAM EPROM EEPROM FLROM
FX1S 2K - - 2K w/loader -
FX1N 8K - - 8K w/loader -
FX2N 8K 16K 16K 4K, 8K, 16K -
FX2NC 8K - - 4k, 16k, RTC* -
16k, 64k,
FX3U 64K - - -
64k w/loader*
Notes:
The FX2NC does not have an internal real time clock. A memory module with a real time
clock must be attached if real time clock functionality is required.
The FX-RAM-8 and FX-ROM-8 actually hold 16K steps of memory.
The FX3U-FLROM-64L must be used for program loader functionality on the FX3U.
1) Which PLC type is being used and what options are available?
2) Should the program be retained even if battery power is lost?
3) Should the program be able to be changed easily?
32
CHAPTER 3 Programming Equipment
This chapter discusses the hardware and software requirements to program a PLC.
The student will also be shown how to connect the system together. Alternatives to
laptop and PC programming are also covered.
Chapter Objectives: At the conclusion of this chapter, students will be able to
The FX-10P-E and FX-20P-E can be useful for situations when all that is
necessary is changing a timer, adding a contact or making and address change.
They are handheld LCD display units that connect directly to and are powered by
the PLC. These units allow for programming changes and monitoring.
FX-10P-E This unit permits online program changes only. The display is 2
lines by 16 characters in size. It can monitor the program, and change the states
of devices (forcing bits).
FX-20P-E This unit is a more powerful version of the FX-10P-E with a 4 lines
by 16 characters backlit display. It supports both online and offline programming
through the use of a dedicated memory cassette, the FX-20P-MXF*, meaning
that it can both read and write PLC programs. Up to 16K steps of memory can
be programmed in offline mode.
Note that both the FX-10P-E and FX-20P-E support only up to FX2N PLC
functionality. Thus, memory size and instruction limitations may apply.
33
GX DEVELOPER This is a Windows based software (95, 98, NT, 2000, XP,
Vista) used to program all of the Mitsubishi PLC lines, including the FX series, Q
series, A series and Motion A series PLCs. This software, which replaces the
previous Windows package, GPP-WIN, has a large number of troubleshooting
and diagnostic features, as well as easy connection setup for networks. It also
has import capabilities to bring in programs written using older software
packages.
GX IEC DEVELOPER This is a Windows based software (95, 98, NT, 2000,
XP, Vista) similar in all features to GX Developer, but using IEC 1131.3
programming standards. This software implements project tree organization and
programming using built-in and/or user-made Function Blocks. The advantage of
Function Blocks lies in the ability to easily re-use multiple instances of the same
Function Block over all programs, cutting development time and improving
productivity.
GX DEVELOPER-FX This is a Windows based software (95, 98, NT, 2000, XP,
Vista) based on the GX Developer software package. This software has all the
features of GX Developer, but only supports the FX series line of PLCs and their
functionalities. This package is offered at a discounted price versus the entire
GX Developer package, making it a cost saving option for anyone who does not
need to program the entire range of Mitsubishi PLCs.
GX SIMULATOR This is a Windows based software (95, 98, NT, 2000, XP,
Vista) not used to program PLCs, but instead to assist in program
troubleshooting. This software acts as a PC-based PLC, allowing a GX
Developer or GX IEC Developer program to be tested without having to
download to an actual PLC. GX Simulator has the ability to simulate discrete and
analog I/O, serial and network communications, and special function modules.
Programs can be partially executed, or partially skipped, or executed step by
step.
INSTALLATION
34
directories and attempt to reinstall. The uninstall process will not erase
any of the PLC programs that have been previously created.
It is very important that the prompts are read and responded to, because
this is the only opportunity to install the Import from MELSEC MEDOC
features. When this prompt appears users must click on each check box
to install, otherwise the programmer will be unable to import MEDOC
programs in the future without first reinstalling GX Developer.
GX Developer Version
FEATURES
Multiple windows
It is possible to have multiple windows open within GX Developer.
Thus, different windows showing different sections of code and
various monitors can be open at once.
CAUTIONS
Importing Documentation
Documentation will not import if it has foreign characters (like the
tilde ~).
Multiple Projects
Only one project can be open per session of GX Developer. If
copying and pasting between multiple GX Developer projects is
required, multiple sessions of GX Developer must be opened. This
can be done from the File menu, Start New GX Developer
session, or by launching GX Developer a second time from the
Start Menu.
The circular 8 pin port on the PLC CPU module uses RS-422 communication.
Most personal computers only have a RS-232 communication port if any port at
all. For this reason, the F2-232CAB-1, FX-232AWC-H, and the FX-422CAB0 are
recommended for PC-to-PLC connection. The FX-232AWC-H is a RS-422-to-
RS-232 conversion unit, the F2-232CAB-1 connects the conversion unit to the
standard RS-232 port of a PC up to 3m away, and the FX-422CAB0 connects the
conversion unit to the FX PLC up to 1.5m away.
RS-232 PORT
F2-232CAB-1
37
If the PC does not have an RS232 serial port, there are a couple of options
available.
GT1155-QSBD
USB Cable Front USB PORT
38
CHAPTER 4 Numbering Systems
The PLC uses several numbering systems besides the decimal (Base 10) system. An
understanding of these other systems is crucial to successful programming.
The position of a bit, in a byte or word, determines its value. Starting from the
right side, bit number 0 represents a value of 1. As the bit moves left, the bit
value doubles with each position. Bit 1 has a value of 2, bit 2 has a value of 4, bit
3 has a value of 8, etc.
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
Bit Number
39
To convert from binary to decimal, just add the bit values of the bits that are set
to 1, as shown below.
Bit Value
128 64 32 16 8 4 2 1
0 0 0 0 0 0 0 1
7 6 5 4 3 2 1 0
Bit Number
0000 0001 1
0000 0010 2
0000 0100 4
0000 1000 8
0000 0011 3
0000 0101 5
0000 0110 6
0000 0000 0
0000 1111 15 (8+4+2+1=15)
Digits 0 to 9 are the same as with decimal, after which letters A to F are used.
DECIMAL 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
HEXADECIMAL 0 1 2 3 4 5 6 7 8 9 A B C D E F
BINARY 0000 0010 0011 0100 1000 1001 1010 1011 1111
HEXADECIMAL 0 2 3 4 8 9 A B F
40
4.3 Octal Numbers
Octal, or OCT, is a Base 8 numbering system, meaning there are 8 possible
values. The numbers for the octal system are 0 to 7.
In decimal, when the count passes 9, 19, etc. the count restarts at 0 and the next
digit increments by one (i.e. after 9 comes 10, after 19 comes 20).
In the same way, when the count passes 7 in octal, the count restarts at 0 and
the next digit is incremented. Thus after 7 comes 10 and after 17 comes 20.
DECIMAL 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
OCTAL 0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22
Putting the charts for hexadecimal and octal together, it becomes easy to convert
between hex and octal.
HEXADECIMAL 3 4 9 A F
OCTAL 0 6 4 4 6 5 7
41
4.4 Binary Coded Decimal
Binary Coded Decimal, or BCD, uses the same digits as Decimal, 0 to 9, but
with the same format as binary. When converting BCD to Binary, each decimal
digit is broken down into 4 binary bits (or a Nibble).
0 0 1 0 0 1 1 0
7 6 5 4 3 2 1 0
Bit Number
2 6
BCD was developed with the use of decimal input/output devices in mind, like
thumbwheels and seven segment displays. Decimal input/output devices only
count from 0 to 9, and require the use of 4 binary bits to do so.
DECIMAL 2 9 12 30
BCD 0000 0010 0000 1001 0001 0010 0011 0000
The difference between Binary and BCD is apparent when converting from
decimal.
FX series PLCs have dedicated instructions to convert between BCD and BIN.
42
4.5 EXERCISE Numbering Systems Conversion
In this exercise, convert the following numbers to the given numbering system.
Answers can be verified using the GOT interface of the FX-TRN-KIT-R Training Kit. For
more information about the FX-TRN-KIT-R Training Kit, refer to Chapter 8 of this
Training Manual.
43
44
CHAPTER 5 Numeric Data in PLCs
Most PLC applications will require the handling of data, whether manipulating counter
and timer values, reading data from a Special Function Module and processing the
information, or solving high-level mathematical computations. It is important that the
programmer understands how the PLC recognizes and handles the different types of
data that can be encountered.
16-Bit Numbers
The integer range is actually -32,768 to + 32,767 due to the fact that the
bit farthest to the left (bit 15) is used by the PLC as the sign bit. This bit is
also known as the Most Significant Bit, or MSB. If it is 1, the number is
negative, if 0 then positive. Thus the actual largest positive number is
0111 1111 1111 1111 which is 32,767. If the program is incrementing an
integer value and goes above 32,767, the PLC will recognize the value as
rolling over to 32,768. And inversely, if the program is decrementing an
integer value and goes below 32,768, the PLC will recognize the value
as rolling over to 32,767. Thus 1000 0000 0000 0000 is -32,768. Why?
45
The PLC uses a numbering format known as Twos Complement to
display negative numbers. Twos complement is easy to calculate:
32-Bit Numbers
When 32-bit instructions are used, it is important to note that the number
occupies both the source/destination register and the following register.
Take this into account when writing ladder programs because overwriting
the second register can have unpredictable consequences on the data.
46
5.2 Non-integer Handling
As mentioned above, the default method for handling fractional values is to drop
them. This restriction can be avoided through use of the floating point numbers
described in Section 5.1 of the FX3U & FX3UC Programming Manual - Basic &
Applied Instructions Edition.
There are 2 formats for displaying non-integer numbers: Scientific Notation and
Floating Point.
Scientific Notation
Scientific Notation uses two registers to store the mantissa and the
exponent. The mantissa is the first four significant digits of a number, and
the exponent shows the position of the decimal point. This format cannot
be used in calculations, but is useful for displaying data.
The method for storing a scientific notation number: the mantissa is stored
in a 16-bit register, and the exponent is stored in the next 16-bit register.
For the examples above, if 1,238,900 was to be stored in D0 and .00123
was to be stored in D2, the data registers would appear as follows:
D0 1238
D1 3
D2 123
D3 -5
47
Floating Point
Similar to the Scientific Notation format, this format uses two consecutive
16-bit registers. The mantissa occupies all 16-bits of the first 16-bit
register and the first 7 bits of the second 16-bit register. The exponent
occupies the last 9 bits of second 16-bit register, with bit 31 acting as the
sign bit.
The main advantage in using this format is the accuracy over Scientific
Notation. For example, the number (3.1415926) appears as 3.141592
(7 significant digits) in floating point format, and as 3142 x 10-3 in scientific
notation.
48
CHAPTER 6 System Devices
To write a program for a PLC, it is necessary to be familiar with the devices that are
used in the instructions. An overview is provided here with more detailed information to
follow in later chapters.
A common question when discussing system devices is the number of each that
is available to use. This varies depending on the FX PLC model. Refer to the
users manual of the corresponding FX PLC.
X Physical Inputs
All bit devices within the PLC including X, Y, M, and S can be grouped
together in deviations of 4 (i.e. 4, 8, 12, 16 32) for use with ladder code
instructions. To group the bits together, specify the number of deviations
with a K value (decimal constant) as a prefix to a bit device, for example
K4X000 indicates bits X000-X017.
Y Physical Outputs
M Auxiliary Relays
M relays are internal bit devices that can be used for any function needed.
When an M device coil is driven or set, the corresponding M device
contact becomes active.
49
S State Relays
T Timers
All T devices are 16-bit, meaning the maximum timer value and set value
are +32767. Valid set values are K values (decimal constants) and D
registers values which are multiplied by the time interval of the T device.
For example, a 100ms timer has a maximum set value of 3276.7 seconds.
C Counters
C devices are counter devices. Each time the C device coil is driven, the
associated counter value increments or decrements (depending on the C
device address and up/down count setting). When the counter value
reaches its associated set value, the C device contact becomes active.
50
By default, all C devices are retentive, meaning that their counter values
are held until reset.
D registers are data registers (word devices) that can be used for any
function needed. All D registers are 16-bit registers, meaning their value
range is from -32,768 to 32,767. In the ladder program, 32-bit operations
can also be performed. In those cases, two consecutive D registers are
used together and are recognized by the PLC as one long register, able to
hold numerical values from -2,147,483,648 to 2,147,483,647.
File registers are D registers that are stored within the PLC program
memory. They must be declared in the Parameters section of GX
Developer in blocks of 500 and are only accessible by copying values
between them and their associated D registers. Each block of 500
declared File Registers reduces the program step capacity by 500.
51
In the FX3U and FX3UC, the PLC has the ability to directly access bits
within D registers. By placing a decimal point between the D register
address and bit address, the status of a single bit within the register can
be referenced in any bit device instruction. An example would be D100.0
which references bit 0 (the least significant bit) in D register D100.
V registers and Z registers are index registers and can both be used for
16-bit instructions, while only Z can be used with 32-bit instructions
(occupying the V register of the same device address). Values stored in
an index register are used as offsets to the specified device. To offset a
device, reference the offset with an index register device address as a
suffix to a device. For example, if V0 has the value of 2 then D10V0
references D10 + 2, meaning D12. If Z2 has a value of 8, then Y001Z2
means Y011. Remember that X and Y addresses are in octal, so the
offset value is converted to octal and added to the base address.
Because 8 in decimal is 10 in octal, the address is increased by 10.
52
Index registers are useful for writing short ladder code that can be used to
access many different device addresses without taking up scan time.
P - Pointers
P addresses signify pointers which are used with conditional jump (CJ),
and subroutine call (CALL) instructions to alter program flow. The CJ and
CALL instructions cause the program scan to execute different sections of
the ladder program, either by moving to another location within the same
program or by calling subroutines to be executed within the normal scan.
I - Interrupts
K, H and E are used to indicate numerical constants. The PLC does not
recognize numerical values by themselves and instead requires that
values have prefixes to declare what type of numerical value they are.
The K prefix declares that the constant value will be a decimal constant.
The H prefix declares a hexadecimal constant. An E prefix declares a
real number constant, such as 3.14159, which, in turn, means that floating
point functions will need to be used.
53
54
CHAPTER 7 - Addressing
Controlling and monitoring I/O and devices in a PLC program requires knowledge of the
device address to be controlled. The same applies to the internal memory of Special
Function Modules. This chapter explains how the addresses of the special function
modules, special adapters and I/O points in a system are determined.
2) Addressing for both inputs and outputs start at 0 (X000 and Y000).
3) Addressing is consecutive.
4) SFMs are addressed 0 7. The first SFM to the right of the PLC is SFM 0;
the next one is SFM 1, etc.
6) SFMs do not affect the addressing of I/O modules, and vice versa.
7) The FX3U PLC cannot have more than 128 inputs and 128 outputs directly
connected. It is possible to extend to 384 I/O via networked I/O (over CC-
Link and/or AS-I).
8) SFMs use 8 points of I/O each which is deducted from the directly connected
I/O limit. Thus an FX3U with one SFM has a maximum directly connected I/O
capacity of 248 I/O. The maximum number of inputs possible is still 128, and
the maximum number of outputs is still 128 individually, as long as 248
combined I/O is not exceeded.
The FX3U series has an additional expansion bus on the left side of the PLC.
This bus is used with boards (BDs) and special adapters (ADPs) which can be
used to add functionality to the PLC.
55
There are 4 different types of special adapters available.
Analog I/O Special Adapters (maximum 4 per PLC)
High-Speed Pulse Input Special Adapters (maximum 2 per PLC)
High-Speed Pulse Output Special Adapters (maximum 2 per PLC)
Serial Communication Special Adapters (maximum 2 per PLC or 1 when
simultaneously using a Serial Communication BD)
Analog ADPs
Analog input/output data and parameters are stored directly in the PLC
device memory. ADPs are addressed outward from the left of the PLC.
High-speed input ADPs are addressed outward from the left of the PLC.
Note that these are the same device addresses used by the first eight
physical inputs on the PLC. Only the high-speed input ADP terminals OR
the built-in I/O terminals should be used. Do NOT wire both. For other
limitations, refer to the FX3U & FX3UC Programming Manual - Basic &
Applied Instructions Edition.
High-speed output ADPs are addressed outward from the left of the PLC.
Note that these are the same device addresses used by the first eight
physical outputs on the PLC. Only the high-speed output ADP terminals
OR the built-in I/O terminals should be used. Do NOT wire both. For
other limitations, refer to the FX3U & FX3UC Programming Manual - Basic
& Applied Instructions Edition.
56
ADP. Programming information for serial communication is covered in the
FX Series Data Communications Manual.
57
7.4 EXERCISE PLC Addressing
1) A PLC system consists of an FX3U-64MR (32/32 I/O), one FX3U-USB-BD,
one FX3U-4AD-ADP, one 8 point input module, two 16-point output modules, two
SFMs, one 16 point input module, and one more SFM. Draw the system and
determine the addressing.
A. A 64 I/O main unit (32/32 I/O), four 8 point input modules, six 8 point
output modules, and nine SFMs.
B. A 128 I/O main unit (64/64 I/O), two SFMs, two 48 I/O Extension Units
(24/24 I/O each), one 16 point input module.
C. A 128 I/O main unit (64/64 I/O), three SFMs, two 48 I/O Extension Units
(2424 I/O each), one 16 point input module.
D. An 80 I/O main unit (40/40 I/O), two 48 I/O Extension Units (24/24 I/O
each), four 16 point output modules, one 8 point input module.
E. An FX3U 64 I/O main unit (32/32 I/O), three FX3U-4AD-ADP, one FX3U-
4DA-ADP, one FX3U-4AD-PT-ADP, two FX3U-4HSX-ADPs, two FX3U-
485-ADPs, one FX3U-USB-BD.
58
CHAPTER 8 Training Kit Layout
Now that all the necessary background has been covered, it is time to take out and set
up the hardware if it has not been done already. This chapter explains the contents of
the training kit and provides a brief tour of its features.
8.1 Addressing
This demo kit has an FX3U-32MT/ESS, FX3U-485-BD, FX3U-4AD-PT-ADP,
FX2N-5A, and a GT1155-QSBD.
The FX3U has 16 inputs, addressed X000-X007 and X010-X017, and 16 outputs,
addressed Y000-Y007 and Y010-Y017.
The FX2N-5A is a 4 channel analog input and 1 channel analog output module.
It is the first special function module to the right of the main unit and is thus
addressed as SFM 0.
The FX3U-485-BD takes up the BD Board location on the main unit and uses
serial communication channel 1 (Ch1).
The FX3U-4AD-PT-ADP is the first analog module to the left of the PLC. As
such, it uses device addresses M8260-M8269 and D8260-D8269.
59
8.2 Indicator Lights
The PLC has indicator LEDs for its inputs and outputs as well as Status LEDs on
the front face of the main unit.
There are two sets of I/O indicator LEDs, one set for inputs, one set for outputs.
When X000 is being driven (ON), LED 0 in the input section is ON. When Y000
is being driven (ON), LED 0 in the output section is ON, etc.
There are 4 LEDs on the far right of the main unit which are status LEDs.
1st LED indicates that power is being supplied to the PLC.
2nd LED is ON when the PLC is in RUN mode, OFF when in STOP mode.
3rd LED turns ON when the battery voltage is low.
4th LED has two purposes:
o Blinking indicates that there is an error in the program.
o Steadily ON indicates a CPU problem, such as removing the memory
cassette while the unit was still powered and in RUN.
Input Indicator LEDs
Status LEDs
Try accessing the Chapter 8; Training Kit Layout screen by using the GOT
touch-screen and get used to the GOT interface and layout.
The FX-TRN-KIT-R Training Kit also has hard-wired Digital Input Switches,
Analog Input Dials, High-Speed Input Switches and Dials, and a PT
Temperature Sensor for users to interface with the PLC. The analog output
channel 1 from the FX2N-5A is displayed on the Analog Output Meter which will
be discussed later in Section 13.15 of this Training Manual. All hard-wired inputs
and outputs can be re-routed manually to other peripheral devices and
equipment by using the Auxiliary Inputs and Outputs. For this, please refer to
the circuit and wiring diagram included with the training kit.
60
CHAPTER 9 PLC Instruction Types
To write a ladder program for a PLC, it is necessary to be familiar with the instructions
available in the PLC instruction set. An overview is provided here, with more detailed
information to follow in later chapters.
More information on all instructions can be found in great detail in the FX Programming
Manual corresponding to the associated PLC model.
Step ladder instructions are used in Step Ladder Programming (STL). This
programming style is similar to Sequential Function Chart (SFC) programming in
that it implements a flow chart of the system operations, but with STL the flow
chart is implied and actually created in ladder code. When programming in
ladder code, the STL contact is a common instruction used to check if a state is
active. S relays are used to indicate states.
STL Programming is not covered in this training. However, a full explanation and
examples can be found in Chapter 34.2 of the FX3U & FX3UC Programming
Manual - Basic & Applied Instructions Edition.
61
62
CHAPTER 10 Basic Instructions
Basic instructions are bit, timer, and counter control instructions and typically make up a
majority of the ladder program. They are used to confirm input statuses, manipulate
outputs, shift bits, and perform master control for nesting loops or other ladder code.
10.1 Symbols
NORMALLY OPEN CONTACT. This contact is active while the
associated device coil is being driven. The mnemonic is LD,
which stands for LOAD. This symbol occupies 1 step of program
memory.
It is important that the above concepts are clear before moving on. The symbols
above show the instructions represented in their inactive state. When a contact
is active, intuitively it means electricity is allowed to flow through.
63
For example, a light switch is usually in the OFF position (inactive), no current is
flowing (the switch is open) until someone turns it ON (drives it, making it active).
At this point, electricity starts to flow (the switch is closed) and the lights turn ON.
A light switch can be thought of like a normally open contact.
The normally closed contact is the opposite in every respect. Current flows until
the switch is turned ON. A common example of this is an Emergency Stop
switch (E-Stop). The circuit allows current to flow until an operator hits the switch
in an emergency. The switch turns on and the current flow stops.
If two or more instructions are positioned in series (one after another, shown
below), they are operated with an AND relationship. In order for current to flow
through the rung, all the contacts must be active. In this example, only if X000 is
active, X001 is inactive, and X002 is active simultaneously will Y000 be driven.
If two or more devices are in parallel (one below another, shown below), they are
operated with an OR relationship. OR conditions provide multiple paths for the
current to flow. In this example, if X000 is active, or if X001 is inactive, or if
X002 is active, Y000 will be driven.
64
AND/OR conditions can be combined to create complex rungs of logic.
Note: A rung must have an input instruction (like LD or LDI), and an output
instruction (like OUT) to be a complete circuit. If an output instruction is
meant to always be on, there is a special auxiliary relay which can be
used with the LD instruction in front of it, addressed M8000. This bit is on
while the PLC is in RUN. Connecting an output coil or bracket control
instruction directly to the left vertical ladder rail is not allowed.
For a visual simulation of how these basic instructions are handled, access the
Section 10.2; Basic Instructions screen on the GOT of the FX-TRN-KIT-R
Training Kit. Use the hard-wired digital input switches and GOT touch-screen to
drive contacts in the simulated ladder code.
The set instruction (SET) latches the specified bit device ON. The reset
instruction (RST) releases the latch. When RST is used with a word device, the
word device value is set to 0.
The rising edge pulse instruction (PLS) triggers on the positive edge of the input
condition, while the falling edge pulse instruction (PLF) triggers on the negative
edge of the input condition. Both result in the setting the specified device ON for
1 ladder scan only.
65
Another method for pulsing contacts is the rising edge and falling edge pulse
instructions. These contacts activate only for one scan, similar to PLS and PLF.
The alternate state instruction (ALT) toggles the state of the specified bit device.
If the bit device is active, the ALT instruction makes it inactive and vice versa.
The zone reset instruction (ZRST) is used to reset a range of devices, rather than
resetting single devices as RST does. The devices can be bits, words, timers, or
counters with the starting and ending device addresses specified. When ZRST is
used with word devices, the word device values are set to 0. The second
argument (ending device address) of the instruction must be higher than the first
argument (starting device address).
66
For a visual simulation of these common instructions, access the Section 10.3;
Common Instructions screen on the GOT of the FX-TRN-KIT-R Training Kit.
Use the GOT touch-screen to drive and pulse contacts in the simulated system.
1) X001 turns on and sets Y003. What happens to Y003 when X001
turns off?
4) List the common basic instructions and common instructions (like PLS)
and describe what they do.
67
68
CHAPTER 11 Developing & Editing Programs
Now is the time to put to work some of the knowledge that has been covered so far. In
this chapter an overview will be given on launching GX Developer, writing a simple
program, downloading it to the PLC and testing its operation, while investigating some
of the tools in the GX Developer software along the way.
o Launch GX Developer.
o Enter instructions to write a small ladder program.
o Transfer the ladder program between the PLC and the laptop or PC.
o Perform Online editing.
o Monitor the Program.
o Change PLC device values with the software.
o Monitor PLC device values in data registers.
GX Developer will run on Windows 95, 98, NT, 2000, XP, and Vista.
GX Developer can be started in one of 2 ways:
1) Double-clicking on the shortcut icon if one is present.
2) Selecting it from the Start Menu. The default path is Start All Programs
MELSOFT Application GX Developer.
Once started, a screen similar to the one on the next page will appear:
69
Toolbars
Workspace
The dark gray area is the workspace where all work windows will appear. Most
of the toolbars that are open are but rarely used. These can be closed down to
make the workspace larger:
70
11.3 Editing the Ladder
Follow the steps below to create a simple ladder program.
1) Click on the Normally Open (NO) Contact hotkey (like the symbol)
2) Type X0 into the dialog box that pops up and click OK
3) Double-click inside the placement box (cursor, or blue square by default)
4) The dialog box has a combo box on the left. Select the Normally Closed
(NC) symbol. Type X1 in the textbox on the right and press OK.
5) Press the F7 key. Type Y0 in the textbox and press OK.
NOTE: The F7 key may not work depending on the selected keyboard layout. Under Tools
menu, in Customize Keys, the keyboard shortcuts can be set to one of 3 standard sets. 7 is
the key in MEDOC format for a coil. In GPPQ and GPPA the key is F7. The default
keyboard on a new installation of GX Developer is GPPQ format. This can be changed to
whichever keyboard layout a user is most familiar and most comfortable with.
Steps 1-7 show how to create an entire rung of ladder code using each of the 5
ways to enter symbols. Next, follow the steps below to edit the ladder code.
Notice that Undo is grayed out. There is only one level for Undo.
Insert Rung and Insert Row add space for a new rung or new contact. Use
Insert Row to put X0 and X2 back into their respective locations.
Connect lines and rungs together by using the Free-draw Line hotkey (F10) or
Draw Vertical Line hotkey (Shift+F9). Now the two lines should be back
together in a single rung.
71
Notice that the rung is highlighted in gray. This means that the rung is only
tentative ladder code and has not been set in the program yet. Go to the Convert
menu and select Convert, or convert the ladder by right-clicking in the
workspace or by pressing the F4 key. The gray highlight disappears. If the
tentative ladder code has errors or does not form a complete circuit, the
conversion will fail with an error message. The software will not allow saving or
downloading of programs containing unconverted code.
Click on the View menu and select Instruction List. The ladder logic diagram
disappears and is replaced by abbreviations and the addresses:
This is the ladder program written out in instruction list format, which is the
program format that the PLC actually understands. Ladder can be displayed
again by going back to the View menu. Instead of Instruction List, Ladder is
now displayed.
Save the program by clicking on the Save hotkey in the toolbar, or by pressing
Ctrl+S. Enter the Project Name as FXPROG1. Click Yes on the dialog box to
save the project.
72
5) Connect the PC to the front USB port of the GOT if it is not already
connected and press Connection test (to the right side of the large dialog
box) to test the connection.
6) If communication is successful, make sure to select OK in the large
dialog box to save the new communication settings.
To transfer a program to the PLC, the PLC must be in STOP mode. This can be
done by setting the key switch on the PLC to the STOP position, or remotely by
using the software. If the PLC is in RUN, a Remote Stop can be performed
manually, but if an attempt is made to download to a PLC which is in RUN, the
software automatically prompts to Remote Stop the PLC and then downloads
the program. When program download is complete, it will then prompt to
Remote Start the PLC.
Two other options in the Online menu are Read from and Verify with the PLC.
Read from PLC uploads the program from the PLC to the PC and displays it in
GX Developer. This would be used to make changes to an unprotected program
in the PLC without having the original GX Developer project.
Verify with PLC compares the program that is open in GX Developer with the
program in the PLC. This is especially useful in an environment where several
employees have the ability to make changes to a program. This prevents the
programmer from inadvertently writing over unsaved changes made by a co-
worker or themselves.
11) Close the verification screens by either pressing the X in the upper right
corner of the window, or by selecting Close from the left-most menu.
Thought the FX3U and FX3UC should have no problems, for non-FX3U PLCs it
may appear that very small programs take a long time to download. This is
because no matter how many ladder logic steps are in the program, GX
Developer always downloads at least 8000 steps for the FX1N and FX2N at a
lower communication speed than with the FX3U and FX3UC. It is possible to
speed the process up considerably but be careful when using this shortcut to
ensure that all code including the END instruction is downloaded.
1) Take note of the final step number next to the rung with the END
instruction.
2) Go to the Online menu and select Write to PLC.
3) Select Programs-Main and Parameter-PLC parameter as usual.
4) Click on the Program tab.
5) Change the Range type to Step Range.
6) Adjust the range accordingly in the Start and End columns.
7) Press Execute and then select Yes to continue.
74
At this point the new program exists in the PLC, but not on the PC. Therefore,
before leaving Monitor (Write Mode), remember to save the project.
The current rung is called a LATCH and HOLD circuit and is very common.
X010 is a momentary contact, such as a pushbutton, that starts a machine.
Without the branch (second line, OR Y000), the machine would only run as long
as the pushbutton was held down. But with this circuit, when Y000 turns on it
keeps the branch active, even if X010 becomes inactive. To turn the machine
off, it is necessary to toggle the stop button, X011.
A small box will pop up, indicating the mode (RUN or STOP) of the PLC and the
maximum scan time recorded thus far for the ladder program.
Notice that X010 and Y000 are not highlighted, and X011 is highlighted. This
indicates whether an input device is active or not, or if an output coil is being
driven. A highlighted contact is active (conducting), and a highlighted coil is
being driven. For now, the LD X010 and LD Y000 instructions should be
inactive, because they are NO contacts. The LDI X011 instruction, on the other
hand, which is a NC contact, should be active.
This feature allows the user to monitor multiple rungs in a non-sequential order.
75
3) Change the device addresses of the contacts and coils (i.e. X000, X001,
Y001, and X002, X003, Y002, etc.) to create four different rungs.
4) Perform a Convert (Online Change).
5) Switch the ladder diagram to Monitor Mode.
6) Go to Monitor in the Online menu, and select Entry Data Monitor.
7) Select Tile Horizontally from the Window menu.
8) In the bottom window (the ladder code window) highlight the 4th rung.
9) Click and hold on the highlighted rung and drag it to the upper window
10) Repeat steps 8 and 9 for the 1st rung and 3rd rung.
11) Click on the upper window (Entry Data Monitor) to make it the active window
and maximize it.
12) Switch the window into Monitor Mode (Note that each window must be
switched to Monitor Mode individually).
13) Toggle the associated switches and watch the results.
This is the easiest way to turn contacts and relays OFF and ON without wiring
external switches. Forcing is not recommended when the PLC is connected to a
running system, however. There is no dialog box that warns of the change that is
about to happen, and dangerous results could occur.
4) In the Device Test window, type D0 into the Device textbox in the Word
device/buffer memory section.
5) Enter 10 into the Setting Value textbox.
6) Click Set to write the value 10 into D0.
Check to see that a 10 has been written into data register D0.
Once the ladder program has been entered into GX Developer and written to the
PLC in the training kit, access the Section 11.8; Exercise Contacts and Coils
screen on the GOT. If the ladder code is entered correctly, the application
simulation should run smoothly. This screen is meant to help students visualize
applications that could be controlled with even the simplest of ladder code.
77
78
CHAPTER 12 Timers and Counters
Timers and counters are standard parts of a PLC program. This chapter will cover the
various types of timers and counters available with the FX series PLCs as well as how
to code them. Exercises will help users in their understanding of the concepts.
12.1 Timers
Availability
Types
Set Value
The Set Value is the length of time a timer device runs before the timer value
stops incrementing and the device contact becomes active. The set value is
79
registered in multiples of the timer devices time interval. Thus T0, with a set
value of 50, runs for 5 seconds (50 x .1 seconds = 5 seconds).
The set value must be an integer between 1 and 32,767, because all timer
devices are 16-bit registers and can only count up. Set values can either be K
values (decimal constants), or word devices, such as a D register. When word
devices are used as the set value, the timer duration can be adjusted from an
HMI or within the ladder program by changing the word device value.
Reset (Retentive)
The accumulated timer value of a timer device returns to 0 and the device
contact becomes inactive when the input conditions of the rung become inactive
unless the timer is a retentive. To return a retentive timers timer value to 0 and
switch the device contact to inactive it is necessary to use the RST instruction.
Non-retentive timers will lose their timer values and device contact status at PLC
STOP or power loss. Retentive timers will keep both their timer values and
device contact status at PLC STOP or power loss.
Programming
Timer devices are programmed using the OUT instruction and two arguments,
first the timer device address, and second, the set value. The resulting ladder
code is shown below.
12.2 Counters
Availability
Set Value
The Set Value is the number of times the counter devices input
conditions switch from inactive to active before the counter value stops
incrementing and the device contact becomes active. Thus, if C0 had
input condition X000 and set value 5, X000 would have to switch from
OFF to ON 5 times before the C0 device contact would become active.
For 16-bit counters, the set value must be an integer between 1 and
32,767, meaning that they can only count up. Set values can either be K
values (decimal constants), or word devices, such as a D register. When
word devices are used as the set value, the counter limit can be adjusted
from an HMI or within the ladder program by changing the word device
value.
The accumulated counter value of a 16-bit counter never goes above the
set value. Once the counter device contact has become active, it will
remain active until it is reset. Even if the counter value is manually
adjusted, the counter device contact will not become inactive.
Counting direction
Reset
Limitations
The only way to make a 16-bit counter count down is to decrement the
counter value with ladder code prior to the counter value reaching its set
value. Once the counter device contact becomes active, the only way for
it to become inactive is to use the RST instruction. The counter value will
appear to count down, but the counter device contact will remain active.
81
Manually adjusting the counter value up is possible, but the device contact
will not become active. The final count up to the set value must be from a
transition from inactive to active of the counter rungs input conditions.
Programming
16-bit counter devices are programmed using the OUT instruction and two
arguments, first the counter device address, and second, the set value.
The resulting ladder code is shown below.
In this example, each time X000 switches from inactive to active, the
counter value of C0 is incremented. When the counter value is 10, its
contact device becomes active.
32-bit counters
Set Value
The Set Value is the counter limit value which the accumulated counter
value must exceed (count from below the set value to above it) before the
device contact becomes active. Thus, if using C235 with a set value of
5000, the C235 counter value (triggered by X000) would have to go from
4999 to 5000 before the C235 device contact would become active.
The accumulated counter value of a 32-bit counter can exceed the set
value. Once the counter device contact has become active, it will remain
active until it is reset or the counter value counts back down through the
set value. If the counter value is manually adjusted through the set value,
the counter device contact will not become inactive.
Counting direction
32-bit counters can count up or down. The counting direction for 32-bit
counters is based upon the status of special auxiliary relays M8200-
M8255, with the device address corresponding to the device address of
the 32-bit counter. If the relay is inactive, the corresponding counter
counts up. If the relay is active, the corresponding counter counts down.
82
Reset
Limitations
While 32-bit counters can have negative presets, the counter device
contact will still become active only by counting up to the set value from a
smaller number.
For example, if counter C200 has a set value of -10, when the counter
counts down from -9 to -10, the device contact will not become active. If
the counter counts down to -11 and then counts up to -10, then the
counter device contact will become active.
Manually adjusting the counter value is possible, but the device contact
will not become active. The final count up to the set value must be from a
transition from inactive to active of the counter rungs input conditions.
Programming
32-bit counter devices are programmed using the OUT instruction and two
arguments, first the counter device address, and second, the set value.
The resulting ladder code is shown below.
In this example, each time X000 switches from inactive to active, the
counter value of C200 is incremented or decremented. When the counter
value goes from 99,999 to 100,000, its contact device becomes active.
High-Speed Counters
Overview
The PLC requires high-speed counter devices to count pulse train input
signals (around 20 per second or higher) and process them in the ladder
program. These input signals can come from peripherals like ultrasound
sensors or pulse train positioning equipment.
83
Specifications
The high-speed counter devices in FX series PLCs share all the same
properties as a normal 32-bit bi-directional retentive counter, but using
pre-defined physical inputs and combinations of physical inputs as the
input conditions. Furthermore, these high-speed counters can be divided
into attribute categories, including Hardware Counters or Software
Counters, and 1-Phase or 2-Phase. The number of high-speed inputs
available and the permitted frequency range of the inputs depend on the
FX series PLC model used. Please refer to the associated users manual
for more details on the high-speed input specifications.
Limitations
Programming
In this example, while X010 is active, each time X000 switches from
inactive to active, the counter value of C235 is incremented or
decremented. When the counter value goes from 99,999 to 100,000, its
contact device becomes active.
For this training, the FX3U will be used with hardware counters C235 and
C236, corresponding to high-speed physical inputs X000 and X001,
84
respectively. These high-speed inputs can be simulated with the high-
speed input switches and dials located on the FX-TRN-KIT-R Training Kit.
When developing logic, try to think with the words AND and OR, for example
When X012 AND X013 are ON, OR when X14 is ON, timer T0 operates.
Toggle the X014 switch to ON and monitor the timer value in Monitor Mode.
Toggle the X014 switch to OFF and notice the timer value returns to zero.
Timers T0-T199 are 100ms timers and T200-T245 are 10ms timers. The set
value, K40, is a multiplier meaning 40 x 100ms = 4 seconds. After the timer
reaches 4 seconds, the T0 contact will become active.
Add the following ladder code after the previous rung and write it to the PLC.
Toggle X012 AND X013 to ON. When T0 reaches 40, the T0 contact will
become active, turning on the output Y001.
When the PLC starts running, the T2 normally closed (NC) contact is active. This
drives the T2 timer up to 20 seconds (200 x 100ms). When the timer reaches 20
seconds, the T2 contact conducts, driving the Y002 coil. Since this example
uses a NC contact as the input condition to T2, when the T2 contact conducts the
NC contact becomes inactive, automatically resetting the timer value and device
contact. When the timer resets, the T2 contact becomes inactive again, causing
the NC contact to conduct, which starts the timer operation again.
The result is the T2 normally open contact will be active for 1 ladder scan every
20 seconds, creating a timed output pulse.
85
Initially the T3 NC contact conducts, driving the T4 timer up to 5 seconds. When
the T4 device contact becomes active, it drives the T3 timer up to 3 seconds.
After 3 seconds the T3 contact becomes active, opening the T3 NC contact,
which then resets T4 and T3.
The result is Y003 will be OFF for 5 seconds and then ON for 3 seconds.
In this example, X000 initially drives Y010 when T5 is inactive. Once Y010 is
ON, it stays ON regardless of X000 due to the branch. After X000 turns OFF,
both the X000 NC contact and the Y010 NO contact are active, driving T5 for
seconds before the T5 NC contact resets the first rung along with Y010.
In this example, X011 initially drives Y001. At the same time timer T1 starts to
operate. Once the T1 device contact becomes active, it turns Y001 OFF. Y001
will not turn ON again until after X011 has turned OFF and timer T1 is reset.
A quick calculation shows that the longest time duration that can be handled by a
timer is 32,767 x 0.1 sec / 60 = 54.36 minutes. What happens if it is necessary to
run a timer longer than this? One answer is to use a combination of timers and
counters together like the program below:
86
While X016 is ON, T0 is driven for 1 minute. After 1 minute, T0 causes C0 to
increment. After 60 increments (1 hour), C0 becomes active, incrementing C1.
After 24 hours C1 would become active and set a day counter.
Note: The program shown above is not complete. What needs to be added
to make it work properly?
Two other handy timer instructions within the FX series instruction set are the
Teaching Timer (TTMR) and Hour Meter (HOUR) instructions.
The TTMR instruction measures the amount of time the input conditions are on in
100ms increments. It amplifies this value converted to seconds by a
magnification factor and stores this augmented value into a specified word device
(D). The current measurement value in 100ms increments is constantly written
to the next consecutive word device (D+1). Once the values are stored in the
PLC device memory, they can be used as set values to other timers, etc.
The HOUR instruction is a built-in hour meter. The instruction times the number
of seconds its input conditions have been active (D1+1) and stores the number
of hours in a specified word device (D). After the set value of hours (S) is
reached, the specified output bit device (D2) will turn ON.
87
It is recommended that the devices used to store the current value in hours and
seconds should be in the retentive device range of the PLC so that they are not
lost during PLC STOP or power loss. This function can be coded as DHOUR to
use 32-bit registers and store longer time frames.
Once the ladder program has been entered into GX Developer and written to the
PLC in the training kit, access the Section 12.5; Exercise Timers and
Counters screen on the GOT. This screen is meant to help students visualize
the timer and counter operations for further understanding.
Once the ladder program has been entered into GX Developer and written to the
PLC in the training kit, access the Section 12.6; Exercise Conveyor Control
screen on the GOT. If the ladder code is entered correctly, the application
simulation should run smoothly. This screen is meant to help students visualize
the application described in this exercise for easier programming and debugging.
88
CHAPTER 13 Applied Instructions
Applied instructions are the advanced instructions of the FX line. These instructions
allow the PLC to perform complex data manipulations, mathematical operations, and
communications. Most applied instructions work on the 16-bit or 32-bit word level.
Example
This instruction adds the contents of Source 1 (D0) to the contents of Source 2
(K2) and places the result in the Destination register (D300).
Example
In this case, the Source 2 and the Destination registers are the same register. If
D0 contains 9 and D300 contains 200 prior to the execution of the instruction,
then when the instruction is executed, 9 is added to 200, and the result (209) is
placed in D300.
Most of these instructions continue to execute once every scan while the input
conditions are active. Sometimes this is not what is wanted. While the user may
want to increment a data register by 1 (with INC) when an input turns ON, the
INC instruction will increment the data register once every scan as long as the
input is on. This could be hundreds of times every second.
89
To avoid this, the user must use pulse instructions, similar to those described in
Section 10.3 of this Training Manual. To change an applied instruction to a pulse
version, add a P as a suffix to the instruction.
Examples:
Executes the division only once when the input conditions become active.
Data transfer instructions must be placed at the end of the rung (right side).
When the input conditions are active, the data transfer instruction is performed.
The move (MOV) instruction moves, or actually copies, data from the source
location to the destination location (after the instruction is executed, both
registers contain the same data). Two variants of this instruction are DMOV,
which uses 32-bit values, and DEMOV, which uses 32-bit floating point values.
In this example, while X011 is ON, the value in data register D1 is copied to D2.
The block move (BMOV) instruction moves (copies) the specified number of
word devices starting from the source location to the same number of word
devices starting at the destination location. This instruction is not available for
32-bit data, since the number of words to move could simply be doubled.
In this example, while X011 is ON, three data registers starting at D1 are copied
to three data registers starting at D7.
90
FMOV Fill Move
DFMOV 32-Bit Fill Move
The fill move (FMOV) instruction moves (copies) the specified data value from
the source into the specified number of word devices starting at the destination
location. The DFMOV instruction uses 32-bit numbers, so the source refers to
two consecutive word devices, and the destination refers to 2x the number of
words specified starting at the destination location.
In this example, while X011 is ON, data registers D1 and D2 are copied to D10
and D11, D12 and D13, and D14 and D15.
For any of the data transfer instructions, a group of bit devices can be specified
instead by using a prefix of K and a number between 1 and 8.
In this example, while X012 is ON, 16-bits (4 nibbles of 4 bits each) starting at
X000 are copied into the 16-bit data register D100.
The value after K determines how many nibbles will be used in the operation.
The compare instructions must be placed at the end of the rung (right side).
When the input conditions are active, the comparison instruction is performed.
CMP Compare
DCMP 32-Bit Compare
DECMP Floating Point Compare
The compare (CMP) instruction compares one 16-bit value to a second 16-bit
value, and writes the results of the comparison to a group of 3 bit devices, which
can be Y outputs, M relays or S relays. The 3 result bits represent source data 1
being greater than, equal to, or less than source data 2, respectively.
91
In this example, while X011 is ON, bits M0, M1 and M2 show the comparison
results as follows:
M0 turns ON if the value in D0 is greater than 10.
M1 turns ON if the value in D0 equals 10.
M2 turns ON if the value in D0 is less than 10.
Two variants of this instruction are DCMP, which compares two 32-bit values,
and DECMP, which compares two 32-bit floating point values.
The zone compare (ZCP) instruction compares one 16-bit value to a specified
value range and writes the results of the comparison to a group of 3 bit devices,
which can be Y outputs, M relays or S relays. The 3 result bits represent source
data 3 being less than, within, or greater than the range specified by source data
1 and 2.
In this example, while X011 is ON, bits M0, M1 and M2 show the zone
comparison results as follows:
M0 turns ON if the value in D0 is less than 10.
M1 turns ON if the value in D0 between 10 and 50, inclusive.
M2 turns ON if the value in D0 is greater than 50.
Note that the value of source data 1 needs to be less than that of source data 2.
If it is not, the PLC will still accept the instruction, but it will not function properly.
Two variants of this instruction are DZCP, which compares a 32-bit value to a
32-bit range, and DEZCP, which compares a 32-bit floating point value to a 32-bit
floating point range.
INLINE COMPARISONS
Unlike all of the comparison instructions discussed so far, the inline compare
instructions can be placed anywhere within the rung. They function in the same
way as any other input condition or contact. These instructions are only available
on the FX1S, FX1N, FX2N, FX2NC, FX3U, and FX3UC PLCs. These
instructions were not available on older FX PLCs.
In this example, while the value in D0 is less than 10, output coil Y001 is driven.
92
Inline Compare Instruction 16-Bit Data 32-Bit Data
Greater Than LD> LDD>
Greater Than or Equal To LD>= LDD>=
Equal To LD= LDD=
Less Than or Equal To LD<= LDD<=
Less Than LD< LDD<
Not Equal To LD<> LDD<>
In this example, when the T10 timer value reaches 6, output Y001 is driven.
The compare, zone compare, and inline compare instructions shown above are
16-bit instructions by default. As described at the beginning of the chapter, if a
32-bit comparison is required, it is necessary to add a D to the instruction. For
example DCMP, DZCP, LDD=, LDD>, etc.
This is very important to remember in the case of comparing values like high-
speed counters. These counter values are 32-bit by default and will not function
properly with a standard 16-bit comparison instruction.
When a car comes in, count the car. When a car goes out, reduce the current
count by 1. When the lot is full, turn ON the Lot Full sign. Assume for this
exercise that a car can not come in and go out at the exact same time, but note
that in a real-life situation, this must be accounted for.
Once the ladder program has been entered into GX Developer and written to the
PLC in the training kit, access the Section 13.4; Exercise Parking Lot screen
on the GOT. If the ladder code is entered correctly, the application simulation
should run smoothly. Use the GOT touch screen to adjust D0 to an initial value
of 10. Use different values in D0 later for further understanding. This screen is
meant to help students visualize the application described in this exercise for
easier programming and debugging.
93
13.5 EXERCISE Conveyor Control Part 2
Rewrite the Conveyor Control program from Section 12.6, using ONLY ONE
timer with compare statements to control the outputs.
Once the ladder program has been entered into GX Developer and written to the
PLC in the training kit, access the Section 13.5; Exercise Conveyor Control 2
screen on the GOT. If the ladder code is entered correctly, the application
simulation should run smoothly. Use the GOT touch screen to select the Timer
device for monitoring. This screen is meant to help students visualize the
application described in this exercise for easier programming and debugging.
The conversion instructions must be placed at the end of the rung (right side).
When the input conditions are active, the conversion instruction is performed.
Instructions are available to convert data to and from most of the numerical
formats and ASCII strings. The instructions which will be covered in this training
will convert integer numbers to floating point numbers and back.
The float (FLT) instruction converts a 16-bit integer into a 32-bit floating point
value. DFLT converts a 32-bit integer to a 32-bit floating point number.
In this example, while X011 is ON, the integer value stored in D0 is converted to
a floating point value and stored in D10 and D11.
Note: Remember that floating point numbers can also be expressed as constants
using the E prefix, as described in Chapter 6 of this Training Manual.
The integer (INT) instruction converts a 32-bit floating point number into a 16-bit
integer value. Only the integer portion is converted. Any fractional values are
lost. DINT converts a 32-bit floating point number to a 32-bit integer number.
In this example, while X010 is ON, the floating point value stored in D10 and D11
is converted to a 16-bit integer value and stored in D1. Note that if the floating
point value used in the INT instruction is larger than a 16-bit integer, the
instruction will not be executed. The value in the destination register will remain.
94
13.7 Increment and Decrement Instructions
The increment and decrement instructions must be placed at the end of the rung
(right side). When the input conditions are active, the instruction is performed.
INC Increment
DINC 32-Bit Increment
DEC Decrement
DDEC 32-Bit Decrement
The increment and decrement (INC and DEC) instructions simply add or subtract
1 from the value in a 16-bit data register. These instructions execute nearly twice
as fast as the ADD or SUB instructions, and are not subjected to the limitations of
a counter. These instructions can be coded to operate on 32-bit numbers as
DINC and DDEC. Note that all of these instructions will most likely be used as
pulse instructions (INCP, DECP, DINCP, and DDECP).
Once the ladder program has been entered into GX Developer and written to the
PLC in the training kit, access the Section 13.8; Exercise INC and DEC
screen on the GOT. If the ladder code is entered correctly, the differences
between INC and INCP, and DEC and DECP should be noticeable immediately.
This screen is meant to help students visualize the instructions used in the
project for further understanding.
The arithmetic instructions must be placed at the end of the rung (right side).
When the input conditions are active, the instruction is performed.
95
Note how all 32-bit instructions as well as all floating point instructions are
prefixed with a D since they all operate on 32-bit numbers. The instructions
that are also prefixed with an E indicate floating point format. Also note that
due to the nature of multiplication and division, the 16-bit instructions produce a
32-bit result and the 32-bit instructions produce a 64-bit result. For more details,
refer to the FX3U & FX3UC Programming Manual - Basic & Applied Instructions
Edition.
Integer square root requires a little more explanation. The calculated square root
value will be an integer number with all fractional values ignored, unless floating
point is being used. If decimal places are ignored, special relay M8021 turns ON.
In this example, while X011 is ON, 30 is added to the value in register D0 and the
result is placed in D10 every scan.
Once the ladder program has been entered into GX Developer and written to the
PLC in the training kit, access the Section 13.10; Exercise Binary Math
screen on the GOT. If the ladder code is entered correctly, the arithmetic
operations should be performed accurately depending on inputs X010-X013.
This screen is meant to help students visualize the arithmetic instructions in both
their 16-bit (or 32-bit) decimal and binary form for further understanding.
Once the ladder program has been entered into GX Developer and written to the
PLC in the training kit, access the Section 13.11; Exercise Parking Lot 2
screen on the GOT. If the ladder code is entered correctly, the application
simulation should run smoothly. Use the GOT touch screen to adjust D0 to an
initial value of 10 and reset the car count and cash total using the M10 push
button. Use different values in D0 later for further understanding. This screen is
meant to help students visualize the application described in this exercise for
easier programming and debugging.
96
13.12 EXERCISE Conveyor Control Part 3
This is a modification of the Conveyor Control 2 program from Section 13.5. Add
ladder code to set the number of cycles the conveyor system will run (D0)
continuously. The number of cycles must be a value between 5 and 15. If it is
not a value between 5 and 15, do not let the conveyor system start. For this
exercise, assume that D0 is not changed during operation, but note that in a real-
life situation, this must be accounted for.
Once the ladder program has been entered into GX Developer and written to the
PLC in the training kit, access the Section 13.12; Exercise Conveyor Control
3 screen on the GOT. If the ladder code is entered correctly, the application
simulation should run smoothly. Use the GOT touch screen to adjust the value of
data register D0. This screen is meant to help students visualize the application
described in this exercise for easier programming and debugging.
The FX3U has built-in high-speed counters as discussed in Section 12.2 and
built-in high-speed inputs and outputs as discussed briefly in Section 2.7.
While it is possible to use the normal SET, RST and comparison instructions with
high-speed counters, these instructions are scan dependent and therefore limit
the benefits of high-speed counters. To obtain full benefit of the high-speed
counters, use the following high-speed counter processing instructions.
The high-speed counter set (HSCS) instruction functions like the standard
SET instruction. When the specified high-speed counter reaches the
specified value, the specified bit device is set. This instruction uses
interrupts and is independent from the scan.
In this example, the instruction sets Y010 (to ON) when the value of high-
speed counter C255 is 100.
97
HSCR High-Speed Counter Reset
In this example, the instruction resets Y010 (to OFF) when the value of
high-speed counter C255 is 200.
Notice that DHSCS, DHSCR, and DHSZ are used as the operation
instead of HSCS, HSCR, and HSZ. Remember that high-speed counters
are 32-bit devices, so D must prefix the instruction.
For this training, only two of the most basic instructions will be covered. For
more details on high-speed processing and positioning instructions, refer to
Chapters 13, 20, 24, and 32 of the FX3U & FX3UC Programming Manual - Basic
& Applied Instructions Edition.
98
There is also a DSPD instruction which will measure the frequency of a
high-speed input signal and place the result into a 32-bit word device.
In this example, while X010 is ON, the pulse density over 1 second (1000
x 1ms, or Hz) from high-speed input X000 is written to D0 every scan.
Note that the high-speed physical input device address (i.e. X000) for this
instruction can not be used simultaneously for any other high-speed
counter or high-speed processing instruction.
There is also a DPLSY instruction which will output 32-bit value length
signals at 32-bit value frequencies.
In this example, while X010 is ON, a pulse train of 32-bit length stored in
D2-D3 and 32-bit frequency stored in D0-D1 is output on high-speed
output terminal Y000.
Note that the input conditions for the PLSY/DPLSY instruction need to be
active for the entire time that the pulse train is being output. If the input
conditions become inactive, the pulse train will stop, regardless of whether
the specified length of pulses has been output or not. Furthermore, upon
completion of the pulse train output, to execute the same rung again, the
input conditions must be turned OFF and then back ON to output the next
pulse train. To detect whether or not the PLSY/DPLSY instruction is
complete, use the special auxiliary relay M8029 which turns ON when all
pulses in the pulse train have been output. For more information on
M8029, refer to the FX3U & FX3UC Programming Manual - Basic &
Applied Instructions Edition.
Once the ladder program has been entered into GX Developer and written to the
PLC in the training kit, access the Section 13.14; Exercise High-Speed I/O
screen on the GOT. If the ladder code is entered correctly, the simulation should
run smoothly. Use the high-speed inputs for X000 and X001 and digital input
X010 on the training kit to simulate the encoder and sensor inputs. This screen
is meant to help students visualize the simulated encoder, sensor, and high-
speed output system described in this exercise for further understanding of the
high-speed processing instructions and for easier programming and debugging.
The FX3U and FX3UC PLCs have a left side bus linked directly to the CPU. This
bus is used with boards (BDs) (FX3U only) and special adapters (ADPs) for
various functions. It is important to understand that the main difference between
the left side bus BDs and ADPs and right side bus SFMs is that the left side bus
BDs and ADPs contain no internal memory. All processing using the left side
bus is done through the device memory and the CPU. Dedicated Special
Auxiliary Relays (M8000 and up) and Special Data Registers (D8000 and up) are
used for dedicated instructions and purposes. The following two sections will
contain example projects demonstrating the use of the left side bus. Use of the
right side bus will be covered later in Section 13.18 TO/FROM Instructions. For
a full list of the special device memory addresses, functions, and purposes, refer
to Chapter 36 of the FX3U & FX3UC Programming Manual - Basic & Applied
Instructions Edition.
Access the Section 13.16; Exercise Temperature Sensor screen on the GOT.
The temperature will be displayed on the GOT screen. Use the GOT touch
screen to switch between Celsius and Fahrenheit and adjust the temperature
measurement averaging time (D8264). Note that the operations with the ADP
are done automatically, and therefore there is no ladder code required. This
100
screen is meant to show students the simplicity of the temperature sensor
adapter as well as other analog adapters for further understanding.
Please find Project 5 in the appendix. This project is intended to give the student
practice in using the special device memory associated with the FX3U left side
bus BDs and ADPs and show an example of the FX built-in serial networking
capabilities. This ladder program also shows an example of index register use.
Use the following wiring diagram (duplicated from the FX3U Data Communication
Edition manual) with twisted pair cables to connect two FX-TRN-KIT-R training
kits within 50m of each other. Terminal resistors do not need to be added for the
FX3U range of RS-485 devices.
In the Project 5 ladder program, Parallel Link does not require any special
communication parameters to be specified and therefore special data register
D8120 should be set to the default value of 0. Furthermore, Parallel Link is self-
refreshing, meaning that as soon as a master successfully detects a slave, the
Parallel Link becomes active. The only other ladder code necessary for
101
connection is that special auxiliary relay M8070 needs to be driven in the master
station and M8071 needs to be driven in the slave station. In this example
program, M0 will be used to switch between Master and Slave. Note that on the
FX-TRN-KIT-R training kit, the FX3U-485-BD is used, meaning that serial
communication channel 1 (Ch1) is being used. On other systems, if Ch2 is to be
used, M8178 must be driven in addition to the master or slave special auxiliary
relay. The Project 5 ladder program is designed to establish a Parallel Link
connection and control physical output terminals Y000-Y003 on both PLCs
determined by simple NO contact and NC contact logic. Also, data registers
D490-D491 and D500-D501 are updated between the PLCs while the Parallel
Link is active, shown on the GOT as X/Y-coordinate movement. Using Index
Registers Z0 and V0, one ladder program can be used for both master and slave
kits by offsetting the auxiliary relay and data register device addresses. For more
details on Index Registers, refer to the FX3U & FX3UC Programming Manual -
Basic & Applied Instructions Edition.
Once the ladder program has been entered into GX Developer and written to
BOTH PLCs in the training kits, access the Section 13.16; Exercise Parallel
Link screen on BOTH GOTs. Switch between Master (NO contact M0) and
Slave (NC contact M0) by pressing the Master and Slave buttons on the GOT
touch screen or the double-arrow. If the ladder code is entered correctly and the
wiring performed correctly, the Parallel Link should become active as soon as a
master is paired with a slave, shown on the GOT by the green lamp representing
M8072. Use X010-X017 on each kit to drive and increment the respective
auxiliary relays and data registers on each station and notice that the bit devices
and word devices are updated automatically between the two stations. Note that
there are only three rungs of ladder code in this example project relating to
Parallel Link. This screen is meant to help students visualize the simplicity of
Parallel Link and the serial networking options for further understanding.
The BFM can be thought of as a large group of 16-bit word devices, with each
word or bit of the word corresponding to a different parameter or command. For
the PLC to access any of these parameters or give the SFM a command, it must
write to or read from the BFM. The 16-bit word devices that make up the BFM
have their own addresses that simply start from BFM #0 and go up.
Note: Before attempting to program an SFM, it is necessary to have the BFM list
for that SFM. Without the BFM list it is impossible to know what parameters
need to be set, which parameters are stored in which BFM location, and which
BFM locations trigger which commands.
The TO instruction is used to write 16-bit data to the BFM in the SFM. Typically,
this data is a parameter or command that will guide the functions of the module.
102
Instruction Format:
Example:
In this example, while X011 is ON, one word of data (K1), a constant value
(H1122), is written to BFM #0 (K0), in the 3rd SFM connected to the PLC (K2)
every scan.
The FROM instruction is used to read 16-bit data from the BFM of an SFM to the
PLCs device memory. This data could be converted analog input, or the module
status, etc. Data from the BFM is copied to the specified destination devices in
the PLC, where it can be further processed by the PLC.
Instruction Format:
Note that there are also 32-bit versions of the TO and FROM instructions DTO
and DFROM which write or read two BFM addresses at a time. When using
the 32-bit versions, it is important to note that the device count of the
instruction is in 32-bit increments and not 16-bit like the TO and FROM.
Remember from Chapter 6 that U\G can also be used in place of a device
address to access single 16-bit word devices within the BFM using other applied
instructions in the FX3U or FX3UC. For example, the following two rungs are
equivalent.
In both of these example rungs, while X010 is ON, BFM #100 is read from the 1st
SFM (SFM 0) and stored in D100 in the PLC every scan. Be aware that there is
a difference in processing time between the two methods. For more details, refer
to the FX3U & FX3UC Programming Manual - Basic & Applied Instructions
Edition.
Please find Project 6 in the appendix. This project is intended to give the student
practice in using the TO and FROM instructions associated with the FX series
right side bus and demonstrate some of the analog control capabilities.
In this exercise, the FX2N-5A is addressed as the 1st SFM (SFM 0) connected to
the FX3U with input Channel-1 (CH1) and input Channel-2 (CH2) connected to
103
the two Analog Input dials on the FX-TRN-KIT-R training kit. The analog input
dials both have an approximate input range of 0 to +10VDC. Output Channel-1
(CH1) is connected to the Analog Output Meters on the FX-TRN-KIT-R training
kit. The analog output meter displays a voltage range of 0 to 10VDC (note that
no negative voltages can be displayed). The FX2N-5A has maximum analog
input and output voltage range of -10 to +10VDC with selectable digital value
ranges. A -32,000 to +32,000 digital value range, for example, means that the
digital value -32,000 corresponds to -10VDC, 0 represents 0VDC, and +32,000
represents +10VDC, etc. A more detailed explanation of the FX2N-5A
specifications can be found in the FX2N-5A Users Manual.
104
In the Project 6 ladder program, BFM #0 will be initialized to H55, which indicates
a -10 to +10VDC analog input range corresponding to a -10,000 to +10,000
digital value range. BFM #1 will be initialized to its default value of 0, which
indicates a -10 to +10VDC analog output range corresponding to a -32,000 to
+32,000 digital value range. BFM #2 and BFM #3 store the averaging time
values of CH1 and CH2, respectively. BFM #6 and BFM #7 contain the
averaged analog input data from CH1 and CH2, respectively. BFM #14 and BFM
#15 handle the analog output value. BFM #14 stores the Digital to Analog (DA)
output value, but when the Direct Control Function is being used (BFM #23),
BFM #15 will store the adjusted DA output value. For this exercise, different
Direct Control Functions will be used to adjust the analog output value. Refer to
the description of BFM #23 below duplicated from the FX2N-5A Users Manual.
For this exercise, D0 will store the average Analog to Digital (AD) input value
from CH1, and D1 will store the average AD input value from CH2. The analog
input averaging times for CH1 and CH2 will be controlled by D2 and D3,
respectively. The DA output value will be stored in D10. The adjusted analog
output value (BFM #15) will be stored in D11. The Direct Control Function will be
controlled by M0-M7 (since there are only two analog input channels being
used). X000 and X001 are tied to the control of the CH1 Direct Control Function,
while X004 and X005 are tied to CH2. While X000 or X004 are ON individually,
the associated digital input values from CH1 and CH2 will be automatically added
to the DA output value within the SFM and written to BFM #15. While X001 or
X005 are ON in addition to X000 or X005, the digital input values from CH1 and
105
CH2 will be automatically subtracted from the DA output value within the SFM
and written to BFM #15. Thus, the analog output of the FX2N-5A is directly
adjusted by the analog inputs on the FX2N-5A and the digital inputs on the
FX3U. After initialization, X010 will drive all of the FROM instructions, and X011
will drive all of the TO instructions. This is intended to show the difference
between data within the PLC and data within the BFM of the SFM.
Once the ladder program has been entered into GX Developer and written to the
PLC in the training kit, access the Section 13.19; Exercise Analog Control
screen on the GOT. If the ladder code is entered correctly, the simulation should
run smoothly. Use the GOT touch screen to adjust the analog input averaging
times (D2-D3) and the DA output value (D10). Use X000-X001 and X004-X005
to switch between the Direct Control Functions. Remember that the analog
output meter on the FX-TRN-KIT-R can only display 0 to +10VDC. If the ladder
code is entered correctly, it should be easy to notice how the data on the GOT
screen differs from the analog inputs and outputs on the training kit when the TO
and/or FROM instructions are not being driven. The analog input dials and
analog output meter use data directly from the SFM, while the GOT and digital
input switches affect the PLC. This screen is meant to help students visualize
the relevance of the TO and FROM instructions for further understanding as well
as display some of the analog control options available.
The Bit Shift Left (SFTL) and Bit Shift Right (SFTR) instructions move bits within
a word (or multiple words) to the left or right, replacing the shifted bits with
those from the source. The instructions take 4 parameters: the location of the
data to be shifted into the register(s), the first address of the shift data, the length
of the shift data, and the number of bits to shift the data left or right.
106
WSFL Word Shift Left
WSFR Word Shift Right
The Word Shift Left (WSFL) and Word Shift Right (WSFR) instructions move
words of data in the same way as the bit shift instructions. The instructions take
the same 4 parameters as the bit shift instructions: the location of the data to be
shifted into the register(s), the first address of the shift data, the length of the shift
data, and the number of words to shift the data left or right.
First, edit the Project 6 ladder code so that the FROM and TO instructions are
being executed every scan (while the PLC is in RUN). Then, using Bit Shift and
Word Shift instructions, assemble a serial communication frame in D20-D27
107
consisting of the adjusted analog output value (D11) that could be sent to
another controller or PC.
The frame, or data register array, needs to be eight data words (eight data
registers) long, and each analog output value should be inserted to the array
starting at D20. Trigger each data insertion with X010. At the same time, each
data register (D20-D27) in the array has an associated bit device (Y000-Y007) to
indicate that valid data has been loaded into the data register. This should also
be triggered by X010, with insertion starting at Y000. To delete a data register
value and its associated bit, simply insert data from a blank data register (D5, for
example) starting at D27, and also adjust the bit array starting at Y007. Trigger
data deletion with X011. When the entire indicator bit array is full, the serial
communication frame is ready to be sent. However, for this example program,
simply reset the entire bit array and data register array when it is full.
Delete Insert
Once the ladder program has been entered into GX Developer and written to the
PLC in the training kit, access the Section 13.21; Exercise Analog Processing
screen on the GOT. If the ladder code is entered correctly, the simulation should
run smoothly. All of the Analog Control options remain from Project 6 in Section
13.15 except for the FROM and TO indicators. Use X010-X011 on the training
kit to insert and delete data from the indicator bit and data register arrays. This
screen is meant to help students understand shifting instructions by visualizing
the application described in this exercise for easier programming and debugging.
By default, the CPU of the PLC runs the ladder program top to bottom and left to
right. At the beginning of each program scan, all physical input values on the
system are read into the image memory. The program is then processed, with
modifications being made to the image memory. Once the END instruction is
reached, the outputs are updated based on the image memory. Then the
process begins again.
108
Sometimes this program flow needs to be altered, depending on the application.
There are several methods of controlling the flow of the program, including jumps
and subroutine calls.
These instructions use the pointer addresses, mentioned earlier. To set a pointer
location, double click in the left margin of the ladder (to the left of the vertical rail)
and enter a location address prefixed with P. When referencing this location in a
jump or subroutine call, refer to it by its P device address.
CJ Conditional Jump
The call subroutine (CALL) instruction allows a specified section of ladder code
(subroutine) to be executed within normal processing when its input conditions
109
become active. Unlike the CJ command, execution of the main ladder program
resumes from the point where the subroutine was called after the subroutine has
been completed. By removing conditionally repeated ladder code from the main
ladder program (executed every scan) and using subroutines instead, the overall
scan time can be shortened, since the subroutine ladder code is only processed
when the CALL instruction is executed.
Subroutines are coded at the end of the PLCs main ladder program. The main
ladder program operations stop at the main program end (FEND) instruction and
the subroutine ladder code is written between the FEND instruction and the END
instruction. Subroutines are referenced by pointer device addresses at the
starting point, and a subroutine return (SRET) instruction at the end of the
subroutine. When the input conditions are active, the CALL instruction executes
the ladder code starting from the specified subroutine pointer until the SRET
instruction is reached. Once the SRET instruction is reached, program execution
returns to the main ladder program and continues from the step after the CALL
instruction was executed.
Access the Section 13.22; Program Flow screen on the GOT. This simulation
shows a side-by-side comparison of the jump (CJ) and call subroutine (CALL)
instructions. This screen is meant to help students visualize the difference in
program flow instructions for further understanding.
110
CHAPTER 14 Diagnostic Devices
The FX series PLC line has a number of dedicated special auxiliary relays and data
registers that store information, including PLC operation error codes.
o Identify the most common special auxiliary relays and data registers that
assist in troubleshooting.
o Interpret the information shown by the most common special auxiliary relays
and data registers.
o Write small programs that can provide diagnostic functions.
o Use GX Developer diagnostics to troubleshoot errors.
These special M relays can be useful for both programming and troubleshooting.
Some of the commonly used diagnostic special M relays are listed below.
The special relays M8060-M8068 have associated special data registers D8060-
D8068 which hold the error number. These will be covered in the next section.
The following special M relays are not diagnostic relays, but are very useful when
programming (some have been used already in some of the training projects):
The special data registers D8000 and up are reserved for special system related
use. In the FX1S, FX1N, FX2N, and FX2NC PLCs, the range is D8000-D8255.
In the FX3U and FX3UC, the range is D8000-D8511. These special D registers
have various system functions. A complete list of special D registers can be
found in Chapter 36 of the FX3U & FX3UC Programming Manual - Basic &
Applied Instructions Edition or in the GX Developer help menu.
Some of the commonly used diagnostic special D registers are listed below.
The following special D registers are not diagnostic registers, but are very useful
when programming or troubleshooting.
Access the Section 14.2; Special D Registers screen on the GOT. A few of the
special data registers from above are monitored on the GOT.
112
14.3 Handy Troubleshooting Circuits
The circuit below indicates that the PLC battery voltage is low. The alarm bit
turns on an output which could activate a light, or buzzer, etc.
The circuit blows stores the error code and error step when an error occurs. If
the destination word devices of the circuit have been declared as latched in the
PLC parameters, or if the word devices are in the range D512-D7999, then the
error information will be retained, even during PLC STOP or power loss.
The FX PLCs all have real time clock capability. With the FX2NC, this capability
requires a real time clock enabled memory cassette. The data for the real time
clock is stored in special data registers D8013-D8019 as previously discussed.
There are a variety of instructions which can be used to access the data in the
real time clock, some of which are shown below. For more detail on these
instructions, refer to Chapter 21 of the FX3U & FX3UC Programming Manual -
Basic & Applied Instructions Edition.
If display of a 4 digit year is required, ladder code can be written to add 2000 to
the year register D8018, changing the display to 4 digits, but not actually
modifying the year value in the RTC. This needs to be done every time the PLC
switches from STOP to RUN, so it should be triggered by M8002.
The time read (TRD) instruction is used to read the PLCs real time clock data
from the special data registers D8013-D8019 into other word devices in the PLC
device memory. The instruction copies all 7 registers to the 7 consecutive
registers following the destination word device.
113
TWR Set RTC Data
The time write (TWR) instruction is used to overwrite the PLCs real time clock
data in special data registers D8013-D8019 range with values from other word
devices in the PLC device memory. The instruction copies 7 consecutive
registers beginning at the source word device to the 7 special D registers which
make up the PLCs real time clock data (D8013-D8019).
The time compare (TCMP) instruction will compare three arbitrary source word
devices for the hours, minutes, and seconds to 3 consecutive source word
devices for hours, minutes, and seconds data, respectively (note that this order is
opposite from the RTC registers D8013-D8015). The results are written to a
group of 3 bit devices, which can be Y outputs, M relays or S relays. The 3 result
bits represent the consecutive source word device data being less than, equal to,
or greater than the arbitrary source word device data, respectively.
The time zone compare (TZCP) instruction will compare one set of 3 consecutive
source word devices to two sets of 3 consecutive source word devices which
hold the upper and lower limits of clock data to compare to. The results are
written to a group of 3 bit devices, which can be Y outputs, M relays or S relays.
The 3 result bits represent the set of consecutive source word device data being
less than, equal to, or greater than the clock data range, respectively.
The time addition and time subtraction (TADD and TSUB) instructions are used
to add or subtract two sets of 3 consecutive source word devices of time data
and write the result to a third set of 3 consecutive destination word devices.
These word devices hold hours, minutes, and seconds data, respectively, as with
all of the other time-related instructions.
XCH Exchange
Write a PLC ladder program to set the RTC ahead in the spring and back in the
fall. Be careful in the fall that the clock is only set back once!
Once the ladder program has been entered into GX Developer and written to the
PLC in the training kit, access the Section 14.5; Exercise Daylight Savings
Time screen on the GOT. There are many ways of completing this exercise,
some of which may not be able to be easily simulated. The GOT screen
provided allows the student to manually stop the RTC by alternating special
auxiliary relay M8015, adjust the associated RTC data registers, and then start
the RTC again. Please note that D8019, representing the day of the week, can
not be adjusted, as the RTC calculates the day of the week depending on the
other RTC data provided. Also note that any invalid date and time input will
automatically be discarded when M8015 is turned back OFF. This screen is
meant to help students troubleshoot their ladder program for the application
described in this exercise, and show one of the ways that the GOT can be a
convenient and valuable troubleshooting tool.
Take a moment to examine the above rung. What happens when X010 is turned
ON? The fixed decimal constant 4 is divided by 0 and the result is stored into
D0-D1. This is an illegal operation, since the result is an infinite number.
Write the program to the PLC in the training kit and turn ON X010.
115
Error Number 6705 is the error that appears in special data register D8067. Step
2 is the step where the error occurs and is stored in D8069. The Operation Error
message refers to Error Code 8067, which is stored in D8004.
This screen explains possible causes of the error state and possible solutions.
While divide by 0 is not explicitly stated here, it can be inferred from the
references to an incompatible device specification (i.e. K0 as the divisor).
None causes the find device function to look specifically for the device
address entered.
Digit allows the find device function to look for a bit device address within
a word of bits. For example, a Digit search for auxiliary relay M110 will
find that it has been used as part of the following TO instruction.
Multiple Words expands the search to include any word device that is
used by a multiple word device instruction. A Multiple word search for
data register D5 will find that it has been used as part of the following
FROM instruction.
Find Step Number is used to find a specific step number in the ladder program.
This can be useful with the PLC error diagnostics information previously
discussed to quickly locate errors in the program. Typing step numbers directly
into the number pad on a standard keyboard will
also automatically be input into the Find step
number function.
117
Find Character String is used to find a
text strings within the GX Developer
project. If the active window is the ladder
program window, the function will search
for text strings within the ladder program. If
the comment list is the active window, the
comments will be searched. Other
sections of options apply when used with
comments (Device, Find direction, and
Find target), which modify the search
criteria and methods.
118
Device Block Replacement is similar to the Replace Device function but allows
the multiple ranges of device addresses to be replaced all at once. Groups of
timers, counters, inputs, and data registers can all be replaced at once.
119
Replace Character String is used to
replace text strings. This function is
similar to the Find character string
function previously discussed. The
function searches for instances of the
Earlier character string in the ladder
program, comment list, or device list,
and replaces them with the New
character string.
120
Cross Reference List is used to
launch a pop-up window version of the
cross reference list data. This pop-up
window display will stay on top of all
other windows and must be closed to
access other windows.
List of Used Devices is used to show a list of the devices used in the ladder
program. The list can be configured to show a list for either a single program
(the FX only supports one program per PLC) or all programs in the PLC (in the
case of a Q-Series PLC). A data address is entered in the find device box, and
after pressing the Execute button, a list starting at that specified device address
is displayed. There are two columns which will show an asterisk (*) if the
corresponding data address has been used as an input or output device. Inputs
include source data for applied instructions and outputs include destination
devices of applied instructions. ERR appears in the Unpaired column is if the
device address is used as either an input or output but not both. Depending on
the device address and its use in the program, this is not necessarily an error.
121
14.8 Data Trace
The FX series PLC supports a data trace of up to 512 samples. Samples can be
based on PLC scans or on an adjustable interval from 10ms to 2000ms, in 10ms
increments. Samples can be triggered from the software or by using a bit or
word device value in the PLC. The data trace function in the FX series PLC can
log up to 10 bit devices and 3 word devices simultaneously.
GX Developer has a built-in wizard to assist in the configuration of the data trace.
Settings can also be defined manually. Once the settings are made, the trace
settings are stored to a file on the PLC which can be read back from the PLC.
The trace results can be uploaded once the data trace has been completed and
also deleted from the PLC.
Once the completed data has been uploaded from the PLC, it can be viewed in
GX Developer or output to a .CSV file which can be viewed or graphed using
Microsoft Excel.
122
CHAPTER 15 Documentation & Printing
When programs are relatively simple, like the ones in this training, and written by the
programmers themselves it is fairly simple to troubleshoot the programs if there are any
problems. However, imagine if a program was 4000 steps and written by someone who
left the company 2 years ago. Without any program documentation, it would be nearly
impossible to troubleshoot the problem. This is why documentation of the program is a
very important step in program creation.
Note: It has been described earlier that it is possible to add and modify devices and
instructions by double-clicking on a rung or device. This function will not work when a
documentation tool has been selected. However, the other methods of adding and
modifying ladder code will still be available.
15.1 Comments
Comments are attached to a device to provide a name or description. Typical
comments for an input device are: Start Push Button, Load Recipe, etc. Typical
comments for a coil or internal bit are: Fault Light, Engine 1 On, and Process
Enabled, etc. Comments can be 4 lines with 8 characters per line, 3 lines with 5
characters per line, or 2 lines with 8 characters per line. This is set in Comment
format item in the View menu.
123
Comment Input
Comments are the only form of documentation that can be downloaded to the
PLC. If a program from a PLC that contains comments is uploaded, those
comments will be visible to the new programmer as well. On the other hand,
statements and notes are stored in the GX Developer project file. If another
programmer needs access to these, a softcopy of the original GX Developer
project is required.
Important Note: The PLC will only hold the first 16 characters of each comment.
Any remaining characters in the comment will be truncated.
If the programmer wants to document the program with comments as the ladder
program is being written, it is possible to have the comment dialog box appear
after each instruction is written. Go to the Tools down menu, select Options,
and select the Continues during command write box in the Comment input
section of the Options window. As instructions are entered into the program, GX
Developer will prompt for a comment for each device in the instruction.
124
Allotted number of
comment blocks
Number of comments
Uploading/Downloading comments
125
15.2 Statements
Statements, also known as circuit or rung comments, are used to provide a
description of the purpose for the entire rung. A typical statement would be:
This rung waits until the counter reaches 20 and opens the gate.
15.3 Notes
Notes are also referred to as coil comments and appear above the output coil or
applied output instruction of a rung to the right.
Notes can be used for any additional descriptive purpose, but they are intended
to provide information about the output of the rung which it is above. Only one
note can be added to an output coil or instruction, but since multiple output coils
and instructions can be used in one rung, many notes can be added to one rung.
Notes can be up to 32 characters long.
Notes are added by selecting Note from the Documentation item in the Edit
menu, or by the clicking the Hot Key in the toolbar. After selecting the note
documentation tool, double-click on any
output coil or instruction of a rung and enter
the note for that output in the dialog box that
opens. Or simply type a semicolon after the
output coil or instruction and then type
the note in the dialog box that opens.
15.4 Aliases
Aliases are also referred to as device labels and can be displayed in place of the
device address (i.e. VACPUMP instead of Y000). An alias can be no more than
8 characters long with no spaces allowed. Aliases are entered in the Alias
column of the comment list window, previously described.
126
Alias Input
To replace the device addresses with their aliases, while the ladder program
window is active, go to the View menu, and select Alias. All the device
addresses with aliases will have been replaced. Note that it is possible to use
the alias as the device address when entering new instructions; just type an
apostrophe before entering the alias for
the device address required.
15.6 Printing
GX Developer has very flexible printing capabilities. These can be accessed by
clicking the Hot Key in the toolbar, or by selecting Print from the Project
menu. The programmer can choose to print as much or as little of the program
as required. Some of the available printing options are:
8. Cross reference list Prints all contacts and/or coils used in the
program. Ranges of devices can also be selected for printing.
While each tab can be configured and printed separately, there is an option to
print multiple tabs of data all at once. This is the Multiple printing button at the
bottom of the Print window. This function allows users to select which tabs of
information to print, as well as the order in which to they will be printed. Page
numbers will be continuous through the entire printout.
The Page setup button allows for configuration of the page layout. This
includes margins, headers, footers, page numbers, paper size, and orientation.
128
APPENDIX
129