TECO SG2 Series User Manual

Page 1
I
T
able of Contents
Chapter 1: Getting Started 1
Examination before Installation 2 Environmental Precautions 2 SG2 Model Identification 3
Quick Start Setup 4 Chapter 2: Installation 10
General Specifications 10 Product Specifications 12 Mounting 13 Wiring 15
Chapter 3: Program Tools 18
PC Programming Software SG2 Client 18 Memory Cartridge 26 LCD Display and Keypad 27
Chapter 4: Relay Ladder Logic Programming 44
Common Memory Types 44 Specialty Memory Types 46 Output Instructions 47 Counter Instructions 49 High Speed Counters (DC Version Only) 55 Timer Instructions 57 Real Time Clock (RTC) Instructions 65 Comparator Instructions 70 HMI Display Instructions 72 PWM Output Instruction (DC Transistor Output Models Only) 74 Data Link/Remote I/O Instruction (SG2-20Vxx Models Only) 75
Chapter 5: Function Block Diagram Programming 77
Coil Block Instruction 77
PWM Function Block 78 SHIFT Function Block 79
Logic Block Instructions 80
AND Logic Block 80 AND (Edge) Logic Block 80 NAND Logic Block 81 NAND (Edge) Logic Block 81 OR Logic 81
Page 2
II
NOR Logic 81 XOR Logic 82 SR Logic Block 82 NOT Logic Block 82 Pulse Logic Block 82
Function Block 83
Common Counter Function Block 83 High Speed Counter Function Block 84 Timer Function Block 85 RTC Function Block 86 Analog comparator Function Block 87
Appendix: Application Illustration 89
Page 3
Chapter 1: Getting Started 1
Chapter 1: Getting Started
The SG2 follow the paragraphs with "WARNING" or "CAUTION" symbols. They are important safety precautions to be aware of while transporting, installing, operating, or examining the SG2 Controller.
Precaution for Installation
tiny smart Relay is an electronic device. For safety reasons, please carefully read and
W
ARNING: Personal injury may result from improper operation.
CAUTION: The SG2 smart relay may be damaged by improper operation.
Compliance with the installation instructions and the user manual is absolutely necessary. Failure to
comply could lead to improper operation, equipment damage or in
or
injury
When installing the open-board models, insure that no wiring or foreign materials can fall into the exposed
circuits
Always switch off power before you wire, connect, install, or
The wiring for the SG2
components are exposed. or cabinet to prevent accidental
Never install the product in an environment beyond the limits specified in this user manual such as high
emperature,
t
Precaution f
considerable
and components. Damage to equipment, fire, or
humidity,
or Wiring
damage to property
smart relay is open and exposed. For the open-board models, all electrical
For
this reason, it is recommended the SG2 smart relay be installed in an enclosure
contact or exposure to the electrical circuits
dust, corrosive gas, vibration, etc.
.
considerable damage to property could result.
extreme cases even death, serious bodily
remove any module.
and components.
Improper wiring and installation could lead to death, serious bodily injury or
prop
erty
.
The SG2 smart relay
Make sure the wiring of the SG2 smart relay
national standards
Be sure to properly size cables for the required current rating.
Always separate AC wiring, DC wiring with high-frequency switching cycles, and low-voltage signal wiring.
and
should only be installed and wired by properly experienced and certified personnel.
meets all applicable regulations and codes including local and
codes.
considerable damage to
Page 4
Precaution for Operation
To
insure safety with the application of the SG2 smart relay,
con
ducted. potential faults in operation, equipment damage property.
Only run the SG2 after all
the
application should be included in the testing. Failure to do so could lead to improper
or in
Chapter 1: Getting Started 2
complete functional and safety testing must be
testing and confirming safe and proper operation is
extreme cases even Death, serious bodily injury or
complete. Any
considerable damage to
When the power is on, never contact the terminals, exposed conductors or electrical components. Failure
to c
omply
could lead to improper operation, equipment damage or in
or
injury
case the
considerable damage to property
It is strongly recommended to add safety protection such as an emergency stop and external interlock cir
SG2 smart relay
operation must be shut down immediately
.
.
extreme cases even death, serious bodily

Examination before Installation

Every SG2 sm ar t r ela y has been fully tested following examination procedures after unpacking your SG2 smart relay.
• Check to see if the model number of the SG2 matches the model number that you ord
• Check to see whether any damage occurred to the SG2 during shipment. Do not connect th power supply if there is any sign of damage.
Contact
if you find any abnormal conditions as mentioned above.
and examined before shipment. Please carry out the
ered.
e SG2 smart relay to the

Environmental Precautions

cuit in
The installation site of the SG2 smart relay i
s very important. It relates directly to the functionality and the life span of your SG2. Please carefully choose an installation site that meets the following requirements:
unt the unit vertically
• Mo
• Environment temperature
• A
void placing SG2 close to any heating equipment
• A
void dripping water,
• A
void direct sunlight
• A
void oil, grease, and
• A
void contact with corrosiv
• Prevent foreign dust, flecks, or metal scraps fro
• A
void electric-magnetic inter
• A
void excessive vibration; if vibration cannot be avoided, an anti-rattle
installed to reduce
: 32°F
-
131°F (0°C
condensation, or humid enviro
gas
e gases and liquids
ference (soldering or power machinery)
vibration.
-
55°C)
nment
m contacting the SG2 smart relay
mounting device should be
Page 5

SG2 Model Identification

Chapter 1: Getting Started 3
SG2 - 20 H R - A
Controller Type
I/O Count:
8 = 8 points (expansion modules) 10 = 10 I/O points 12 = 12 I/O points 20 = 20 I/O points
Form Factor: H = Encased / LCD & Keypad
V = Encased /LCD, Keypad & RS-485 Communication K = Encased /Blind (no LCD & Keypad) C = Bareboard
E = Expansion
Input Power:
D = 24V DC Powered
12D = 12V DC Powered
A = 100~240V AC Powered
24A = 24V AC Powered
Output Type: R = Relay T = Transistor
Page 6
Quick Start Setup 4

Quick Start Setup

This section is a simple 5-steps guide to connecting, programming and operating your new SG2 smart relay. This is not intended to be the complete instructions for programming and installation of your system. Many steps refer to other sections in the manual for more detailed information.

1. Install SG2 Client Software

Install the SG2 Client Software from CD or from the free internet download at www.taian-technology.com

2. Connect Power to SG2 smart relay

Connect power to the Smart Relay using the below wiring diagrams for AC or DC supply for the applicable models. See “Chapter 2: Installation” for complete wiring and installation instructions
NL
AC ..V
+ -
DC ..V
Page 7
Quick Start Setup 5

3. Connect Programming Cable

Remove the plastic connector cover from the SG2 using a flathead screwdriver as shown in the figure below. Inser t the plastic connector end of the programming cable into the SG2 smart relay as shown in the figure below. Connect the opposite end of the cable to an RS232C serial port on the computer.

4. Establish Communication

a. Open the SG2 Client software and select “New Ladder Document” as shown below.
b. Select “Operation/Link Com Port…” as shown
Page 8
Quick Start Setup 6
c. Select the correct Com Port number where the programming cable is connected to
the computer then press the “Link” button.
d. The SG2 Client will then begin to detect the connected smart relay to complete its
connection as shown below.

5. Write simple program

a. Write a simple one rung program by clicking on the leftmost cell at line 001 of the
programming grid, then click on the “M” contact icon on the ladder toolbar, as shown below. Select M1 and press the OK button. See Chapter 4: Ladder Programming instructions for complete instruction set definitions.
Note: If the ladder toolbar is not visible at the bottom of the screen, select View>Ladder Toolbar from the menu to enable.
Page 9
Quick Start Setup 7
b. Use the “A” key on your keyboard (or the “A” icon from the ladder toolbar) to draw
the horizontal circuit line from the M contact to the right most cell, as shown below.
c. Select the “Q” coil icon from the ladder toolbar and drop it on the right most cells.
Select Q1 from the dialog and press OK as shown below. See Chapter 4: Ladder Programming instructions for complete instruction set definitions.
Page 10
Quick Start Setup 8
d. Test the simple pro gram. From the Ope ration menu, select the Write function and
write the program to the connected smart relay as shown below.
e. Select the RUN icon from the toolbar, and select “No” when the pop-up message
asks “Do you want to read program from module?”, as shown below.
Page 11
Quick Start Setup 9
f. From the Input Status dialog, click on M1 to activate the contact M1 which will turn
ON the Output Q1, as shown below. The highlighted circuit will show active and the first Output (Q1) on the connected smart relay will be ON. See Chapter 3: Programming Tools for more detailed software information.
Page 12
Chapter 2 Installation 10
Chapter 2: Installation

General Specifications

SG2 is a miniature smar t Relay with a maximum of 44 I/O points and can be programmed in Relay Ladder Logic or FBD (Function Block Diagram) program. The SG2 can expand to its maximum I/O count by adding 3 groups of 4-input and 4-output modul es .
Power Supply
Input Power Voltage Range
Power Consumption
Wire Size (all terminals) 26 to 14 AWG
Programming
Programming languages Ladder/Function Block Diagram Program Memory 200 Lines or 99 Function Blocks Programming storage media Flash Execution Speed 10ms/cycle LCD Display 4 lines x 12 characters
Timers
Maximum Number 15 Timing ranges 0.01s–9999min
Counters
Maximum Number 15 Highest count 999999 Resolution 1
RTC
(Real T Maximum Number 15 Resolution 1min Time span available week, year, month, day, hour, min
Compare Instructions (Analog, Timer, or Counter Values)
Maximum Number 15 Compare versus other inputs Analog, Timer, Counter, or Numeric values
Environmental
Enclosure Type IP20 Maximum Vibration 1G according to IEC60068-2-6 Operating Temperature Range 32° to 131°F (0° to 55°C) Storage Temperature Range -40° to 158° F (-40° to 70°C) Maximum Humidity 90% (Relative, non-condensing)
Vibration Weight Agency Approvals cUL , CE, UL
ime Clock)
24V DC Models: 20.4-28.8V; 12V DC Models: 10.4~14.4V
AC Models: 85-265V;
24V AC Models: 20.4-28.8V
24VDC: 12-point : 90mA ;
20-point: 150mA ;
12VDC: 12-point: 150mA ;
20-point: 240mA ; 100-240VAC: 90mA ; 24VAC: 290mA ;
0.075mm amplitude, 1.0g acceleration 8-point:190g
10,12-point: 230g (C type: 160g) 20-point: 345g (C type: 250g)
Page 13
Chapter 2 Installation 11
Discrete Inputs
Current consumption
Input Signal ”OFF” Threshold
Input Signal ”ON” Threshold
Input On delay
Input Off Delay
Transistor device compatibility PNP, 3-wire device only High Speed Input frequency 1kHz Standard Input frequency < 40 Hz
Required protection Inverse voltage protection required
Analog Inputs
Resolution
Voltage Range acceptable
Input Signal ”OFF” Threshold < 5VDC (as 24VDC discreet input) Input Signal ”ON” Threshold > 9.8VDC (as 24VDC discreet input)
Isolation None Short circuit protection Yes
Total number available
Relay Outputs
Contact material Ag Alloy Current rating 8A HP rating 1/3HP@120V 1/2HP@250V
Maximum Load Maximum operating time 10ms (normal condition)
Life expectancy (rated load) 100k operations Minimum load 16.7mA
T
ransistor Outputs
PWM max. output frequency 0.5kHz (1ms on,1ms off) Standard max. output frequency 100Hz
Voltage specification 10-28.8VDC Current capacity 1A
Maximum Load Minimum Load 0.2mA
3.2mA @24VDC 4mA @12VDC
1.3mA @100-240VAC
3.3mA @24VAC
24VDC: < 5VDC; 12VDC: < 2.5VDC 100-240VAC : < 40VAC 24VAC: <6VAC 24VDC: > 15VDC; 12VDC: > 7.5VDC 100-240VAC : > 79VAC 24VAC: >14VAC
24, 12VDC: 5ms 240VAC: 25ms; 120VAC: 50ms 24VAC: 5ms 24, 12VDC: 3ms 240VAC: 90ms; 120VAC: 50ms 24VAC: 3ms
Basic unit: 10 bit
Expansion unit: 12bit
Basic unit: Analog input: 0-10VDC voltage,
24VDC when used as discrete input;
Expansion unit: Analog input: 0-10VDC voltage or
0-20mA current
Basic unit: A1-A4
Expansion unit: A5-A8
Resistive: 8A /point Inductive: 4A /point
Resistive: 0.5A/point Inductive: 0.3A/point
Page 14

Product Specifications

Chapter 2 Installation 12
Display &
Keypad
, Z1-Z4, Z1-Z4, Z1-Z4, Z1-Z4, Z1-Z4, Z1-Z4, Z1-Z4, Z1-Z4, Z1-Z4, Z1-Z4, Z1-Z4, Z1-Z4, Z1-Z4
RS-485 Communications Max I/O
N/A N/A N/A
N/A Built-in MODBUS Built-in MODBUS
N/A
N/A Built-in MODBUS
N/A
N/A
N/A
N/A
Part #
Input Power
SG2-12HR-D SG2-12HT-D 6 DC, 2 Analog 4 Trans. SG2-20HR-D SG2-20HT-D 8 DC, 4 Analog 8 Trans. SG2-20VR-D SG2-20VT-D SG2-12HR-12D SG2-20HR SG2-20VR SG2-10HR-A SG2-20HR-A SG2-12HR-24A SG2-20HR-24A Expansion Modules SG2-8ER-D SG2-8ET-D SG2-8ER-A SG2-8ER-24A SG2-4AI SG2-MBUS SG2-DNET SG2-PBUS EN01 OEM “Blind” Models, No Keypad, No Display SG2-12KR-D SG2-12KT-D SG2-20KR-D SG2-20KT-D SG2-12KR-12D SG2-10KR-A SG2-20KR-A OEM “Bareboard” Models, No Keypad, No Display, No SG2-12CR-D SG2-12CT-D SG2-20CR-D SG2-20CT-D SG2-10CR-A SG2-20CR-A Accessories SG2-PL01 SG2-PM05
6 DC, 2 Analog 4 Relay
8 DC, 4 Analog 8 Relay
24 VDC
8 DC, 4 Analog 8 Relay
6 DC, 2 Analog 4 Relay
-12D
-12D
4 Analog N/A N/A N/A N/A
Communications Module, RS-485 ModBus RTU slaver
SG2 Programming Cable, SG2 Programming software
SG2 Memory cart ridge
12 VDC
6 AC 4 Relay
100-240 VA C
8 AC 4 Relay
24VDC
4 DC 4 Relay N/A N/A N/A
24VDC
100-240VAC 4 AC 4 Relay N/A N/A N/A
24VAC 4 AC 4 Relay N/A N/A N/A
24 VDC
6 DC, 2 Analog 4 Relay X N/A 36
24VDC
8 DC, 4 Analog 8 Relay X N/A 44
12VDC 6 DC, 2 Analog 4 Rel ay X N/A 36
6 AC 4 Rel ay X N/A 34
100-240VAC
6 DC, 2 Analog 4 Relay X N/A 12
24VDC
8 DC, 4 Analog 8 Relay X N/A 20
6 AC 4 Relay X N/A 10
100-240VAC
Inputs
8 DC, 4 Analog 8 Trans.
8 DC, 4 Analog 8 Relay 8 DC, 4 Analog 8 Relay
12 AC 8 Relay
12 AC 8 Relay
4 DC 4 Trans. N/A N/A N/A
Communications Module, DeviceNet Group2 slaver Communications Module, Profibus-DP slaver Communications Module, TCP/IP
6 DC, 2 Analog 4 Trans. X N/A 36
8 DC, 4 Analog 8 Trans. X N/A 44
12 AC 8 Relay X N/A 44
6 DC, 2 Analog 4 Trans. X N/A 12
8 DC, 4 Analog 8 Trans. X N/A 20
12 AC 8 Relay X N/A 20
Outputs
Expansion
*1: If module with keypad and display, Max IO can be added keypad input Z1-Z4.
36 + 4 36 + 4 44 + 4 44 + 4 44 + 4 44 + 4 36 + 4 44 + 4 44 + 4 34 + 4 44 + 4 36 + 4 44 + 4
*1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1
Page 15
Chapter 2 Installation 13

Mounting

DIN-rail Mounting
The SG2 sma rt re la y should always be mounted vertically. Press the slots on the back of the SG 2 and expansion module plug CONNECTOR onto the rail until the plastic clamps hold the rails in place. Then connect the expansion module and CONNECTOR with the Master (press the PRESS-BUTT ON sim ultaneously)
-
+
DC 24V Input 8 x DC(A1,A2 0~10V)
SG2-12HR-D
Output 4 x Relay / 8A
Q1 Q2 Q3 Q4
I1 I2I4I3
I5
A1I6 A2
Input
×AC
4
N
L
SG2-8ER-A
Output 4 x Relay / 8A
Y1 Y2
Y3 Y4
X4X1 X2 X3
AC 100~240V
Run
Page 16
Chapter 2 Installation 14
It is recommended to apply a DIN-rail end clamp to hold the SG2 in place.
-
+
I1 I3I2 I4
DC 24V Input 8 x DC(A1,A2 0~10V)
SG2-12HR-D
Output 4 x Relay / 8A
Q2
A2I6I5 A1
Input 4
×AC
SG2-8ER-A
Output 4 x Relay / 8A
Q3Q1
Q4
L
N
AC 100~240V
Y1 Y2
X2X1 X3
Run
X4
Y4Y3
Direct Mounting
Use M4 screws to direct mount the SG2 as shown. For direct installation of the expansion module, slide the expansion module and connect with the Master after the Master is fixed.
-
+
I1 A2I3I2 I4 I6I5 A1
DC 24V Input 8 x DC(A1,A2 0~10V)
SG2-12HR-D
Output 4 x Relay / 8A
Q2
Q1
Q3 Q4
X1
Input 4
×AC
LN
SG2-8ER-A
Output 4 x Relay / 8A
Y1 Y2
Y3 Y4
X3X2 X4
AC 100~240V
Run
Page 17

Wiring

W
ARNING: The I/O signal cables should not be routed parallel to the power cable, or
trays to avoid
To
avoid a short cir
and loads.
Wire size and Terminal T orque
mm
AWG
Input 12/24V DC
the signal interference.
cuit on the load side, it is recommended to connect a fuse between each output terminals
2
0.14...1.5
3.5 (0.14in)
C
Nm
lb-in
Chapter 2 Installation 15
in
the same cable
0.14...1.50.14...2.50.14...0.75 0.14...2.5
26...1626...1426...1426...1826...16
C
0.6
5.4
Sensor Connection
-
+
-
+ I5I3 I4I2I1
DC V Input
-
+ A1I6
DC V Input
A1I6 A2
A2A1
-
+
DC V INPUT
I7I1+- I4 I5 I6I3I2 A4A2 A3A1I8
A3
A1
A4A2
I4
I5
I3I2I1
A4
A2 A3A2 A1
Page 18
Chapter 2 Installation 16
PE PE PE
Input 100~240V /24V AC
I1 V1
DC 24v
-
+
RUN
SG2-4AI
Input 4 x (0..10V/0..20mA)
C2V2I2
I4
C3I3 V3
PE
PE
C1
DC 24v
-
+
SG2-4AI
Input 4 x (0..10V/0..20mA)
PE
V4
C4
I2 V2 C2
V3I3 C3
V1I1 C1
RUN
I4
PE
PE
PE
V4
C4
PEPEPE
Output (Relay)
NL
AC ..V Input ......
Output 4 x Relay / 8A
Q1 Q4Q3Q2
I2I1 I4I3 I5 I6
AC ..V INPUT ......
Output 8 x Relay / 8A
I4I1 I3I2NL I7 IBI9I8 IA
I5 I6
IC
Q6Q2 Q3Q1 Q4 Q5 Q8Q7
Page 19
Output (T ransistor)
Chapter 2 Installation 17
OUTPUT 4 x TR / 0.5A
-
+
-
+
-
+
-
+
Q4Q3Q1 Q2
OUTPUT 8 x TR / 0.5A
-
-
+
+
Q1 Q2
-
++
--
+
Data Link OR R e mo t e I / O L i nk
A1 A2
The power supply
A4
and the I/O supply should
S
BA
RS485
A1
A4
A2A3
A3
S
BA
RS485
share the same power source. Only short circuit the last module. When I/O link, the net can connect 8 products in max. (ID: 0-7). When Remote I/O is available, it only can connect 2 products max. (Master & Slave).
①-1A quick-blowing fuse, circuit-breaker or circuit protector ②-Surge absorber (36V DC) ③-Surge absorber (400V AC) ④-Fuse, circuit-breaker or circuit protector ⑤-Inductive load ⑥-Only short circuit the first product and the last product ⑦-Comply with standard : EIA RS-485.
--
-
+
++
Q8Q7Q5 Q6Q3 Q4
S
AB
RS485
A4
A3A1 A2
the first
and
Page 20
Chapter 3 Program Tools 18
Chapter 3: Program T

PC Programming Software “SG2 Client”

The SG2 Client programming software provides two edit modes, Ladder Logic and Function Block Diagram (FBD). The SG2 Client software includes the following features:
1. Easy and convenient program creation and editing.
2. Programs can be saved on a computer for ar from an
3. Enables users to print programs for reference and review.
4. The Simulation Mode allows users to run and test their program before it is
5. Real-time communication allows the user to monitor and force RUN mode.
Installing the Software
Install the SG2 Client Software from CD or from the free internet download at
www.taian-technology.com
SG2 and saved or edited.
ools
chiving and reuse. Programs can also be uploaded directly
loaded to the controller.
I/O on the SG2 smart relay operation during
Connecting the Software
Remove the plastic figure below. Ins relay as shown in the figure below. Connect the opposite end of the cable to an RS232C serial port on the computer.
connector cover from SG2 using a flathead screwdriver as shown in the
ert the plastic connector end of the programming cable into the SG2 smart
Page 21
Chapter 3 Program Tools 19
Start
R the SG2 Client softw you ing functions
Screen
un are and the following Start screen will be displayed. From this screen,
can perform the follow
Ne
w Ladder Program
Select File -->New -->New LAD to enter the development
nvironment for a new Ladder
e program.
New FBD Program
Select File -->New -->New FBD to enter the development environment for a new FBD
unction Block Diagram) (F
program.
Open Existing File
Select File -->Open to choose the type of file to open (Ladder or FBD), and choose the desired program file, and then click Open.
Ladder Logic Programming Environment
The L testing ram select File-- odel of SG2, and the number of connected expansion units if
adder Logic Programming Environment includes all the functions for programming and
the SG2 using the Ladder Logic programming language. To begin a new prog
>New--> and select the desired m
applicable, as shown below.
Page 22
Chapter 3 Program Tools 20
Menus, Icons and Status Displays
The Ladder programming environment includes the following Menus, Icons and Status Displays
1. Menu bar – Five menu selections for program development and retrieval, editing, communication to connected
2. Main T
controllers, configuration of special functions and viewing preference selections.
oolbar – (From Left to Right)
Icons for a new program, opening a program, saving a program and printing.
Icons for Keypad, Ladder view,
Icons for Monitor,
Simulator, Controller Mode changes (Run, Stop, and Quit), and Read/Write programs
HMI/T
ext editing and Symbol (comments) editing.
to/from the SG2 smart relay.
3. Usage List – List for all memory addresses are
designated by a “*” symbol below each address.
4. Amount of free programming memory
5. Current Mode – operation mode of the controller, or
6. Ladder T
7. Status Bar –
oolbar – Icons for selecting and entering all available Ladder Logic instructions.
Status of current open project and connected SG2 smart relay.
types and addresses used with the current open program. Used
available.
simulator,
from the connected PC.
Page 23
Chapter 3 Program Tools 21
elease
Programming
The SG2 Client software can be programmed by either drag-and-drop of instructions or by using keyboard entry commands. Below is an example of some common ing programming instructions.
Click-&­r
methods of enter
Click­&-drag
The “A” and “L” keys or icons are used to complete parallel and serial circuits. The rightmost column is for output coils.
Coil column
“A” and “L”
Page 24
Chapter 3 Program Tools 22
Sim
ulation Mode
The
SG2 Client software includes a built-in simulator to test and debug programs easily without the
need f To activate simulation mode, simply press the red RUN icon.
or downloading to a controller.
The program below is shown in simulation mode, identifying the significant available features.
E
stablish Communication
T ed
he following is the simple procedure for establishing communication between the connect
P
C and the SG2 smart relay.
a. Select “Operation/Link Com Port…” as shown below.
Page 25
Chapter 3 Program Tools 23
b. Select the correct Com Port number where the programming cable is connected to the
computer then press the “Link” button.
c. The SG2 Client software will then begin to detect the connected smart relay to complete it’s
connection as shown below.
Writing Program to smart relay
From the Operation menu, select the Write function and write the program to the connected smart relay as shown below.
Operation menu
The Operation menu, includes several system configuration functions for both online and off setup. The following explains the details of each function.
Monitor – Online function for runtime monitor and editing when connected to a controller Simulator – Offline function for testing and de
bugging a program.
Run-Stop-Quit – Mode change selections for both runtime editing and simulation mode. Read-Write – Re
ading and writing programs to and from a connected smart relay.
RTC Set – Online function for setup of the Real-time clock/calendar (see dialog below left)
Analog Set – setup analog input A1-A8 gain and offset (see dialog below right)
Password – Set a password for accessing the current program after upload t art relay
o the sm
Language – Change software language Module System Set – Dialog for changing important system setup functions including Module ID,
Remote I/O preferences, Expansion I/O settings, and Retentive memory preferences (Keeping) for (C) Counters, (M) Auxiliary Coils, and (Z) keypad input set and the LCD Backlight.
line
Page 26
Chapter 3 Program Tools 24
Online Monitoring/Editing
The SG runtim ges (Run/Stop/Quit).
Note: The SG2 Client software does not support runtime logic editing changes. All logic edits to contacts, coils, timers/counters, and circuit connecting lines must be written to the connected relay
2 Client software allows for online monitoring of the currently running program during
e. Additional online functions include, I/O forcing, and Mode chan
smart
while in Stop mode.
Page 27
Chapter 3 Program Tools 25
elease
Program
he SG2 Client software includes the ability to document a program using Symbols and Line
T
omments. Symbols are used to label each I/O address up to a length of 12 characters. Line
C
omments are used to document sections of a program. Each Line Comment can have up to 4
C
es with each line containing up to 50 characters in length. Below are examples of entering
lin
ymbols and Line Comments.
S
Documentation
ymbol
S
he Symbol editing environment can be access through the menu using the Edit>Symbol…
T
lection or using the symbol icon on the main toolbar shown below.
se
he Symbol editing environment allows for documenting all the contact and coil memory types,
T
nd selecting display modes as shown below.
a
Line Comments
The Line Comment editor is accessed by clicking the “N” icon on the Ladder Toolbar. After clicking on the “N” icon, to drag the line number you want to comment and release, and then type the desired comments and press OK.
Click-&­r
Click­&-drag
Page 28
Mem ately)
ory Cartridge (sold separ
Chapter 3 Program Tools 26
The optional PM05 memory cartridge is used to easily another. memory car ridge plugs into the sa The PM05 t (see o
pr cedure below).
1
Re
. move the plastic con ecto cover from SG2 using a flathead screwdriver as show
2
In
. sert the PM
3
Fr
. om the display ke
RE
AD (from PM05)
cartridge.
4, K type C type, electrify the product, the program in
5 am in mpatible, here are the regulations:
, Progr different types are not co A-1: 10/12 point type program ---- available in 20 point type A-2: 20 point type program ---- unavailable in 10/12 point type B-1: AC type program ---- available in DC type B-2: DC type program ---- unavailable in AC type C-1: Relay type pro C-2: Transistor type program ---- unavailable in Relay type D-1: Not-V type program ---- available V type D-2: V type program ---- unavailable Not-V type
and PM05 will automatically download and
uted.
exec
05 memoryt
n r n in the figure above.
car ridge onto the connector as shown a
ypad on the face of the SG2 smart relay,
to
transfer the program to or from the smart relay to the PM05 memory
gram ---- available in Transistor type
transfer programs from one smart relay to
me connector as the programming cable
bove.
select either WRITE (to PM05) or
Page 29
Chapter 3 Program Tools 27
LCD Displa
y and Keypad
Keypad
Mo y and Keypad. The keypad and display are
st SG2 CPU units include the built-in LCD Displa
most us nter set points, controller mode changes (Run/Stop),
often ed for changing timer/cou uploading/dow ory cartridge, and updating the RTC (Real Time Clock nda ormed from the keypad and display, it
/Cale r). Although, logic programming can be perf is high com ing the SG2 Client software. Below is an overvi f th
ew o e basic keypad and display functions.
Select – Used to select the available m mo uction types for editing. Holding the Select
tton will display all “H” HMI/Text mes ge o the .
bu sa s n LCD
nloading to the PM05 mem
sly re mended to only perform logic changes u
e ry and instr
K – Used to accept the selection displ e of an u ti n r u c n It is also used to select
O ay d instr c o o f n tio .
any of the M D.
ote: Press thN
Escape – Used to exit lay screen and t t e vious s
displa y t e .
D
y screen, press the ESC to displa h main menu
elete – Used to delete an instruction or rung from the ladder program.
The 4 naviga ) are SG2 display a o ca e e p og a ma
(‘
= Z1, ‘=Z2, ‘=Z3, ‘=Z4
CD Display
L
Main Menu
LCD displa nu
ain Menu options on the LC
e “SEL” and “OK” simultane
ously to t rung ve th c rre t act e
inser a
abo
e u n iv cursor position.
a selected disp go o h pre creen. When in a ladder
tion buttons (↑←↓→ used to move h ugh
or active program. The ls n b s t r r m ble input coils Z1-Z4
4 buttons
the cursor t ro out the
functions of the
);
ys 4-line Main Me
( 1 ) The Main Menu as S er T ’ Mo e
LADDER
>
G2 und ‘S OP d .
FUN.BLOCK RUN CLEAR PROG. WRITE READ
Æ Æ
Sa u p g a M 5ve ser ro r m to P 0
Æ
Read user Program from PM05
u e pro ra an e password Clear the s r g m d th
SET RTC SET ANALOG SET PASSWORD LANGUAGE INITIAL
Æ Æ
initially set Edit method
t language Select he
Page 30
Chapter 3 Program Tools 28
( 2 ) The Main Menu as SG2 und R N’ Mode. er ‘ U
LADDER
>
FUN.BLOCK STOP WRITE RTC SET WRITE PASSWORD LANGUAGE
Press the Button
OK Confirm the selected Function
ESC Skip to Initial Screen
SG2 can be modified, edited, cleared and read user program only when it is under STOP Mode. As the program i atically backup it to EEPROM. (Not PM05)
Move the Cursor to select Main Menu
s modified, SG2 will autom
Main Menu LADDER
the Button
Press
n
ript
R G
)
, and the 8 Colum
Button Desc ion
SEL
SEL +↑/ ↓
SEL + /← →
/
/
DEL Delete an instruction
ESC 1. Cancel the Instruction or n n er d io .
OK 1. Confirm the data and autom ic ll v t n t put position.
SEL+DEL Delete a Line of Instruction.
SEL+ESC
SEL+/
SEL+OK Insert a space line
1. Ix ⇒ ix ⇒ ── ⇒ spa
2. Qx space Q
3. Space x Dg l ~
1. 1...F, ─ (When the cursor lo tes the digital s io , the ran of d al is restricted by
2. I ⇔ X ⇔ Z ⇔Q ⇔ Y⇔ M ⇔ D ⇔ T ⇔ C ⇔ I
3. Q ⇔ Y
4. ( ¿ À P
5. ( P ( (When the cursor located at 7 Column n is set as T) Confirm the input data and move the cursor Vertically move the cursor Horizontally move the cursor
2. Back to Main que t e ro ra .
Display the number of i t o OP) the Lines and operat on sta e f SG2 (RUN/ST Skip up/ down every 4-line program.
x (only for digital and character position of 8 column.).
the relay type.
n the cursor cat 5 o m ).
(Whe
M T
(When the cursor located at 8 Colum
set as Q, Y, M)
Menu after ry h p g m
2. When the cursor is on Column 8, Press the button to automatically enter the function block and set the parameters(such as T/C)
ce Ix
l v ila le u th 2 ,6 o m of the first line)
lo ed at 1
C R
⇔ ( h ur r o te at 7 o m , and the 8 Column is
o r digital and character position of ,3,5 column.)
( nly fo 1
(a l a a b b t e ,4 c lu n : i ita: 1 F
ca po it n ge igit
,3, C Glu n
⇔H ⇔ L ⇔P ⇔ Q
(W en the c so l ca d C lu n
actio u d E it n
at a y save, the cursor mo es o ex in
Page 31
Chapter 3 Program Tools 29
peration Sample
12345678Column Line 1 > LA DD ER 2FUN.BLOCK 3RUN 4CLEAR PROG.
Procedure 1: n 1 2 3 4 5 6 7 8 Colum Press ‘OK’ Line 1 2 Enter LADDER Edition 3 4
Procedure 2 : 1 2 3 4 6 8 n 5 7 Colum Press ‘SEL’ Line 1 I 1
2 (When cursor located at character or 3 digital, press the button to show I1) 4
Procedure 3 : Column 1 2 3 4 5 6 7 8
Q 1
1
Press ‘’ 3 times 2
(Press ‘SEL’ + ‘↑ ↓’, and the digital cursor located will 4 change from I to Q).
Line
3
Procedure 4 : 1 2 3 4 5 6 7 8 Column Press ‘SEL’ Line 1 q 1
2 (start /end modifying parameter) 3 4
Procedure 5 : 1 2 3 4 5 6 7 8 Column Press ‘’ 2 (“Press ‘SEL’ + ‘← →’,
the cursor located in digital) 4
Line 1 q
1
3
Procedure 6 : 1 2 3 4 5 6 7 8 Column Press ‘’ for 3 times 2 (“Press ‘SEL’ + ‘↑ ↓
the digital the cursor located will 4 change from 1 to 4)
Procedure 7 Press ‘ ’ 2
(Press ‘SEL’ + ‘← →’ to move the cursor to the position 4 Required revision.
:
Line 1 q
Line 1
4
3
q 4
3
olumn 12345678C
Page 32
Chapter 3 Program Tools 30
OR
Procedure 7 : n 1 2 3 4 5 6 7 8 Colum Press ‘OK’ Line 1 q 4 2
(Move the cursor to character in 3 column 3) 4
Automatically
Link
Automatically Link
OR
Procedure 7 : 3 4 5 6 7 8 Column 1 2 Press ‘→’
2 (move the cursor to the link location 3 in column 2) 4
R 7, and input M1, I3 I truction t olum 3, 5.
epeat the step1~ ns o c n Procedure 8 : 1 2 3 4 5 6 7 8 Press ‘OK’ in Column 5 Line q 4 1 2 (move the cursor to the character in 3 column 8) 4
Line 1 q 4
Column
M1⎯I3
Procedure 9 : 1 2 3 4 5 6 7 8 Column Press ‘SEL’ Line 1 q 4
2 (when the cursor located at character 3 and digital, press ‘SEL’ to show 4 –( Q1’)
Procedure 10 : 1 2 3 4 5 6 7 8 Column Press ‘OK’ Line 1 4 1 3q 2
Save the input program data, the 3 position of the cursor will not move. 4
M1⎯I3⎯( Q 1
Aut d “ -( ”
o Ad
M
I
( Q 1
Procedure 11 : 1 2 3 4 5 6 7 8 Column Press ‘’ twice
2 (move the cursor to column 1 3 and Line 2.) 4
Line 1 q 4⎯M1⎯I3⎯(Q1
Procedure 12 : n 1 2 3 4 5 6 7 8 Colum Press ‘’ twice
2 (move the cursor to column 2) 3 4 Note: never press ‘SEL’ before hand
Line 1 q 4⎯M1⎯I3⎯(Q1
Page 33
Chapter 3 Program Tools 31
Change Wire ’ to ‘ I ’
Procedure 13 : Column 1 2 3 4 5 6 7 8 Press ‘SEL’ Line q 4 1 2┴
(A vertical line emerges) 3 4
M1⎯I3⎯(Q1
Procedure 14 : Column 1 2 3 4 5 6 7 8 Press ‘OK’ Line q 4 1 2┴
(Move the cursor to character in 3 column 3.) 4
Repeat the step 1~7 and key in ‘r 3’ , ” at Line 2 and column ~
rocedure 15 : 4 6 Column
P 1 2 3 5 7 8 Press ‘OK’ in column 5 Line M1⎯I3 Q 1 q 4 2 (move the cursor to the character in 3
Column 8) 4
M1⎯I3⎯(Q1
3 6.
┬ ┴
r3
⎯ ⎯ ⎯ ⎯
( 1
(
Procedure 16 : n 1 2 3 4 5 6 7 8 Colum Press ‘SEL’ Line 1 q 4 2
(When the cursor located in digital 3 or character, press ‘SEL’, ‘Q1’ will 4 emerges)
M1⎯I3⎯(Q1
r3
⎯ ⎯ ⎯ ⎯
( Q 1
Auto Add “-( ”
Procedure 17 : Press ‘’ for 4 times
2r3 (Press ‘SEL’ + ‘↑ ↓
(The character Q the cursor locating 4 will change to C.)
Procedure 18 : n 1 2 3 4 5 6 7 8 Colum Press ‘
23 3
4
1 2 3 4 5 6 7 8 Column
Line 1 q 4┬M1⎯I3⎯(Q1
( C 1
3
1q
(C1
Line 1 4 M1
┬ ┴
r
⎯┴⎯ ⎯ ⎯
I3 (Q
⎯ ⎯
Page 34
Chapter 3 Program Tools 32
n
Procedure 19 : 1 6 7 8 Column 2 3 4 5 Press ‘’ for 7 times
2 (Press ‘SEL’ + ‘↑ ↓
The digital 1 the cursor locating will change to 7)
Line Q1 1 q 4┬M1⎯I3⎯(
r3
⎯ ⎯ ⎯ ⎯
3
4
(C7
Auto Enter Functio Block Edition
rocedure 20 : 1 3 4 5 6 8
P 2 7 Column Press ‘OK’ Line 1 2L o (Auto shift to FUNCTION BLOCK 3 and the counter input parameter) 4 L o
1
│ │
0 00000 C7├
Procedure 21 : 1 3 4 5 6 8 Column 2 7 Press ‘ESC’ back to Line q 4 LADDER edition screen 2 3
4
1
M1 I3 (Q1
r3
⎯ ⎯ ⎯ ⎯
C( 7
Delete the Program Element
12345678Column Line 1 q 4 1 2 3
4
M I3 (Q
r3
⎯ ⎯ ⎯ ⎯
1
C( 7
Procedure : 1 2 3 4 5 6 7 8 Column Press ‘DEL’
3 (to delete the element C7 the cursor 4 locating)
Line 1 q 4 1
2
M I3
r3
⎯ ⎯ ⎯ ⎯
Q1
(
Display the present Line the cursor locating and operation state of SG2.
1 4 5 6 8 Column Procedure : 2 3 7 Press ‘SEL+ESC’ (simultaneously) Line q M1⎯I3 2 (The Line 4 displays where the cursor 3
locating and operation state of SG2) S T P L I N E 0 24 O 0
┬ ┴
r3
⎯ ⎯
Q1 1 4
(
(C7
Delete the whole Line
1234568Coln 7 um Line q 4 2 3
4
1
M1 I3 (Q1
r3
⎯ ⎯ ⎯ ⎯
C( 7
Page 35
Chapter 3 Program Tools 33
Procedure : 1 3 4 5 6 8 Column 2 7 Press ‘SEL+DEL’ (Simultaneously) Line q 4 2 3C L E A R L n 0 0 2 (‘ESC’ Cancel , ‘OK’ Execute) 4 E S C ? O K ?
1
M1 I3 (Q1
r3
⎯ ⎯ ⎯ ⎯
C7(
Insert a whole line.
12 4568coln 3 7 um line q M1 2 3
4
Step: 12345678co lumn Press“SEL+OK” ( at the same time) Line 1 4 1 3 1 q 2 3 4
1 4
┬ ┴
r3
M
r3
I3 (Q1
⎯ ⎯ ⎯ ⎯
I
⎯ ⎯ ⎯ ⎯
(C7
(Q
C7(
Turn page ( move upward/ downward 4 lines program):
1 23 45 678 column
q 4
M1⎯I3
r3
⎯ ⎯ ⎯ ⎯
M1⎯I3
r3 (C7
⎯ ⎯ ⎯ ⎯
Q1(
(C7
Q1(
line 1 q 4 2 3 4 5
Step Press ‘SEL+↑ ↓’ at the same time
3 4 5
12345678column
line 1
2
FUNCTION BLOCK program i
nput
3 78 um Line L D D E R 1 A 2> FUN . BLOCK 3RUN 4C A P .LE R ROG
Procedure 1: 1 2 3 4 5 6 7 8 Column Press ‘OK’ Line 1 21 (Enter FUNCTION BLOCK edition) 3 4
12 456 Coln
Present action area The present value will appear when SG2 is under ‘RUN’ m de. o
1
│ │
00. 00
T 1
Preset action v r alue a ea
Page 36
Chapter 3 Program Tools 34
1234568Coln 7 um Never press ‘’ to move to the
digital position. 2 1 (If T2 is required to be changed, 0.00 T3 Press ‘↑’/‘↓’ and ‘SEL’ to execute.)
Line 1
4
1
│ │
0
1
Step 2: modify c present target value dpreset the action relay
Preset the targ
Procedure 2- 2 3 7 Press ‘←’
21 (move the cursor to the preset action 00.03 area ) 4
et value
1: 1 4 5 6 8 Column
Line 1 1
┐ ┤ │ │ ┴
0
T1
Procedure 2-2: 1 2 3 4 5 6 7 8 Column Press ‘SEL’ Line 1 21 (begin input the target value) 3
4
Procedure 2-3: 1 2 3 4 5 6 7 8 Column Press ‘’ for 3 times
21 (Press ‘SEL’ and followed by ‘↑,↓
The digital ‘0’ is changed to ‘3’) 4
Line 1
3
1
│ │
00. 00
1
│ │
00. 0
T1
3
T1
Procedure 2-4: 1 2 3 4 5 6 7 8 Column Press ‘OK’ Line 1 21 ( 3
Save the input data) 00. 03
4
Procedure 2-5: 1 2 3 4 5 6 7 8 Column Press ‘←’
21 3 4
Line 1
1
│ │ ┴
1
│ │
00. 0 3
T1
T1
Repeat Step 2-2 ~ step 2-4 for 3 times, to enter the following screen:
rocedure 2-6: 1 3 4 5 6 8 Column
P 2 7 Line 1 21 3 4
As the present value of the timer, , analog input (A1-A8) and analog gain value (V1-V8) is set
as the preset valu
e of them. Next to the step 2-2, to execute the following operation:
counter
1
│ │
3 3.33 T1├
Page 37
Chapter 3 Program Tools 35
Step2-3A: 3 4 5 6 8 column 1 2 7 Press ‘SEL’ line 1 21 31
4
Repeat the step 2-3A, the following screen will be shown in turn:
Step2-3 1 2 7 Press ‘SEL’ line 1 21 3
4
Step 2-3C: 1 6 column 2 3 4 5 7 8 press ‘SEL’ line 1 1 21 3
4
Step 2-3D: 1 6 column 2 3 4 5 7 8 Press ‘SEL’ line 1 1 21 3
4
Next to step 2-3B, then ‘’, the following scr
st 2 3 4 5 7 8 Press ‘↑’
21 3
4
Repeat step2-4A (press ‘’ is also available) e t al e f A1-A8 will be periodi ly changed. And so
set as pr
st press ‘OK’ line 1 21 Save the present data. 3 4
Procedure 2-7: 3 4 5 6 8 Column 1 2 7 Press ‘↑’
21 33 3 1 4
B: 3 4 5 6 8 column
een will be shown.
ep 2-4A: 1 6 column
1
line 1
the pr se v u
on. ‘Analog*gain + offset’ value (V1-V8) and the o b cks i ount ) present value is
eset value, to repeat the step to selec T , , V1-V8.
ep 2-5A: 1 2 3 4 5 6 7 8 column
t T1- F
Line 1
1
│ │
V
1
│ │
A1
┐ ┤ │ │
T1
┐ ┤ │ │
C1
┐ ┤ │ │
A2
funocti
other
C1-CF
1
┤ │
A
1
│ │
3 .3
n lo (t me, c er
2
T1
T1
T1
T1
T1
┐ │ ├
T1
T
cal
Procedure 2-8: 1 2 3 4 5 6 7 8 Column Press ‘SEL’ Line 1 21
(begin to edit data) 3 3 3 T1 4
1
│ │
3 .3
Page 38
Chapter 3 Program Tools 36
Procedure 2-9: 1 2 3 4 5 6 7 8 Column Press ‘
22 (Press ‘SEL’ + ‘ ↑, ↓
to change1’ to ‘ 2’) 4
Line 1
3
1
│ │
3 3.
3 3
T1
1 2 3 4 5 6 7 8 Column Procedure 2-10: Press ‘OK’ Line 1 22 (save the input data) 3 4
1
│ │
3 3
T13 3.
Procedure 2-11: 1 2 3 4 5 6 7 8 Column
Press ‘↑’ 22 (move the cursor to ‘1” position) 3 4
Line 1
1
│ │
3 3
T1 3 3 .
Procedure 2-12: 2 3 4 5 6 8 Column 1 7 Press ‘SEL’ Line 1
22 (begin to edit data) 3 4
1
│ │
333. 3
T1
-13: 3 4 5 6 8 Column 2 1 2 7
Press ‘’ for 3 times 22
(Press ‘SEL’ and followed by ‘↑ ↓’ to change 1 to 4) 4 L o
Line 1
3
4
┤ │
333. 3
┐ │
T1
Procedure 2-14: 3 4 5 6 8 Column 1 2 7 Press ‘OK’ Line 1 22 (save input data) 3 333.3 T1 4L o
4
│ │ ├ ┴
rocedure 2-15: 3 4 5 6 8 Column P 1 2 7
Press ‘’ for 3 times 22 (this step leads to editing the action 3 . T13 relay) 4 L o
Line
4 1
│ │
3 3 3
d Edit action program and preset the action relay
2 3 5 6 Column Procedure 2-16: 1 4 7 8 Press ‘SEL’ Line 22 (Begin to modify ) 3 4L o
4 1
│ │
333. 3
T1
Page 39
Chapter 3 Program Tools 37
Procedure 2-16A: 1 2 3 4 5 6 8 Column 7 Press ‘SEL’ Line 4 1 22 (Begin to modify ) 3 4I 1
Repeat the step 2-16A, the following scr
Procedure 2-16B: Press ‘SEL’ Line 1 22 3 4i 1
Procedure 2-16C: 1 3 4 5 6 8 Column 2 7 Press ‘SEL’ Line 1 22 3 4L o
N
ext to step 2-16A, then ‘’, the following screen will be shown.
Procedure 2-17: 1 2 3 4 5 6 7 8 Column Press ‘’ for 5 times
22 (Press ‘SEL’ + ‘↑ ↓’ to change I to M ) 4 M 1
een will be shown in turn:
Line 1
3
┐ ┤ │ │
333. 3
1 2 3 4 5 6 7 8 Column
4
│ │
333. 3
4
│ │ ┴
4
│ │
3 3
3 .3
T1
T1
3333.
T1
T1
Procedure 2-18: 1 2 3 4 5 6 7 8 Column Press ‘→’
22 (Press ‘SEL’ + ‘← →’ to move the cursor to digital location) 4 M 1
Procedure 2-19: 1 2 3 4 5 6 7 8 Column Press ‘ ’for 3 times
22 (Press ‘SEL’ + ‘↑ ↓’ to change ‘1’ to ‘4’) 4 M 4
Line 1
3
Line 1
3 3 3 1
4
│ │
333. 3
4
│ │
3 3.
T1
T
Procedure 2-20: 3 4 5 6 8 Column 1 2 7 Press ‘OK’ Line 1 22 (save the input data) 3 4M 4
4
│ │
333. 3
T1
Procedure 2-21: 1 5 Column 2 3 4 6 7 8
1
Press ‘↑’ 22 (Move the cursor to preset action 3 value area to repeat the step 2-1) 4 M 4
Line
4
│ │
3 33. 3
T1
Page 40
Chapter 3 Program Tools 38
rocedure 2-22: 5 6 8 Column P 1 2 3 4 7
1
Press ‘’ 22 (Move the cursor to position ‘2’ to 3 repeat the 2-8) 4 M 4
Line 4
┐ ┤ │ │
333. 3
T1
The detail operation of modify the analog comparator x, Ay:
A
ep 2-22A: 4 5 6 column
st 1 2 3 7 8 Press ‘↑’
2A 1 (Move the cursor to 2, or repeat the 3 A 3 next step. Select A1-A8 ) 4
line 1 4
┐ ┤ │ │ ├ ┴
0 3 . 3 3
G1
1 2 3 4 5 6 7 8 column Step 2-22B: Press ‘SEL’ twice line 1 2A 1 (Move the cursor to 2 to repeat the 3 T 1
above step. 4 Select A3-V1-T1 1-A1) -C
4
│ │
0 3 . 3 3
G1
Step 2-22C: 1 2 3 4 5 6 7 8 column Pres
s ‘
(Move the curso 3 T 2 above step. Select T1~TF, 4
C1~CF,A1~A8,V1~V8)
line 1
4
┤ │
0 3 . 3 3
┐ │
G1 r to 2 to repeat the
2A 1
Step 2-22D: 1 2 3 4 5 6 7 8 column Press ‘OK’ line 1 2A 4 Save th 3 Te present data F 4
4
│ │
03. 33
G1
Procedure 2-23: 1 2 3 4 5 6 7 8 Column
Press ‘’ 22 (Move the cursor to position ‘4’ to 3 repeat the step 2-12) 4 M 4
Line 1
4
│ │
333. 3
T1
Continu ut Function Block
Next Function Block 12345678Column Line 1 22 3 4M 4
e to inp
4
│ │
333. 3
T1
Page 41
Chapter 3 Program Tools 39
Procedure 1: 1 2 3 4 5 6 7 8 Column Press ‘SEL+’ (Simultaneously)
21 3 4I 2
Line 1
2
│ │
010. 0
T 2
Last Function Block
Line 1 22 3 4M 4
12345678Column
4
│ │ ┴
.
333 3 T1
1 2 3 4 5 6 7 8 Column Procedure :
Press ‘SEL+’ (Simultaneously) 22 3 4R 1
D B
elete Function lock
Procedure Press ‘SEL+DEL’
22 3C L E A R B L O C K (‘ESC’: Cancel O K ? ; 4 E S C ?
‘OK’: Execute)
v 1
1
3
│ │
050. 0
2345678Column
5
T F
(Simultaneously) Line 1
Back to Main Menu:
12345678Column Pres Line 1 LADDER s ‘ESC’ 2 3RUN 4CLEA PROG. R
Change Function Block Category:
Line 1 23 3 4M 4
FUN. BLOCK
>
12345678Column
3
┤ │
0000
┐ │ ├
T 2
Move the cursor to change to T, C, R, G, H, P, L
Step 1: 12345678Column Press ‘ Line 1
SEL’ 2M 1 3999999├│C 1 4M 2
2
Page 42
Chapter 3 Program Tools 40
RUN
or STOP
(1) RUN (2) ST P Mode
UN PROG. STOP PROG.
R
>YES >YES NO NO
Mode O
e the cursor
↑ov
OK Execute the instruction, then back to main menu
ES BackC to main menu
Other u Item
M
Men s
(1) CLEAR PROGRAM (Clear RAM, EEPROM and Password at the same tim
CLEAR PROG.
YES >NO
(2) WRITE (save the program (RAM) to the PM05 program spare cartridge)
WRI
TE
YES >NO
(3) READ (read the program from the PM05 program spare cartridge to SG2 (RAM))
READ
YES >NO
(1) ∼ (3) Now Press:
OK Execute the instruction, then back to main menu
ESC Back to main menu
(4) SET (system
ID SET tting (00~99) 01 Æ ID se REMOTE I / 0 ote I/O Mode ( : n M: Master S: Slave) N BACK LIGHT ht mode (√: lw li 10s after pressed.) × M KEEP :V lat ×: Non- Volatile) I/O NUMBER 0
I/O ALARM C KEE Z SET ×
N M KEEP fu
P ×
ote:
Move the cursor
setting)
Æ
Rem N one
Æ
Back lig a ays ght ×: light for
Æ
M: non-Volatile ( o ile
Æ
Expansion I/O module number
Æ
Siren setting when is not available to Expansion I/O Points :Yes ×:No
Æ
in stop/run switching, Co
Æ
Setting keypad input Z1-Z4 is available
nction is only available for keeping M status in RUN mode when power is re-supplied after loss.
0~3
unter Present Value Keeping:Yes ×:No
√:Yes ×:No
e)
Page 43
Now Pres :
Press ‘SEL’
and ‘← →
Press ‘SEL
Note
s
Move the ur
SEL Begin to edit.
1. ID SET=
and ‘
3. BACK G
4. M KEEP; I/O
OK ition Data Confirm the Ed
ESC 1. Cancel the setting when pressed ‘SEL’
c sor
item’ Move the cursor for ‘ID SET
~99 ; I/O NUMBER=0~3
E I/O = N⇔M⇔S⇔N
T ’ 002. REMO LI HT ; C KEEP ; Z SET =
ALARM =
to Main Menu 2. Back
×
Chapter 3 Program Tools 41
×
When D elected, ID setting range is 0~7 , which should be continuousID=0 default as
Master, ID=1~7 default as Slave
When REMOTE I/O is selectedthe distribution of the remote I/O is as follows:
Remote Input X1~X12 Remote Output Y1~Y8
(5) RTC SET
ATALINK is s
Master Slave
← →
I1~I12 Q1~Q8
R TTC SE V2.0 YY . NN . DD
MO HH : MM
Now Press
Press ‘SEL’
+ ‘← →’
SEL then
OK Save the Input Data
ESC
(6) ANALOG SET
Move the Cursor
1. YY=00~99,NN=01~12,DD=01~31
2.MOTUWETHFRSASUMO
3. HH = 00~23 or MM = 00~59
1. Cancel the Input Data when press ‘SEL’.
2. Back to Main Menu.
SG2 firmware Version
eters SEL Begin to input param
A 1=GAIN : 010 OFFSET : + 00 A 2=GAIN : 010 OFFSET : + 00
Now Press
SEL Begin to input parameters
Press ‘SEL’
+ ‘← →’
‘SEL’ +
OK Save the Input Data
ESC
Note: V1 = A1*A1_GAIN + A1_OFFSET …… V8 = A8*A8_GAIN + A8_OFFSET
1. Move downward the Cursor
2. Switch the setting screen from A1, A2 -> A3, A4 ->A5,A6 -> A7,A8
Move the Cursor
1. GAIN =000~999
2. OFFSET=-50~+50
1. Cancel the Input Data when press ‘SEL’.
2. Back to Main Menu.
Æ
GAIN (0~999)
Æ
OFFSET (-50~+50)
Page 44
Chapter 3 Program Tools 42
(7) PASSWORD (setting password)
PASSWORD
0 0 0 0 * * * *
Now Press
SEL
Press ‘SEL’
+ ‘← →’
Press ‘SEL’
+ ‘↑ ↓’
ESC
1. Begin to input numeral
2. When the password is ON, it will not display 0000, but ****.
Move the cursor
0~F
OK Save the input data, not 0000 or FFFF, as the PASSWORD is ON.
1. Cancel the Input Data when press ‘SEL’.
2. Back to Main Menu.
PASSWORD
3
Note: If password number is 0001~9FFF, program will be protected.
If password number is A000~FFFE, program and all menu setting will be protected.
8LANGUAGE (Selection menu language)
ENGLISH
>
FRANÇAIS ESPAÑOL
Æ Æ Æ
ITALIANO ÆItalian DEUTSCH ÆGerman PORTVGVES ÆPortuguese SIMPLIFIED CHINESE
Æ
Now Press
Press ‘↑ ↓’
OK Select the language the cursor located
ESC Back to Main Menu
Vertically move the Cursor
Sample:
ENGLISH
>
FRANÇAIS ESPAÑOL ITALIANO
key key
ENGLISH FRANÇAIS
>
ESPAÑOL ITALIANO
OK
ENGLISH FRANÇAIS
>
ESPAÑOL ITALIANO
English French Spanish
Simplified Chinese
Page 45
Chapter 3 Program Tools 43
8INITIAL (select Ladder Logic and Function Block Diagram (FBD))
INITIAL
> LADDER
FBD
Now Press:
Press ‘↑ ↓’
OK Select the language the cursor located
ESC Back to Main Menu
Vertically move the Cursor
The origin program will be cleared as the change of edition method.
Page 46
Chapter 4 Relay Ladder Logic Programming 44
Chapter 4: Relay Ladder Logic Programming

Common Memory Types

General output SET output RESET output Symbol Input contact Keypad input Output coil Auxiliary Counter Timer
contact
[
¿
À
Q Q Q Q Q q 8 (Q1- Q8 / q1-q8) M M M M M m 15 (M1-MF / m1-mF) C T
Inputs (I Memory Type)
The SG2 digital input points are designated I memory types. The number of digital I input points are 6, 8, or 12 depending on each SG2 model.
Keypad Inputs (Z Memory T y pe)
The SG2 digital input points are designated Z memor y types. The number of digital Z input points are 4 depending on SG2 H type model.
PULSE output
P (N.O. / N.C.)
T T t 15 (T1-TF / t1-tF)
N.O. Contact
I i 12 (I1-IC / i1-iC)
Z z 4(Z1-Z4 / z1-z4)
C c 15 (C1-CF / c1-cF)
N.C. Contact Number
Outputs (Q Memory Type)
The SG2 digital output points are designated Q memory types. The number of digital Q output points is 4 or 8 depending on each SG2 model. In this example, output point Q1 will be turned on when input I1 activated.
Auxiliary Rela y s (M Memory Type)
Auxiliary relays are digital internal memory bits used to control a ladder logic program. The auxiliary relays are not physical inputs or outputs that can be wired to any external device;
switches, sensors, rela ys , lamps, etc. Since auxiliary relays are internal bits within the CPU, they can be programmed as digital inputs
(contacts) or digital outputs (coils). In the first rung of this example, auxiliary relay M1 is being used as an output coil and will energize when input I2 turns on. In the second rung auxiliary relay M1 is being used as an input and when energized, will turn on outputs Q2 and Q3.
Page 47
Chapter 4 Relay Ladder Logic Programming 45
Timers and Timer Status Bits (T Memory Type)
Timer status bits provide the relationship between the current value and the preset value of a selected timer . The timer status bit will be on when the current value is equal or greater than the preset value of a selected timer. In this example , when input I3 turns on, timer T1 will start. When the timer reaches the preset of 5 seconds timer status contact T1 turns on. When T1 turns on, output Q4 turns on. Turning off I3 will reset the timer.
Counters and Counter Status Bits (C Memory Type)
Counter status bits provide the relationship between the current value and the preset value of a selected counter. The counter status bit will be on when the current value is equal to or greater than the preset value of a selected counter. In this example , each time the input contact I4 transitions from off to on, the counter (C1) increments by one. When the counter reaches the preset of 2 counts, the counter status contact C1 turns on. When C1 turns on, output Q5 turns on. When M2 turns on counter C1 will reset. If M9 is turned on, the counter will change from a count-up counter to a count-down counter.
Page 48

Specialty Memory Types

Chapter 4 Relay Ladder Logic Programming 46
Symbol
Expansion input coil Expansion output coil Differential (one shot) RT
C Analog comparator HMI PWM DATA LINK
General output SET output RESET output
[
Y Y Y Y Y y 12 (Y1-YC / y1-yC)
R G H P L
¿
À
PULSE output
P
N.O. Contact
Lo Hi Used in function block
X x 12 (X1-XC /x1-xC)
D (Positive) d (Negative)
R r 15 (R1-RF / r1-rF)
G g 15 (G1-GF / g1-gF)
N.C. Contact Number
(N.O. / N.C.)
15 (H1-HF)
1 (P1)
8 (L1-L8)
Positive Input Differential Instruction (One-Shot)
A positive input differential instruction, or One-Shot, holds its status ON for one CPU scan when the preceding series contact transitions from OFF to ON. This transition from OFF to ON is called a Positive Input Differential.
Negative Input Differential Instruction (One-Shot)
A negative input differential instruction, or One-Shot, holds its status ON for one CPU scan when the preceding series contact transitions from ON to OFF. This transition from ON to OFF is called a Negative Input Differential.
Page 49
Chapter 4 Relay Ladder Logic Programming 47

Output Instructions

Set Output Instruction (Latch) (
A set output instruction, or Latch, turns ON an output coil (Q) or an auxiliary contact (M) when the preceding input contact transitions from OFF to ON. Once the output is ON or set, it will remain ON until it is reset using the Reset output instruction. It is not necessary for the preceding input contact controlling the Set output instruction to remain ON.
¿
)
Reset Output Instruction (Unlatch) (
À
)
A reset output instruction, or Unlatch, turns OFF a previous set output coil (Q) or an auxiliary contact (M) when the preceding input contact transitions from OFF to ON. Once the output is OFF or reset, it will remain OFF until it is reset using another output instruction. It is not necessary for the preceding input contact controlling the Reset output instruction to remain ON.
Page 50
Chapter 4 Relay Ladder Logic Programming 48
Pulse Output Instruction (Flip-Flop) ( P )
A pulse output instruction, or Flip-Flop, turns ON a coil (Q) or an auxiliary contact (M) when the preceding input contact transitions from OFF to ON. Once the output is ON, it will remain ON until the preceding input contact transitions from OFF to ON a second time. In the example below, When Pushbutton I3 is pressed and released Motor Q4 will turn ON and remain on. When Pushbutton I3 is pressed again, Motor Q4 will turn OFF and remain OFF. The pulse output instruction (P) will “flip­flop” its state from ON to OFF at each press of Pushbutton I3.
Page 51
Chapter 4 Relay Ladder Logic Programming 49

Counter Instructions

The SG2 includes a total 15 separate counters that can be used throughout a program. Each counter has a choice of 8 operation modes, 6 for general purpose counting and 2 for high speed counting. Additionally, each counter has 6 parameters for proper configuration. The tables below describe each configuration parameter and lists each compatible memory type for configuring counters.
Note
analog input A1~A8 and analog gain+offset value V1~V8.
The figure below shows the relationship between the numbered block diagram for a Counter, the ladder diagram view, and the software Edit Contact/Coil dialog box.
Symbol Description
Counting Mode (1-6)
c
Use (I1 ~ gF) to set counting up or counting down
d
OFF: counting up (0, 1, 2, 3, 4….) ON: counting down ( ….3, 2, 1, 0) Use (I1 ~ gF) to RESET the counting value
e
ON: the counter resets to zero and OFF OFF: the counter continues to count Present Counting Value, range:0~999999
f
Target (Setting) Value, range:0~999999
g
Code of the counter (C1 ~ CF total: 15 counters)
h
Compatible Instructions Inputs Keypad Inputs Outputs Auxiliary Expansion inputs Expansion outputs RT Counter Timer Analog comparator Normal close contact
coil
C
Range
I1-IC / i1-iC Z1-Z4 / z1-z4
Q1-Q8 / q1-q8
M1-MF / m1-mF
X1-XC /x1-xC
Y1-YC / y1-yC
R1-RF / r1-rF
C1-CF / c1-cF
T1-TF / t1-tF
G1-GF / g1-gF Lo
The target setting value of the counter could be a constant or the present value of the timer, counter,
Page 52
Chapter 4 Relay Ladder Logic Programming 50
Counter Mode 1 (Fixed Count, Non-Retentive)
Mode 1 Counter will count up to a fixed preset value and stop counting when the current count is equal to the preset value. Additionally, the current count value is non-retentive and will reset to zero on a loss of power to the smart relay. In the e x ample below, the counter will stop counting when it reaches the preset value of 20. Counter status bit C1 will be ON when the current value is 20.
Page 53
Chapter 4 Relay Ladder Logic Programming 51
Counter Mode 2 (Continuous Count, Non-Retentive)
Mode 2 Counter will count up to a fixed preset value and continue counting after the preset value . Additionally, the current count value is non-retentive and will reset to zero on a loss of power to the smart relay. In the example below, the counter will continue counting after its preset value of 20. Counter status bit C1 will be ON when the current value is 20.
Page 54
Chapter 4 Relay Ladder Logic Programming 52
Counter Mode 3 (Fixed Count, Retentive)
Mode 3 Counter operation is similar to Mode 1 except its current count value is retentive. Mode 3 Counter will count up to a fixed preset value and stop counting at that value. Additionally, the current count value is retentive and will keep its current count after a loss of power to the smart relay. In the example below, the counter will stop counting when it reaches the preset value of 20. Counter status bit C1 will be ON when the current value is 20.
Counter Mode 4 (Continuous Count, Retentive)
Mode 4 Counter operation is similar to Mode 2 except its current count value is retentive. Mode 4 Counter will count up to a fixed preset value and continue counting after the preset value. Additionally, the current count value is retentive and will keep its current count after a loss of power to the smart relay. In the e x ample below, the counter will continue counting after its preset value of 20. Counter status bit C1 will be ON when the current value is 20.
Page 55
Chapter 4 Relay Ladder Logic Programming 53
Counter Mode 5 (Continuous Count, Up-Down Counter, Non-Retentive)
Mode 5 Counter operation is similar to Mode 2 where its current count value is continuous and non- retentive, except its C1 status bit will only be ON when the counter counts up to its preset, or down to its preset from a count higher than its preset. Even with its direction bit set to ON, it will not turn on its C1 status bit when it counts down to zero. The C1 status bit is fixed to the non-zero preset value regardless of the state of the direction bit. Additionally, the Mode 5 counter is alwa ys reset to zero, unrelated to the state of its direction bit.
The Mode 5 Counter will count up to a fixed preset value and continue counting after the preset value. Additionally, the current count value is non-retentive and will reset to zero on a loss of power to the smart relay. In the example below, the counter will continue counting after its preset value of 20. Counter status bit C1 will be ON when the current value is 20.
Page 56
Chapter 4 Relay Ladder Logic Programming 54
Counter Mode 6 (Continuous Count, Up-Down Counter, Retentive)
Mode 6 Counter operation is similar to Mode 4 where its current count value is continuous and retentive, except its C1 status bit will only be ON when the counter counts up to its preset or down to its preset from a count higher than its preset. Even with its direction bit set to ON, it will not turn on its C1 status bit when it counts down to zero. The C1 status bit is fixed to the non-zero preset value regardless of the state of the direction bit. Additionally, the Mode 5 counter is alwa ys reset to zero, unrelated to the state of its direction bit.
The Mode 6 Counter will count up to a fixed preset value and continue counting after the preset value. Additionally, the current count value is retentive and will keep its current count after a loss of power to the smart relay. In the example below, the counter will continue counting after its preset value of 20. Counter status bit C1 will be ON when the current value is 20.
Page 57
Chapter 4 Relay Ladder Logic Programming 55

High Speed Counters (DC Version Only)

The DC powered version smart relays include two 1 KHz high speed inputs on terminal I1 and I2. These can be used as general purpose DC inputs or can be wired to a high speed input device (encoder, etc.) when configured for high speed counting. These are often used for counting something moving very fast (>40Hz) or used as a speed reference on a machine. The high speed counters are configured using the same software Edit Contact/Coil dialog box, except selecting Counter Mode 7 or Mode 8.
High Speed Counter Mode 7 (DC powered versions only)
The Mode 7 High Speed Counter can use either input terminals I1 or I2 for forward up-counting to 1Khz maximum at 24VDC high speed input signal. The selected Counter Coil (C1-CF) will turn ON when the pulse count reaches the target setpoint and remain ON. The counter will reset when the preceding rung is inactive or the Reset Input is active.
In the example below shows the relationship between the numbered block diagram for a Mode 7 Counter, the ladder diagram view, and the software Edit Contact/Coil dialog box.
Symbol
c d e
f g h
Description
Counting Mode (7) high speed counting High speed counting input terminal: I1 or I2 only
Use (I1 ~ gF) to RESET the counting value ON: the counter reset to zero OFF: the counter continues to count
Current Count Value, range:0~999999 Preset Value, range:0~999999 Counter Coil Number (C1 ~ CF total: 15 counters)
Page 58
Chapter 4 Relay Ladder Logic Programming 56
High Speed Counter Mode 8 (DC powered versions only)
The Mode 8 High Speed Counter can use either input terminals I1 or I2 for forward up-counting to 1 KHz maximum at 24VDC high speed input signal. The selected Counter Coil (C1-CF) will turn ON when the pulse count reaches the target “Preset ON” value and remain ON until the pulse count reaches the target “Preset OFF” value. The Fixed Time xxxx. The counter will reset when the preceding rung is inactive. The table below describes each configuration parameter for High Speed Counter Mode 8.
In the example below shows the relationship between the
numbered block diagram for a Mode 8 Counter, the ladder diagram view, and the software Edit Contact/Coil dialog box.
Symbol
c d
e f g
h
Description
Counting Mode(8)—Frequency Comparison High speed counting input terminal: only I1, I2 Counting interval time:(0~99.99S) Counter ‘on’ target value (000000~999999) Counter ‘off’ target value (000000~999999) Code of Counter (C1~CF Total :15Group)
Page 59
Chapter 4 Relay Ladder Logic Programming 57

Timer Instructions

The SG2 includes a total of 15 separate timers that can be used throughout a program. Each timer has a choice of 8 operation modes, 7 for general purpose timing and 1 (mode 7) for a pulse timer. Additionally, each timer has 6 parameters for proper configuration. The table below describes each configuration parameter and lists each compatible memory type for configuring counters.
Note The target setting value of the counter could be a constant or the present value of the timer, counter, analog
input A1~A8 and analog gain+offset value V1~V8.
Timer Mode 0 (Internal Coil)
Mode 0 Timer (Internal Coil) used as internal auxiliary coils. No Timer preset value. In the example below shows the relationship between the numbered block diagram for a Mode 0 timer, the ladder diagram view, and the software Edit Contact/Coil dialog box.
Symbol Description
Timer Mode (0-7)
c
Timer Unit: 1 : 0.00 - 99.99 sec
d
ON: the timer reset to zero
e
OFF: the timer continues to time Current timer value
f
Timer preset value
g
Timer Coil Number (C1 ~ CF total: 15 timers)
h
2 : 0.0 - 999.9 sec
3 : 0 - 9999 sec
4 : 0 - 9999 min
Compatible Instructions Inputs
Outputs Auxiliary Expansion inputs Expansion outputs RT Counter Timer Analog comparator Normal close contact
coil
C
Range
I1-IC / i1-iC Z1-Z4 / z1-z4
Q1-Q8 / q1-q8 M1-MF / m1-mF X1-XC /x1-xC Y1-YC / y1-yC R1-RF / r1-rF C1-CF / c1-cF T1-TF / t1-tF G1-GF / g1-gF
Lo
Page 60
Chapter 4 Relay Ladder Logic Programming 58
Timer Mode 1 (ON-Delay)
Mode 1 Timer (ON-Delay) will time up to a fixed preset value and stop timing when the current time is equal to the preset value. Additionally, the current time value is non-retentive and will reset to zero on a loss of power to the smart relay. In the example below, the timer will stop timing when it reaches the preset value of 5 seconds. Timer status bit T1 will be ON when the current value is 5.
Page 61
Chapter 4 Relay Ladder Logic Programming 59
Timer Mode 2 (ON-Delay with Reset)
Mode 2 Timer is an ON-Delay with reset that will time up to a fixed preset value and stop timing when the current time is equal to the preset value. Additionally, the current time value is non-retentive and will reset to zero on a loss of power to the smart relay. The timer reset input is Input I1. In the example below, the timer will stop timing when it reaches the preset value of 5 seconds. Timer status bit T1 will be ON when the current value is 5.
Page 62
Chapter 4 Relay Ladder Logic Programming 60
Timer Mode 3 (OFF-Delay)
Mode 3 Timer is an OFF-Delay with reset that will time up to a fixed preset value and stop timing when the current time is equal to the preset value. Additionally, the current time value is non-retentive and will reset to zero on a loss of power to the smart relay. In the example below, the timer reset input is Input I1. Also in the example below, timer status bit T1 will be ON immediately when its rung is true. The timer will only begin timing up when its rung changes to false. Timer status bit T1 will turn OFF when the current time value reaches 10 seconds.
Page 63
Chapter 4 Relay Ladder Logic Programming 61
Timer Mode 4 (OFF-Delay)
Mode 4 Timer is an OFF-Delay with reset that will time up to a fixed preset value and stop timing when the current time is equal to the preset value. Additionally, the current time value is non-retentive and will reset to zero on a loss of power to the smart relay. In the example below, the timer reset input is Input I1. Also in the example below, the timer status bit T1 will turn ON only after its rung transitions from true to false. Timer status bit T1 will turn OFF when the current time value reaches 10 seconds.
Page 64
Chapter 4 Relay Ladder Logic Programming 62
Timer Mode 5 (FLASH without Reset)
Mode 5 Timer is a Flash timer without reset that will time up to a fixed preset value then change the state of its status bit when the current time is equal to the preset value. Additionally, the current time value is non-retentive and will reset to zero on a loss of power to the smart relay. In the example below, timer statu s bit T1 will be ON immediately when its rung is true and begin its timing sequence. Timer status bit T1 will turn OFF when the current time value reaches its preset of 10 seconds. This Flash sequence of the timer status bit T1 will continue as long as its rung remains true.
Page 65
Chapter 4 Relay Ladder Logic Programming 63
Timer Mode 6 (FLASH with Reset)
Mode 6 Timer is a Flash timer with reset that will time up to a fixed preset value then change the state of its status bit when the current time is equal to the preset value. Additionally, the current time value is non­retentive and will reset to zero on a loss of power to the sm ar t r ela y. In the example below, the timer reset input is Input I 1. Also in the example below, timer status bit T1 will be ON immediately when its r ung is true and begin its timing sequence. Timer status bit T1 will turn OFF when the current time value reaches its preset of 5 seconds. This Flash sequence of the timer stat us bit T1 will continue as long as its r ung remains true.
Page 66
Chapter 4 Relay Ladder Logic Programming 64
Timer Mode 7 (FLASH Cascade without Reset)
Mode 7 Timer is a Flash timer without reset that uses two timers in a cascade configuration. The cascade configuration connects the timer status bit of first timer to enable the second timer. The second timer will time up to its preset value then flash and its timer status bit will enable the first timer. Additionally, the current time value is non-retentive and will reset to zero on a loss of power to the smart relay. In the example below, timer status bit T1 will be ON after it completes its timing sequence of 2.5 seconds . Timer 2 will then begin its timing sequence of 1 second. When the current time value of Timer 2 reaches its preset of 1 second, its status bit T2 will flash and Timer 1 will begin timing again. This type of cascade timer is of ten used in combination with a counter in applications where it is necessary to count the number of time cycles completed.
Note: Timer Mode 7 uses two timers. These timers cannot be reused as timers for other modes in other areas of
the program.
Page 67
Chapter 4 Relay Ladder Logic Programming 65

Real Time Clock (RTC) Instructions

The SG2 smar t relay includes a total of 15 separate RTC instructions that can be used throughout a program. Each RTC instruction has a choice of 5 operation modes, and has 10 parameters for proper configuration. The initial clock/calendar setting for each connected SG2 is set using the Operation»RTC Set menu selection from the SG2 Client software.
RTC Mode 0 (Internal Coil)
Mode 0 RTC (Internal Coil) used as internal auxiliary coils. No preset value.
In the example below shows the relationship
between the numbered block diagram for a Mode 0 RTC, the ladder diagram view, and the software Edit Contact/Coil dialog box.
Symbol
c d e f g h i j k
Description
Input the first wee k to RTC Input the second wee k to RTC RTC mode 0~2, 0: internal coil 1:daily, 2:consecutive days RTC displays the hour of present time. RTC displays the minute of present time Set RTC hour ON Set RTC Minute ON Set RTC Hour OFF Set RTC Minute OFF RTC Coil Number (R1~RF Total: 15 RTCs)
Page 68
Chapter 4 Relay Ladder Logic Programming 66
RTC Mode 1 (Daily )
The Daily Mode 1 allows the Rx coil to activate based on a fixed time across a defined set of days per week. The configuration dialog below allows for selection of the number of days per week (i.e. Mon-Fri) and the Day and Time for the Rx coil to activate ON, and Day and Time f or the Rx coil to deactivate OFF.
Page 69
Chapter 4 Relay Ladder Logic Programming 67
RTC Mode 2 (Interval weekly)
The Interval Time Mode 2 allows the Rx coil to activate based on time and day per week. The configuration dialog below allows for selection of Day and Time for the Rx coil to activate ON, and Day and Time for the Rx coil to deactivate OFF.
Page 70
Chapter 4 Relay Ladder Logic Programming 68
RT C Mode 3 (Year-Month-Day)
The Year-Month-Day Mode 3 allows the Rx coil to activate based on Year, Month, and Date. The configuration dialog below allows for selection of Year and Date for the Rx coil to activate ON, and Year and Date for the Rx coil to deactivate OFF.
Symbol
c d e f g h i j k
Description
RTC mode 3, Year-Month-Day Setting RTC Year ON Setting RTC Year OFF Display RTC Present time: Year-Month-Day Setting RTC month ON Setting RTC Day ON Setting RTC month OFF Setting RTC Day OFF RTC Code (R1~RF, total 15 group)
Page 71
Chapter 4 Relay Ladder Logic Programming 69
RTC Mode 4 ( 30-second adjustment)
The 30-second adjustment Mode 4 allows the Rx coil to activate based on week, hour, minute and second. The configuration dialog below allows for selection of week, hour, minute and second for the Rx coil to activate ON, and 30-second adjustment then Rx OFF.
Symbol Description
c
Setting RTC adjustment week
d
RTC mode 4
e
RTC present hour
f
RTC present minute
g
Setting RTC adjustment hour
h
Setting RTC adjustment minute
i
Setting RTC adjustment second
j
RTC Code (R1~RF, total 15 group)
Example1: preset minute < 30s
Example2: preset minute >= 30s
Page 72
Chapter 4 Relay Ladder Logic Programming 70
A
A
A
A

Comparator Instructions

The SG2 smart relay includes a total of 15 separate comparator instructions that can be used throughout a program. Each comparator has a choice of 6 operation modes. Additionally, each comparator has 7 parameters for proper configuration. The table below describes each configuration parameter, and lists each compatible memory type for configuring counters.
Symbol Description
Comparison Mode(0~5)
c
X analog input (A1~A8/ V1~V8), the present value of the timer, counter.
d
Y analog input (A1~A8/ V1~V8), the present value of the timer, counter.
e
X analog input value(0.00~99.99)
f
Y analog input value (0.00~99.99)
g
Set reference comparative value: could be constant, or the present value
h
of the timer, counter and analog input, analog input (A1~A8/ V1~V8).
Analog comparator Mode 0 (Internal Coil)
Mode 0 Analog Comparator used as internal auxiliary coils. No preset value.
In the example below shows the relationship
between the numbered block diagram for a Mode 0 Analog Comparator the ladder diagram view, and the software Edit Contact/Coil dialog box.
Output terminal(G1~GF)
i
Page 73
Chapter 4 Relay Ladder Logic Programming 71
Analog comparator Mode 1~5
When the relay of analog comparator is ON, there are 5 operation modes described below: (1) Analog Comparator mode 1 ( AY - AX AY +⑥, ⑦ ON) (2) Analog Comparator mode 2 (AX AY , ON) (3) Analog Comparator mode 3 (AX AY , ON) (4) Analog Comparator mode 4 ( AX, ⑦ ON) (5) Analog Comparator mode 5 ( AX, ⑦ ON)
Example 1: Analog Signal Compare
In the example below, Mode 4 is the selected function that compares the value of analog input A1 to a constant value (N) of 2.50. Status coil G1 turns ON is A1 is <= to 2.50.
Page 74
Chapter 4 Relay Ladder Logic Programming 72
Example 2: Timer/Counter Preset Value Compare
The Comparator instruction can be used to compare Timer , Counter, and RTC values to a constant value or to each other. In this example below, Mode 5 is the selected function that compares the value of Counter (C1) to a constant value (N) of 15 counts (the decimal point is ignored). Status coil G1 turns ON if C1 is to 15 counts.

HMI Display Instructions

The SG2 smart relay includes a total of 15 HMI instructions that can be used throughout a program. Each HMI instruction can be configured to display information on the SG2 12×4 character LCD in text, numeric, or bit format for items such as current value and target value for timers/counters, Input/Output bit status, RTC (real time clock) and Analog comparator .
Each HMI instruction is configured separately using the Edit»HMI/Text menu selection from the S G2 Client software. In the adjacent example, HMI instruction H1 is configured to display the value of I1 and T1, and some descriptive text. Numeric display data selections are Timer, Counter, RTC, and Analog. Bit display data selections for “ON” and “OFF” messages are “I” inputs, “M” internal relays, “X” expansion inputs and “Z” keypad inputs.
Allows the SEL button on the SG2 keypad to activate the selected message onto the LCD even when Hx coil is inactive.
Page 75
Chapter 4 Relay Ladder Logic Programming 73
Allows the HMI message to include coil number and selected value
(i.e. T1=003 sec).
Provides access to the Analog Display Set dialog for gain and offset parameters
shown below. The Analog Display Set dialog allows the user to specify a scaling factor (Gain) and an offset for each analog
input value.
A phone number can be displayed on the screen to aler t an operator to call for help.
Note: The Phone Number field does not dial a modem or allow for a modem connection.
Each HMI instruction has a choice of 2 operation modes. The table below describes each configuration parameter.
Symbol Description
Display Mode (1-2)
c
HMI character output terminal (H1-H8)
g
Page 76
Chapter 4 Relay Ladder Logic Programming 74

PWM Output Instruction (DC Transistor Output Models Only)

The transistor output model smart relay includes the capability to provide a PWM (Pulse Width Modulation) output on terminal Q1. The PWM instruction is able to output up to an 8-stage PWM waveform.
Symbol Description
Set display stages (1~8)
c
Display the present stage as operation(0~8)
d
Input Selected Stage 1(I1~gF)
e
Input Selected Stage 2(I1~gF)
f
Input Selected Stage 3(I1~gF)
g
Set PWM pulse width (0~32768ms)
h
Set PWM Period(1~32768ms)
i
PWM output terminal P1
j
Enable
OFF X X X 0 OFF
ON OFF OFF OFF 1 Set stage 1 ON OFF OFF ON 2 Set stage 2 ON OFF ON OFF 3 Set stage 3 ON OFF ON ON 4 Set stage 4 ON ON OFF OFF 5 Set stage 5 ON ON OFF ON 6 Set stage 6 ON ON ON OFF 7 Set stage 7 ON
ON ON ON 8 Set stage 8
Output PWM
Page 77
Chapter 4 Relay Ladder Logic Programming 75

Data Link/Remote I/O Instruction (SG2-20Vxx Models Only)

The SG2-20Vxxx transistor output models include the capability to link additional SG2-20Vxx units via the RS-485 connection terminals. Up to 8 additional SG2 units can be configured as independent Slave nodes, each running their own logic program and their I/O linked to one Master smart relay. Up to 2 additional SG2 units can be configured as Remote I/O nodes, and linked to one Master smart relay.
Symbol Description
Mode setting (1, 2) 1:sending 2:receiving
c
Set the send/receive points(1-8)
d
Set the send/receive points
e
Send/receive memory list location
f
I/O link output terminal (L1-L8)
g
Selectable Points Inputs Outputs Auxiliary Expansion inputs Expansion outputs
Range
coil
I1-IC / i1-iC
Q1-Q8 / q1-q8
M1-MF / m1-mF
X1-XC /x1-xC
Y1-YC / y1-yC
Note: Only one “Mode 1 Send” Data Link instruction (L1-L8) is allowed per Master instructions.
ID Memory
W1~W8
0
W9~W16
1
W17~W24
2
W25~W32
3
W33~W40
4
W41~W48
5
W49~W56
6
W57~W64
7
smart relay. All other Data Link instructions must be “Mode 2 Receive”
List Location
The Mode 2 Receive memory range is determined by the Controller ID. Each controller ID is allocated a range of 8 I/O points (Wx-Wx) that can be read into the Master smart relay using a DataLink instruction. The adjacent table show the memory range of Wx locations associated with each controller ID.
The Data Link instruction below is setup for Mode 1 Send where the Master smart relay is sending 5 I/O points of Inputs to each connected Slave smart relay. The starting Input is I03 with the resulting range of 5 sending inputs equal to I3 – I7.
Page 78
Chapter 4 Relay Ladder Logic Programming 76
Example 1: Data Link Mode 1
Set = 1, = 5, set ③ as the initiate of I3, the state of actual sending terminal I3~I7 is sent to memory list; the controller ID = 3, the state of corresponding memory list position W25~W32, and relationship of
sending terminal is as below:
Example 2: Data Link Receive mode 2
Set = 2, = 5, set as start from M3, set as start from W17, when enabling the Data Link, the state ‘ON/OFF’ of M3~M7 is controlled by the state of memory list position W17~W21.
Page 79
Chapter 5 FBD Programming 77
Chapter 5: Function Block Diagram Programming
FBD Instructions
Note: FBD program can only be edited and modified in SG2 Client software and write to SG2 controlled equipments via communication cable. Via controlled equipment, FBD program is available for querying or the parameter of the function block of the program for modifying.
Function Block Input Output Coil Range Input I I01~I0C(12) Keypad input Z Z01~Z04 (4) Expansion Input X X01~X0C(12) Output Q Q Q01~Q08(8) Expansion Output Y Y Y01~Y0C(12) Auxiliary M M M01~M0F(15) Knob N N N01~N0F(15) HMI H H01~H0F(15) PWM P P01(1) SHIFT S S01(1) I/O LINK L L01~L08(8) Logic /Function B B01~B99(99) Normal ON Hi Normal OFF Lo No Connection Nop

Coil Block Instruction

Page 80
Chapter 5 FBD Programming 78

PWM Function Block

The PWM output terminal ‘Q1’ can output 8 PWM waveforms. (Only provided for transistor output version)
Page 81

SHIFT Function Block

Chapter 5 FBD Programming 79
Symbol
c d e
Description
SHIFT code (Total 1 group) Set output type (Q, Y) Set output shift number (1-8)
Page 82

Logic Block Instructions

AND Logic Diagram

FBD:
Chapter 5 FBD Programming 80
LADDER:
I01 And I02 And I03
NoteThe input terminal is NOP which is equivalent to ‘Hi’

AND (EDGE) Logic Diagram

FBD:
LADDER:
I01 And I02 And I03 And D NoteThe input terminal is NOP which is equivalent to ‘Hi’
=
=
Page 83

NAND Logic Diagram

FBD:
Chapter 5 FBD Programming 81
LADDER:
Not(I01 And I02 And I03) NoteThe input terminal is NOP which is equivalent to ‘Hi’

NAND (EDGE) Logic Diagram

FBD:
LADDER:
Not(I01 And I02 And I03) And d NoteThe input terminal is NOP which is equivalent to ‘Lo’

OR Logic Diagram

FBD:
LADDER:
=
=
I01 or I02 or I03
NoteThe input terminal is NOP which is equivalent to ‘Lo’

NOR Logic Diagram

FBD:
LADDER:
Not ( I01 or I02 or I03 )
NoteThe input terminal is NOP which is equivalent to ‘Lo’
=
=
Page 84

XOR Logic Diagram

FBD:
Chapter 5 FBD Programming 82
LADDER:
I01 Xor I02
NoteThe input terminal is NOP which is equivalent to ‘Lo’

SR Logic Diagram

FBD:
LADDER:
Logic I01 I02 Bxx Table 0 0 holding 0 1 0 1 0 1 1 1 0 NoteThe input terminal is NOP which is equivalent to ‘Lo’

NOT Logic Diagram

FBD:
LADDER:
=
=
Not I01
NoteThe input terminal is NOP which is equivalent to ‘Hi’

Pulse Logic Diagram

FBD:
LADDER:
NoteThe input terminal is NOP which is equivalent to ‘Lo’
=
=
Page 85

Function Block

Chapter 5 FBD Programming 83
The function blocks are classified into 4 sorts: Time, Counter, RTC Comparator ‘R’ and Analog Comparator ‘G’. The Operation Fundamental is similar to LADDER Function Block’s.

Common Counter Function Block

(1) Counter Mode 1
Counting Input
Up/Down Counting
Reset
Counting Parameter
(2) Counter Mode 2
Counting Input
Up/Down Counting
→ →
→ →
→ →
Reset
Counting Parameter
Note:The “>”means the current value appeared will be greater than present value.
(3) Counter Mode 3
Counting Input
Up/Down Counting
Reset
Counting Parameter
Note:The”PD”means the current value will be retain until the power recover
→ →
→ →
→ →
.
Page 86
Chapter 5 FBD Programming 84
(4) Counter Mode 4
Counting Input
Up/Down Counting
Reset
Counting Parameter
(5) Counter Mode 5
Counting Input
Up/Down Counting
Reset
Counting Parameter
Note:The “C”means that will keep the current value in 0 during the Reset pin be enable.
(6) Counter Mode 6
→ →
→ →
→ →
→ →
Counting Input
Up/Down Counting
Reset
Counting Parameter

High Speed Counter Function Block

(1) Counter Mode 7
High counting input
Enable Input
Reset
Counter Parameter
Note High speed input terminal I1,I2
(2) Counter Mode 8
→ →
→ →
→ →
→ →
High counting input
Enable Input
Reset
Counter Parameter
Note High speed input terminal I1,I2
→ →
Page 87

Timer Function Block

Timer mode 0 (Internal coil Mode)
(1)
Chapter 5 FBD Programming 85
Enable Input
(2) Timer mode 1 (ON-Delay A Mode)
Enable Input
Timing Parameter
(3) Timer mode 2 (ON-Delay B Mode)
Enable Input
Reset
Timing Parameter
(4) Timer mode 3 (OFF-Delay A Mode)
Enable Input
Reset
Timing Parameter
(5) Timer mode 4(OFF-Delay B Mode)
Enable Input
→ →
→ →
Reset
Timing Parameter
→ →
Page 88
(6) Timer mode 5(FLASH A Mode)
Chapter 5 FBD Programming 86
Enable Input
Timing Parameter
(7) Timer mode 6(FLASH B Mode)
Enable Input
Reset
Timing Parameter
(8) Timer mode 7(FLASH C Mode)
→ →
Enable Input
Timing Parameter

RTC Comparator Function Block

(1) RTC Mode 0(Internal Coil)
Enable Input
(2) RTC Mode 1(Daily)
Enable Input
RTC Parameter
Page 89
(3) RTC Mode 2 (Continuous)
Chapter 5 FBD Programming 87
Enable Input
RTC Parameter
(4) RTC Mode 3 (Year Month Day)
Enable Input
RTC Parameter
(5) RTC Mode 4(30-second adjustment)
Enable Input
RTC Parameter

Analog Comparator Function Block

(1) Analog Comparison Mode 0 (Internal coil)
Enable Input
(2) Analog Comparison Mode 1
Enable Input
Analog Input
→ →
Analog Input
Reference
→ →
Page 90
Chapter 5 FBD Programming 88
(3) Analog Comparison Mode 2
Enable Input
Analog Input
Analog Input
Reference
(4) Analog Comparison Mode 3
Enable Input
Analog Input
Analog Input
Reference
(5) Analog Comparison Mode 4
→ →
→ →
→ →
→ →
Enable Input
Analog Input
Reference
(6) Analog Comparison Mode 5
Enable Input
Analog Input
Reference
→ →
→ →
Page 91
Appendix Application Illustration 89

Appendix Application Illustration

1. Lighting Control for Stairc ase
1.1 Requirement for Staircase Lighting
y When someone goes up-stair or down-stair, the lighting system shall be energized to provide sufficient luminance. y After the walker passes the staircase, lighting system shall be turned off in five minutes automatically or manually.
1.2 Traditional Lighting Control
There are two traditional controls available:
y Apply pulse relay y Apply automatic timer to control the lighting system on the staircase
Components Applied Switches
Auto lighting system or pulse relay for staircase Applying the pulse relay as controller for staircase lighting system
y The lighting is on as long as any switch is turned on. y Press any switch again to turn off the lighting system.
Shortcoming: It is a frequent weak point for the person to forget turning off the light at most cases. Auto lighting control system for the staircase y The light is on whenever the switch is turned on. Lighting system shall be turned off in a few minutes automatically or manually Shortcoming: The user has no way to reset the turn-off time.
Page 92
1.3 Apply SG2 in Lighting System
Devices Applied
Q1 Lamp H1 I1(No terminal) Switch B1 I2(No terminal) Infrared sensor for climbing
Wiring Diagram for Lighting System
Appendix Application Illustration 90
Illustrated program using SG2 in lighting system
Ladder & FUNCTION
Page 93
Appendix Application Illustration 91
FBD
2 Auto Door Control
The auto doors are very popularly installed at the entrance of supermarkets, mansions, banks and hospitals.
2.1Requirement for Auto Door Control
y It automatically opens whenever a person is approaching. y The door remains open for a certain period and closes if no visitor is present.
Page 94
2.2 Traditional solution
Appendix Application Illustration 92
Whenever B1 or B 2 senses the approach of a visitor, the door is actuated to open. After an elapse of time, B1 or B2 senses no presence of a visitor; MC 4 will close the door.
2.3 Apply SG2 in Door Control System
Applying SG2 in door control system can simplify the circuit. All that one need to do is connect the action sensor, limit switch and contactor with SG2.
Devices Applied
MC1 main door open contactor MC2 main door close contactor S1(NC contact) closing limit switch S2(NC contact) opening limit switch B1(NO contact) outdoor infrared sensor B2(NO contact) indoor infrared sensor
Wiring Diagram and Program with SG2 applied in door control system.
Page 95
Appendix Application Illustration 93
Ladder & FUNCTION
Page 96
FBD Operation Flow
Appendix Application Illustration 94
3. Ventilation Control
3.1 Ventilation System Requirement
The main function of the ventilation system is to blow in the fresh air and blow out the waste air as shown in the below drawing
y The room is provided with exhausted gas blower and fresh air blower y The flow sensor control the blowing in and out operation y Over pressure is permitted at no time.
Page 97
Appendix Application Illustration 95
y The fresh blower will run only if the flow monitor senses that the exhausted gas blower works properly. y If any irregularity takes place on air in blower and air out blower, the warning lamp will light.
The control circuit for the traditional ventilation system is shown below:
The ventilation system is wholly controlled by the airflow monitor. If there is no flow air in the room after a designated duration of time, the system will activate the warning system so the user shall shut off the system.
Devices Applied
MC1 main contactor MC2 main contactor S0(NC contact) stop switch S1(NO contact) start switch S2(NO contact) air flow monitor S3(NO contact) air flow monitor H1operation indicator H2 alarm light
Wiring Diagram and Program with SG2 applied in Ventilation System.
Page 98
Appendix Application Illustration 96
Ladder & FUNCTION
Page 99
FBD Operation Flow
Appendix Application Illustration 97
4. Plant Gate Control
4.1 Requirements for Plant Gate Control
The main purpose of the plant gate is to control the access of truck, which is manually operated by the gate guard.
y The door guard controls and oversees the opening, closing of the plant door ga te. y The stop switch can be activated at any time regardless of the gate in fully open or close condition. y The alarm light will be activated for 5 seconds in advance before the gate operation. y The damper is provided on the gate. Gate closing operation, whenever the damper is contacted by the gate,
stops.
Page 100
4.2 Traditional Control Circuit for Gate System
Appendix Application Illustration 98
Devices Applied
MC1 Main Electromagnetic Contactor MC2 Main Electromagnetic Contactor S0(NC contact) stop switch S1(NO contact) open switch S2(NO contact) close switch S3(NC contact) open safe damper S4(NC contact) close safe damper
Loading...