TECO SG2 User Manual

Page 1
SG2 Smart PLC
USER Manual
SG2 Programmable Logic Smar t Relay
4KA72X023 Version: 03 2009.07.03 0086-0510-8522-7555
Apply to: SG2 firmware version 3.0,
www.taian-technology.com
PC client program software version 3.0
Page 2
4KA72X023 I
Contents
Contents
...............................................................................................................................I
Summary of changes .......................................................................................................
Chapter 1: Getting S
tarted ................................................................................................. 1
Examination before Installation.............................................................................................................................. 2
Environmental Precautions .....................................................................................................................................
2
SG2 Model Identification........................................................................................................................................
2
Quick Start Setup...............................................................................................................4
Install SG2 Client Software.................................................................................................................................. 4
Connect Power to SG2 smart relay .....................................................................................................................
4
Connect Programming Cable.................................................................................................................................. 5
Establish Comm
unication ....................................................................................................................................... 5
Write simple program .............................................................................................................................................
6
Chapter 2: Installation ......................................................................................................10
General Specifications ...........................................................................................................................................10
Product Specifications............................................................................................................................................13
Mounting................................................................................................................................................................14
Wiring ....................................................................................................................................................................16
Indicator Light .......................................................................................................................................................18
Chapter 3: Program Tools................................................................................................ 19
PC Programming Software “SG2 Client”............................................................................................................. 19
Installing the Software ..................................................................................................................................
19
Connecting the Software................................................................................................................................20
Start Screen ....................................................................................................................................................20
Ladder Logic Programm
ing Environment .....................................................................................................21
Menus, Icons and Status Displays..................................................................................................................22
Programming..................................................................................................................................................23
Simulation Mode............................................................................................................................................24
Establish Comm
unication ..............................................................................................................................24
Writing Program to smart relay......................................................................................................................25
Operation menu..............................................................................................................................................25
Online Monitoring/Editing.............................................................................................................................26
HMI/TEXT ....................................................................................................................................................27
Program Documentation ................................................................................................................................30
AQ Set…........................................................................................................................................................31
Memory Cartridge (sold separately) ......................................................................................................................33
LCD Display and Keypad ......................................................................................................................................34
Keypad ...........................................................................................................................................................34
Original Screen ..............................................................................................................................................34
LCD Display Main Menu...........................................................................................
....................................36
Page 3
4KA72X023 II
Chapter 4: Relay Ladder Logic Programming .................................................................45
Common Memory Types........................................................................................................................................45
Specialty Memory T
ypes........................................................................................................................................48
Output Instructions................................................................................................................................................
49
Analog memory type..............................................................................................................................................50
Timer Instruction....................................................................................................................................................51
Counter Instructions
.............................................................................................................................................. 59
Real Time Clock (RTC) Instructions ....................................................................................................................
69
Comparator Instructions.........................................................................................................................................76
HMI Display Instructions
...................................................................................................................................... 79
PWM Output Instruction (DC Transistor Output
Models Only)............................................................................82
Data Link/Remote I/O Instruction (SG2-20Vxxx m
odel only)..............................................................................85
SHIFT (shift output)
.............................................................................................................................................. 88
AQ (Analog Output) .............................................................................................................................................
89
AS (Add-Subtract)
.................................................................................................................................................90
MD (MUL-DIV) ....................................................................................................................................................91
PID (Proportion- Integral- Differential).................................................................................................................92
MX (Multiplexer)...................................................................................................................................................93
AR (Analog-Ramp)................................................................................................................................................94
DR (Data register)..................................................................................................................................................96
MU (MODBUS) (only V
type model) .................................................................................................................. 98
Chapter 5: Function Block Diagram Programming .......................................................101
Coil Block Instruction..........................................................................................................................................101
HMI..............................................................................................................................................................102
PWM function block (only transis
tor output version)..................................................................................102
Data Link function block .............................................................................................................................103
SHIFT function block ..................................................................................................................................103
Logic Block Instructions......................................................................................................................................104
AND Logic Diagram....................................................................................................................................104
AND (EDGE) Logic Diagram
.....................................................................................................................104
NAND Logic Diagram.................................................................................................................................105
NAND (EDGE) Logic Diagra
m...................................................................................................................105
OR Logic Dia
gram.......................................................................................................................................105
NOR Logic Diagram....................................................................................................................................106
XOR Logic Diagram....................................................................................................................................106
SR Logic Dia
gram .......................................................................................................................................106
NOT Logic Diagram ....................................................................................................................................106
Pulse Logic Diagram....................................................................................................................................107
BOOLEAN Logic Diagram .........................................................................................................................107
Function Block.....................................................................................................................................................108
Timer Function Block ..................................................................................................................................109
Common Counter function block.................................................................................................................111
High Speed Counter Function Block ...........................................................................................................112
RTC Comparator Function Block ................................................................................................................113
Analog Comparator Function Block ............................................................................................................114
AS (ADD-SUB) func
tion block ...................................................................................................................115
Page 4
4KA72X023 III
MD (MUL-DIV) function block ..................................................................................................................115
PID (Proportion- Integral- Differential) function block...............................................................................116
MX (Multiplexer) function block
.................................................................................................................116
AR (Analog-Ramp) function block..............................................................................................................116
DR (Data-Register) function block
..............................................................................................................116
MU (MODBUS) function block ..................................................................................................................117
Chapter 6: Hardware Specification ................................................................................118
Normal Specification ...........................................................................................................................................118
Product Specifications..........................................................................................................................................119
Power Specifications............................................................................................................................................120
Normal model machine Specifications ........................................................................................................120
12V DC model Specifications......................................................................................................................121
24V AC model Specifications......................................................................................................................121
Power circuitry diagram...............................................................................................................................122
Input Specific
ations..............................................................................................................................................123
100~240V AC model ...................................................................................................................................123
24V AC model .............................................................................................................................................123
24V DC, 12I/O model..................................................................................................................................124
24V DC, 20I/O model..................................................................................................................................125
Output Specifications...........................................................................................................................................126
Output Port wiring notice.....................................................................................................................................126
Light Load....................................................................................................................................................126
Inductance Load...........................................................................................................................................127
Life of relay..................................................................................................................................................127
Size diagram of SG2 ............................................................................................................................................128
Chapter 7: 20 Pointe V type High-powered Models Instruction....................................129
Function Summarization......................................................................................................................................129
Detail Instruction .................................................................................................................................................129
Remote IO function
......................................................................................................................................131
IO Link Function..........................................................................................................................................132
Modbus RTU master ....................................................................................................................................133
Slaver via Modbus RTU protocol ................................................................................................................135
SG2 Modbus protocol ..........................................................................................................................................136
Chapter 8: Expansion Module........................................................................................137
Summarize ...........................................................................................................................................................137
Digital IO module ................................................................................................................................................139
Analog module.....................................................................................................................................................145
Communication module.......................................................................................................................................148
ModBus module...........................................................................................................................................148
DeviceNet COMM. Module.........................................................................................................................151
ProfiBus .......................................................................................................................................................154
Appendix: Keypad Programming...................................................................................157
Appendix A: Keypad programming in Ladder mode...........................................................................................157
Appendix B: Keypad programming in Ladder FUNCTION BLOCK.................................................................161
Page 5
4KA72X023 IV
Summary of changes
This user manual is modified by firmware V3.0 and SG2 Client programming software V3.0. SG2 V3.0 adds some
new functions with firmware version V3.0 to strong SG2 function. The upgrade content is shown as the 2 tables
below simply. More information about idiographic function to see function instruction.
Edit and Display
SG2 V3.0 SG2 V2.x
Ladder 300 lines 200 lines
FBD 260blocks 99blocks
LCD 4 lines * 16 characters 4 lines * 12 characters
Contact and function block
input output SG2 V3.0 SG2 V2.x
Auxiliary relay M M M 63(M01~M3F) 15(M1~MF)
Auxiliary relay N N N 63(N01~N3F) Ladder: NO
FBD: 15(N1~NF)
temperature input AT 4(AT01~AT04) NO
analog output AQ 4(AQ01~AQ04) NO
PWM P 2(P01~P02, P01 adds PLSY mode) 1(P1: PWM)
HMI 31(H01~H1F) 15(H1~HF)
Timer T T Ladder: 31(T01~T1F)
FBD: 250(T01~TFA)
15(T1~TF)
Counter C C Ladder: 31(C01~C1F)
FBD: 250(C01~CFA)
15(C1~CF)
RTC R R Ladder: 31(R01~R1F)
FBD: 250(R01~RFA)
15(R1~RF)
Analog Comparator G G Ladder: 31(G01~G1F)
FBD: 250(G01~GFA)
15(G1~GF)
AS(Add-Sub) Ladder: 31(AS01~AS1F)
FBD: 250(AS01~ASFA)
NO
MD(Mul-Div) Ladder: 31(MD01~MD1F)
FBD: 250(MD01~MDFA)
NO
PID Ladder: 15(PI01~PI0F)
FBD: 30(PI01~PI1E)
NO
MX(Multiplexer) Ladder: 15(MX01~MX0F)
FBD: 250(MX01~MXFA)
NO
AR(Analog Ramp) Ladder: 15(AR01~AR0F)
FBD: 30(AR01~AR1E)
NO
DR(Data Register) 240(DR01~DRF0) NO
MU(MODBUS)
NO NO
Ladder: 15(MU01~MU0F) FBD: 250(MU01~MUFA)
NO
Logic function: BOOLEAN NO Block
B B
260(B001~B260)The capability o
f
99(B01~B99)The capability of each
block is fixed
each block is alterable, and the total capability of block is 6000bytes
PM05(3rd) PM05(3rd) can be used with all
version of SG2
PM05 can not be used with SG2 V3.x
Page 6
Chapter 1: Getting Started 1
Chapter 1: Getting Started
The SG2 tiny smart Relay is an electronic device. For safety reasons, please carefully read and 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.
WARNING: Personal injury may result from improper operation.
CAUTION: The SG2 smart relay may be damaged by improper operation.
Precaution for Installation
Compliance with the installation instructions and the user manual is absolutely necessary. Failure to comply
could lead to improper operation, equipment damage or in extreme cases even death, serious bodily injury or
considerable damage to property.
When installing the open-board models, insure that no wiring or foreign materials can fall into the exposed
circuits and components. Damage to equipment, fire, or considerable damage to property could result.
Always switch off power before you wire, connect, install, or remove any module.
The wiring for the SG2 smart relay is open and exposed. For the open-board models, all electrical components
are exposed. For this reason, it is recommended the SG2 smart relay be installed in an enclosure or cabinet to prevent
accidental contact or exposure to the electrical circuits and components.
Never install the product in an environment beyond the limits specified in this user manual such as high
temperature, humidity, dust, corrosive gas, vibration, etc.
Precaution for Wiring
Improper wiring and installation could lead to death, serious bodily injury or considerable damage to property.
The SG2 smart relay should only be installed and wired by properly experienced and certified personnel.
Make sure the wiring of the SG2 smart relay meets all applicable regulations and codes including local and
national standards and codes.
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.
Precaution for Operation
To insure safety with the application of the SG2 smart relay, complete functional and safety testing must be
conducted. Only run the SG2 after all testing and confirming safe and proper operation is complete. Any potential
faults in the application should be included in the testing. Failure to do so could lead to improper operation,
equipment damage or in extreme cases even Death, serious bodily injury or considerable damage to property.
When the power is on, never contact the terminals, exposed conductors or electrical components. Failure to
comply could lead to improper operation, equipment damage or in extreme cases even death, serious bodily injury or
considerable damage to property.
It is strongly recommended to add safety protection such as an emergency stop and external interlock circuit in
Page 7
Chapter 1: Getting Started 2
case the SG2 smart relay operation must be shut down immediately.
Examination before Installation
Every SG2 smart relay has been fully tested and examined before shipment. Please carry out the 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 ordered.
• Check to see whether any damage occurred to the SG2 during shipment. Do not connect the SG2 smart relay to the
power supply if there is any sign of damage.
Contact
if you find any abnormal conditions as mentioned above.
Environmental Precautions
The installation site of the SG2 smart relay is 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:
• Mount the unit vertically
• Environment temperature: -4°F - 131°F (-20°C - 55°C)
• Avoid placing SG2 close to any heating equipment
• Avoid dripping water, condensation, or humid environment
• Avoid direct sunlight
• Avoid oil, grease, and gas
• Avoid contact with corrosive gases and liquids
• Prevent foreign dust, flecks, or metal scraps from contacting the SG2 smart relay
• Avoid electric-magnetic interference (soldering or power machinery)
• Avoid excessive vibration; if vibration cannot be avoided, an anti-rattle mounting device should be installed to
reduce vibration.
Disclaim of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software described.
Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this
publication is reviewed regularly and any necessary corrections are included in subsequent editions.
SG2 Model Identification
Page 8
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.
Install SG2 Client Software
Install the SG2 Client Software from CD or from the free internet download at www.taian-technology.com
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 modules.
See “Chapter 2: Installation” for complete wiring and installation instructions.
Page 9
Quick Start Setup 5
Connect Programming Cable
Remove the plastic connector cover from the SG2 using a flathead screwdriver as shown in the figure below. Insert
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 RS232 serial port on the computer.
Establish Communication
a. Open the SG2 Client software and select “New Ladder Document” as shown below left.
b. Select “Operation/Link Com Port…” as shown below right.
Page 10
Quick Start Setup 6
c. Select the correct Com Port number where the programming cable is connected to the computer then press the
“L
ink” button.
d. The SG2 Client will then begin to detect the connected smart relay to complete its connection.
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 M01 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 11
Quick Start Setup 7
b. Use the “A” key on your keyboard (or the “A” icon on 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 Q01 from the dialog and
press OK as shown below. See Chapter 4: Ladder Programming instructions for complete instruction set definitions.
Page 12
Quick Start Setup 8
d. Test the simple program. From the Operation 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 13
Quick Start Setup 9
f. On the Input Status dialog, click on M01 to activate the contact M01 which will turn ON the Output Q01 as shown
below. The highlighted circuit will show active and the first Output (Q01) on the connected smart relay will be ON.
See Chapter 3: Programming Tools for more detailed software information.
Page 14
Chapter 2 Installation 10
Chapter 2: Installation
General Specifications
SG2 is a miniature smart 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 modules.
Power Supply
Input Power Voltage Range
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
Power Consumption
24VDC: 12-point :125mA
20-point: 185mA
12VDC: 12-point: 195mA
20-point: 265mA
100-240VAC: 100mA
24VAC: 290mA
Wire Size (all terminals) 26 to 14 AWG
Programming
Programming languages Ladder/Function Block Diagram
Program Memory 300 Lines or 260 Function Blocks
Programming storage media Flash
Execution Speed 10ms/cycle
LCD Display 4 lines x 16 characters
Timers
Maximum Number
Ladder: 31FBD
: 250
Timing ranges 0.01s–9999min
Counters
Maximum Number
Ladder: 31FBD
: 250
Highest count 999999
Resolution 1
RTC (Real Time Clock)
Maximum Number
Ladder: 31FBD
: 250
Resolution 1min
Time span available week, year, month, day, hour, min
Compare Instructions (Analog, Analog*gain + Offset, Timer, Counter, Temperature Input
(AT), Analog Output (AQ), AS, MD, PI, MX, AR and DR Values)
Page 15
Chapter 2 Installation 11
Analog compare
Maximum Number
Ladder: 31FBD
: 250
Compare versus other inputs
Analog, Timer, Counter, Temperature Input (AT),
An
alog Output (AQ), Analog*gain + Offset, AS, MD,
PI, MX, AR , DR , or Numeric values
Environmental
Enclosure Type IP20
Maximum Vibration 1G according to IEC60068-2-6
Operating Temperature Range -4° to 131°F (-20° to 55°C)
Storage Temperature Range -40° to 158°F (-40° to 70°C)
Maximum Humidity 90% (Relative, non-condensing)
Vibration 0.075mm amplitude, 1.0g acceleration
Weigh t
8-point:190g
10,12-point: 230g (C type: 160g)
20-point: 345g (C type: 250g)
Agency Approvals CUL , CE, UL
Discrete Inputs
Current consumption
3.2mA @24VDC
4mA @12VDC
1.3mA @100-240VAC
3.3mA @24VAC
Input Signal ”OFF” Threshold
24VDC: < 5VDC;
12VDC: < 2.5VDC
100-240VAC : < 40VAC
24VAC: <6VAC
Input Signal ”ON” Threshold
24VDC: > 15VDC;
12VDC: > 7.5VDC
100-240VAC : > 79VAC
24VAC: >14VAC
Input On delay
24, 12VDC: 5ms
240VAC: 25ms;
120VAC: 50ms
24VAC: 5ms
Input Off Delay
24, 12VDC: 3ms
240VAC: 90/85ms 50/60Hz ;
120VAC: 50/45ms 50/60Hz
24VAC: 3ms
Transistor device compatibility NPN, 3-wire device only
High Speed Input frequency 1kHz
Standard Input frequency < 40 Hz
Required protection Inverse voltage protection required
Page 16
Chapter 2 Installation 12
Analog Inputs
Resolution
Basic unit: 12 bit
Expansion unit: 12bit
Voltage Range acceptable
Basic unit: Analog input: 0-10VDC voltage,
24VDC when used as discrete input;
Expansion unit: Analog input: 0-10VDC voltage or
0-20mA current
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
Basic unit: A01-A04
Expansion unit: A05-A08
Relay Outputs
Contact material Ag Alloy
Current rating 8A
HP rating 1/3HP@120V 1/2HP@250V
Maximum Load
Resistive: 8A /point
Inductive: 4A /point
Maximum operating time 15ms (normal condition)
Life expectancy (rated load) 100k operations
Minimum load 16.7mA
Transistor Outputs
PWM max. output frequency 1.0kHz (0.5ms on,0.5ms off)
Standard max. output frequency 100Hz
Voltage specification 10-28.8VDC
Current capacity 1A
Maximum Load
Resistive: 0.5A/point
Inductive: 0.3A/point
Minimum Load 0.2mA
Page 17
Chapter 2 Installation 13
Product Specifications
Part # Input Power Inputs Outputs
Display & Keyp
ad
RS-485 Communications Max I/O
SG2-12HR-D 6 DC, 2 Analog 4 Relay
, Z01-Z04
N
/A 36 + 4 *1
SG2-12HT-D 6 DC, 2 Analog 4 Trans.
, Z01-Z04
N
/A 36 + 4 *1
SG2-20HR-D 8 DC, 4 Analog 8 Relay
, Z01-Z04
N
/A 44 + 4 *1
SG2-20HT-D 8 DC, 4 Analog 8 Trans.
, Z01-Z04
N
/A 44 + 4 *1
SG2-20VR-D 8 DC, 4 Analog 8 Relay
, Z01-Z04
Built-in MODBUS 44 + 4 *1
SG2-20VT-D
24 VDC
8 DC, 4 Analog 8 Trans.
, Z01-Z04
Built-in MODBUS 44 + 4 *1
SG2-12HR-12D 6 DC, 2 Analog 4 Relay
, Z01-Z04
N
/A 36 + 4 *1
SG2-20HR-12D 8 DC, 4 Analog 8 Relay
, Z01-Z04
N
/A 44 + 4 *1
SG2-20VR-12D
12 VDC
8 DC, 4 Analog 8 Relay
, Z01-Z04
Built-in MODBUS 44 + 4 *1
SG2-10HR-A 6 AC 4 Relay
, Z01-Z04
N
/A 34+ 4 *1
SG2-20HR-A
100-240 VAC
12 AC 8 Relay
, Z01-Z04
N
/A 44 + 4 *1
SG2-12HR-24A 8 AC 4 Relay
, Z01-Z04
N
/A 36 + 4 *1
SG2-20HR-24A
24VDC
12 AC 8 Relay
, Z01-Z04
N
/A 44 + 4 *1
Expansion Modules
SG2-8ER-D 4 DC 4 Relay N/A
N
/A
N
/A
SG2-8ET-D
24VDC
4 DC 4 Trans. N/A
N
/A
N
/A
SG2-8ER-A 100-240VAC 4 AC 4 Relay N/A
N
/A
N
/A
SG2-8ER-24A 24VAC 4 AC 4 Relay N/A
N
/A
N
/A
SG2-4AI 4 Analog
N
/A
N
/A
N
/A
N
/A
SG2-4PT 4 Analog
N
/A
N
/A
N
/A
N
/A
SG2-2AO
N
/A 2 AnalogN/A
N
/A
N
/A
SG2-MBUS Communications Module, RS-485 ModBus RTU slaver
SG2-DNET Communications Module, DeviceNet Group2 slaver
SG2-PBUS Communications Module, Profibus-DP slaver
EN01
24 VDC
Communications Module, TCP/IP
OEM “Blind” Models, No Keypad, No Display
SG2-12KR-D 6 DC, 2 Analog 4 Relay X
N
/A 36
SG2-12KT-D 6 DC, 2 Analog 4 Trans. X N/A 36
SG2-20KR-D 8 DC, 4 Analog 8 Relay X
N
/A 44
SG2-20KT-D
24VDC
8 DC, 4 Analog 8 Trans. X
N
/A 44
SG2-12KR-12D 12VDC 6 DC, 2 Analog 4 Relay X
N
/A 36
SG2-10KR-A 6 AC 4 Relay X N/A 34
SG2-20KR-A
100-240VAC
12 AC 8 Relay X
N
/A 44
OEM “Baseboard” Models, No Keypad, No Display, No Expansion
SG2-12CR-D 6 DC, 2 Analog 4 Relay X
N
/A 12
SG2-12CT-D 6 DC, 2 Analog 4 Trans. X N/A 12
SG2-20CR-D 8 DC, 4 Analog 8 Relay X
N
/A 20
SG2-20CT-D
24VDC
8 DC, 4 Analog 8 Trans. X
N
/A 20
SG2-10CR-A 6 AC 4 Relay X N/A 10
SG2-20CR-A
100-240VAC
12 AC 8 Relay X
N
/A 20
Accessories
SG2-PL01 SG2 Programming Cable, SG2 Programming software
SG2-PM05(3rd) SG2 Memory cartridge
If module with keypad and display, Max IO can be added keypad input Z01-Z04. More
information about Product Specifications to see “chapter 6: Product Specifications”.
Page 18
Chapter 2 Installation 14
Mounting
DIN-rail Mounting
The SG2 smart relay should always be mounted vertically. Press the slots on the back of the SG2 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-BUTTON simultaneously)
SG2-8ER-A
Output 4 x Relay / 8A
Q1 Q2 Q3 Q4
DC 24V Input 8 x DC(A1,A2 0~10V)
SG2-12HR-D
+
-
I1 I2I4I3
I5
A1I6 A2
Input 4
×AC
L
N
Run
AC 100~240V
X4X1 X2 X3
Output 4 x Relay / 8A
Y1 Y2
Y3 Y4
Page 19
Chapter 2 Installation 15
It is recommended to apply a DIN-rail end clamp to hold the SG2 in place.
Q3Q1
Output 4 x Relay / 8A
SG2-12HR-D
Q2
SG2-8ER-A
Q4
DC 24V Input 8 x DC(A1,A2 0~10V)
+
-
I1 I3I2 I4
Input 4
×AC
A2I6I5 A1
Run
AC 100~240V
N
L
X2X1 X3 X4
Output 4 x Relay / 8A
Y1 Y2
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.
Q2
Output 4 x Relay / 8A
SG2-12HR-D
Q1
Y1 Y2
Q3 Q4 Y3 Y4
SG2-8ER-A
Output 4 x Relay / 8A
Run
DC 24V Input 8 x DC(A1,A2 0~10V)
+
-
I1 A2I3I2 I4 I6I5 A1
Input 4
×AC
AC 100~240V
LN
X1
X3X2 X4
Page 20
Chapter 2 Installation 16
Wiring
WARNING: The I/O signal cables should not be routed parallel to the power cable, or in the same cable trays
to avoid the signal interference.
To avoid a short circuit on the load side, it is recommended to connect a fuse between each output terminals
and loads.
Wire size and Terminal Torque
26...1626...1426...1426...1826...16
AWG
3.5 (0.14in)
lb-in
Nm
0.6
5.4
0.14...1.5
mm
2
0.14...1.50.14...2.50.14...0.75 0.14...2.5
C
C
Input 12/24V DC
DC V Input
+ I5I3 I4I2I1
-
A1I6 A2
DC V INPUT
I7I1+- I4 I5 I6I3I2 A4A2 A3A1I8
+
-
A2A1
A3
A1
+
-
A4A2
Sensor Connection
DC V Input
+ A1I6I4I3I2I1
-
I5 A2 A3A2 A1 A4
Page 21
Chapter 2 Installation 17
Input 100~240V /24V AC
AC ..V Input ......
I2I1 I4I3 I5 I6NL
AC ..V INPUT ......
I4I1 I3I2NL I7 IBI9I8 IA
IC
I5 I6
Output (Relay)
Output 4 x Relay / 8A
Q1 Q4Q3Q2
Output 8 x Relay / 8A
Q6Q2 Q3Q1 Q4 Q5 Q8Q7
Output (Transistor)
OUTPUT 8 x TR / 0.5A
Q1 Q2
Q4Q3Q1 Q2
OUTPUT 4 x TR / 0.5A
-
+
-
+
-
+
-
+
+
-
+
-
Q8Q7Q5 Q6Q3 Q4
+
--
++
-
++
--
+
-
Page 22
Chapter 2 Installation 18
Data Link OR Remote I/O Link
A2A3SA4A1 A2 A1
RS485
BA A3SA4
RS485
BA A3A1 A2 AB
RS485
A4
S
The power supply and the I/O supply should share the same power source. Only short circuit the first and 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.
More information about V type communication to see “Chapter 7 20 Pointe V type High-powered Models
Instruction”.
K type Indicator Light
There is an indicator light to indicate the status of SG2 (K type) smart, and the below table shows the relationship
between the light and the SG2 status.
State of light Description
Power up, SG2 is stopping
Flicker slow(2Hz), SG2 is running
Flicker quick(5Hz), SG2 is under failure status
ROM error illogicality in user program EEPROM error expansion model error
Page 23
Chapter 3 Program Tools 19
Chapter 3: Program Tools
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 archiving and reuse. Programs can also be uploaded directly from a SG2
and saved or edited.
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 loaded to the controller.
5. Real-time communication allows the user to monitor and force I/O on the SG2 smart relay operation during RUN
mode.
Installing the Software
Install the SG2 Client Software from CD or from the free internet download at
www.taian-technology.com
Page 24
Chapter 3 Program Tools 20
Connecting the Software
Remove the plastic connector cover from SG2 using a flathead screwdriver as shown in the figure below. Insert 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.
Start Screen
Run the SG2 Client software and the below Start screen will be displayed. From this screen, you can perform the
following functions
New Ladder Program
Select File -->New -->New LAD to enter the development environment for a new Ladder program.
New FBD Program
Select File -->New -->New FBD to enter the development environment for a new FBD (Function Block Diagram)
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.
Page 25
Chapter 3 Program Tools 21
Ladder Logic Programming Environment
The Ladder Logic Programming Environment includes all the functions for programming and testing the SG2 using
the Ladder Logic programming language. To begin a new program select File-->New, and select the desired model of
SG2, and the number of connected expansion units if applicable, as shown below.
Page 26
Chapter 3 Program Tools 22
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
controllers, configuration of special functions and viewing preference selections.
2. Main Toolbar – (From Left to Right)
Icons for create a new program, open a program, save a program and print a program.
Icons for Keypad, Ladder view, HMI/Text edit and Symbol (comments) edit.
Icons for Monitor, Simulator, Simulator Controller, Controller Mode changes (Run, Stop, and Quit), and Read/Write
programs from/to the SG2 smart relay.
3. Usage List – List for all memory types and addresses used with the current open program. Used addresses are
designated by a “*” symbol below each address.
4. Amount of free programming memory available.
5. Current Mode – operation mode of the controller, or simulator, from the connected PC.
6. Ladder Toolbar – Icons for selecting and entering all available Ladder Logic instructions.
7. Status Bar – Status of current open project and connect SG2 smart relay.
Page 27
Chapter 3 Program Tools 23
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 methods of entering programming instructions.
The “A” and “L” keys or icons are used to complete parallel and serial circuits. The right column is for output coils.
Page 28
Chapter 3 Program Tools 24
Simulation Mode
The SG2 Client software includes a built-in simulator to test and debug programs easily without the need for
downloading to a controller. To activate simulation mode, simply press the red RUN icon. The program below is
shown in simulation mode, identifying the significant available features.
Establish Communication
The following is the simple procedure for establishing communication between PC and the SG2 smart relay.
a. Select “Operation/Link Com Port…” as shown below.
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 its connection.
Page 29
Chapter 3 Program Tools 25
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, or press Write button to write program to connected smart relay as shown below.
Operation menu
The Operation menu, includes several system configuration functions for both online and offline 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 debugging a program.
Simulator Control – Self-motion simulator control
Run-Stop-Quit – Mode change selections for both runtime editing and simulation mode.
Read-Write – Reading and writing programs to and from a connected SG2 smart relay.
RTC Set – Online function for setup of the Real-time clock/calendar (see dialog below left)
Analog Set – setup analog input A01-A08 gain and offset (see dialog below right)
Password – Set a password for accessing the current program after upload to the smart relay
Language – Change SG2 smart relay menu 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.
Link Com Port – Select the port communication with SG2 smart relay.
Page 30
Chapter 3 Program Tools 26
Online Monitoring/Editing
The SG2 Client software allows for online monitoring of the currently running program during runtime. Additional
online functions include, I/O forcing, and Mode changes (Run/Stop/Quit).
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 smart relay while in Stop mode.
Page 31
Chapter 3 Program Tools 27
HMI/TEXT
This function block can display information on 16×4 LCD screen. Information displaying can be present value or
target value of Counter, Timer, RTC and Analog comparator etc. Under running mode, to modify the target value of
timer, counter and analog comparator via HMI is available. HMI can display the status of input terminal (I, Z, X) and
Auxiliary terminal M, N (only FBD).
HMI/TEXT setting:
Page 32
Chapter 3 Program Tools 28
Enter H01 coil Into HMI/TEXT edit frame Choice the “T” Choice the “E” Choice T01 current Choice T01 current (unit) Choice T01 present (unit), user can modify T01 preset value when H coil enable and display on LCD
Download to SG2, and I01 turn ON, or press “SEL” if the H coils is set to mode 1, then the SG2 LCD will display the
first H text as shown below.
, Press “↑” or “” to choice the nearest H coil
, Press “SEL”+“” or “”and “OK” update T 01 preset value (In this example, 050.0 can update, T01 preset value
depends on HMI/TEXT edit frame setting.)
HMI/TEXT Example:
Page 33
Chapter 3 Program Tools 29
Power ON and RUN (initial display) Press “↑” (Z01) and display H03 coil
① Press “SEL” to display cursor Press “↑”, ”, “”, “” to move cursor Press “SEL” again to choice modified position Press “”, “” to change number and press “”, “→” to move cursor Press “OK” to make sure the modify value
Press “” (Z02) to disable H03 coil, and the LCD display changes to initial
frame.
Press “” to reset Timer (T01、T02、T03) as program designed.
Page 34
Chapter 3 Program Tools 30
Program Documentation
The SG2 Client software includes the ability to document a program using Symbols and Line Comments. Symbols
are used to label each I/O address up to a length of 12 characters. Line Comments are used to document sections of a
program. Each Line Comment can have up to 4 lines with each line containing up to 50 characters in length. Below
are examples of entering Symbols and Line Comments.
Symbol…
The Symbol editing environment can be access through the menu using the Edit>>symbol… selection or using the
symbol icon on the main toolbar shown below.
The Symbol editing environment allows for documenting all the contact and coil memory types, and selecting display
modes as shown below.
Page 35
Chapter 3 Program Tools 31
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.
AQ Set…
The AQ editing environment can be access through the menu using the Edit>> AQ Set… selection shown below. The
range of AQ is 0~1000 if the output mode of AQ is voltage mode. And the range is 0~500 if the output mode is
current mode. The preset value of AQ can be set as either a constant or a code of other data. The output mode of AQ
and preset value are set as below. More information about output mode and displaying to see: Chapter 4: Relay
Ladder Logic Programming
Page 36
Chapter 3 Program Tools 32
Data Register Set…
The content of Data Register is either unsigned or sign, it can be set as shown below. Selecting Unsigned, the range
of DR is 0~65535; and selecting Signed, the range of DR is -32768~32767.
After the operating above, the Data Register editing environment can be access through the menu using the Edit>> Data Register Set… selection shown below. The preset value of DR can be set as either a constant or a code of other
data type.
DR is set as signed shown below.
Page 37
Chapter 3 Program Tools 33
Memory Cartridge (sold separately)
PM05 (3rd) is a special kind of PM05, it can be used in all version of SG2. There is an icon on SG2 V3
smart and side of PM05 (3rd).
About to use PM05 and PM05 (3rd) with SG2V2/3, see next figure:
PM05 PM05 (3rd)
SG2V2 SG2V3
PM05 (3rd)
SG2V3
SG2V2
SG2V3
The optional PM05 (3rd) memory cartridge is used to easily transfer programs from one smart relay to another. The
PM05 (3rd) memory cartridge plugs into the same connector as the programming cable (see procedure below).
1. Remove the plastic connector cover from SG2 using a flathead screwdriver as shown in the figure below.
2. Insert the PM05 (3rd) memory cartridge onto the connector as shown below.
3. From the display keypad on the face of the SG2 smart relay, select either WRITE or READ to transfer the
program to PM05 (3rd) or from the PM05 (3rd) memory cartridge to the smart relay.
4, K type and C type, electrify the product, the program in PM05 (3rd) will automatically download and executed.
5, Program in different types are not compatible, here are the regulations:
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 program ---- available in Transistor type
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
E-1: SG2V2 program ---- available SG2V3 type
E-2: SG2V3 program ---- unavailable SG2V2 type
Page 38
Chapter 3 Program Tools 34
LCD Display and Keypad
Keypad
Most SG2 CPU units include the built-in LCD Display and Keypad. The keypad and display are most often used for
changing timer/counter set points, controller mode changes (Run/Stop), uploading/downloading to the PM05 memory
cartridge, and updating the RTC (Real Time Clock/Calendar). Although, logic programming can be performed from
the keypad and display, it is highly recommended to only perform logic changes using the SG2 Client software.
Below is an overview of the basic keypad and display functions.
Select (SEL) – Used to select the available memory and instruction types for editing. Holding the Select button will
display all “H” HMI/Text messages on the LCD.
OK – Used to accept the selection displayed of an instruction or function. It is also used to select any of the Main
Menu options on the LCD.
Note: Press the “SEL” and “OK” simultaneously to insert a rung above the current active cursor position.
Escape – Used to exit a selected display screen and go to the previous screen. When in a ladder display screen, press
the ESC to display the main menu.
Delete – Used to delete an instruction or rung from the ladder program. The 4 navigation buttons (↑←↓→) are used to move the cursor throughout the functions of the SG2 display or active program. The 4 buttons also can be set programmable input coils Z01-Z04 (‘’= Z01, ‘’=Z02, ‘’=Z03, ‘’ =Z04);
Original Screen
LCD displays 4-line state
Original screen as power on
Page 39
Chapter 3 Program Tools 35
Press the button:
ESC Enter Main Menu screen
Under LADDER Mode, display the state of relays (I Z Q X Y M N T C R G A AT AQ) Original Screen
SEL+
Under FBD Mode, display the state of relays (I Z Q X Y M N A AT AQ) Original Screen
SEL H Function will be displayed whose mode is 1 as the button is pressed.
SEL+OK Enter RTC setting screen
Expansion display State
Expansion module setting: refer to Main Menu “SET”
Other Display State
Ladder edit mode: Coil I, Z, X, Q, Y, M, N, T, C, R, G, D, Analog input A01~A04, Expansion Analog input A05~A08,
temperature analog input AT01~AT04, analog output AQ01~AQ04;
FBD edit mode: Coil I, Z, X, Q, Y, M, N, Analog input A01~A04, Expansion Analog input A05~A08, temperature
analog input AT01~AT04, analog output AQ01~AQ04;
Page 40
Chapter 3 Program Tools 36
LCD Display Main Menu
(1) The Main Menu as SG2 under ‘STOP’ Mode.
Into ladder main function to press ESC after power on when the user program is ladder type or empty program.
Into FBD main function to press ESC after power on when the user program is FBD type or empty program.
Menu Description
> LADDER Ladder edit
FUN.BLOCK Ladder function block
(timer/counter/RTC …) edit
FBD FBD display
PARAMETER FBD block or LADDER function
block parameter display
RUN RUN or STOP
DATA REGISTER DR display
CLEAR PROG. Clear the user program and the
password
WRITE Save user program to PM05 (3rd)
READ Read user Program from PM05
SET System setting
RTC SET RTC set ting
ANALOG SET Analog setting
PASSWORD Password setting
LANGUAGE Select the language
INITIAL initially set Edit method
Page 41
Chapter 3 Program Tools 37
(2) The Main Menu as SG2 under ‘RUN’ Mode.
> LADDER
FUN.BLOCK
FBD
PARAMETER
STOP
DATA REGISTER
WRITE
RTC SET
PASSWORD
LANGUAGE
Press the Button
Move the Cursor to select Main Menu
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 is modified, SG2 will automatically backup it to FLASH.
Main Menu LADDER
Page 42
Chapter 3 Program Tools 38
Press the Button
Button Description
SEL
1. Ixx ⇒ ixx ⇒ ── ⇒ space ⇒ Ixx (only for digital and character position of 1, 3, 5 column.)
2. Qxx ⇒ space ⇒ Qxx (only for digital and character position of 8 column.).
3. Space ┬ (all available but the 2,4,6 column of the first line)
SEL, then /
1. I ⇔ X ⇔ Z ⇔Q ⇔ Y⇔ M ⇔ N ⇔ D ⇔ T ⇔ C ⇔ R ⇔ G ⇔ I (When the cursor located at 1,
3, 5 Column).
2. Q ⇔ Y ⇔ M ⇔ N ⇔ T ⇔ C ⇔ R ⇔ G ⇔H ⇔ L ⇔P ⇔ S ⇔ AS ⇔ MD ⇔ PI ⇔ MX ⇔ AR ⇔ DR MU Q (When the cursor located at 8 Column)
3. ( ¿À ⇔ P ⇔ ( (When the cursor located at 7 Column, and the 8 Column is set as Q, Y, M, N)
4. ( ⇔ P ⇔ ( (When the cursor located at 7 Column, and the 8 Column is set as T)
SEL , then ←/→
Confirm the input data and move the cursor
move the cursor
DEL Delete an instruction
ESC 1. Cancel the Instruction or action under Edition.
2. Back to Main Menu after query the program (save program).
OK 1. Confirm the data and automatically save, the cursor moves to next input position.
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)
SEL+DEL Delete a Line of Instruction.
SEL+ESC
Display the number of the Lines and operation state of SG2 (RUN/STOP)
SEL+/
Skip up/ down every 4-line program.
SEL+OK Insert a space line
Operation Sample: more detailed to see appendix A.
FUNCTION BLOCK program input
Into FUNCTION BLOCK, cursor flicker on “T”, press “SEL” key, Ladder function block display in sequence: T→C→R→G→H→L→P→S→AS→MD→PI→MX→AR→MU→T…
Operation Sample: more detailed to see Appendix B.
Page 43
Chapter 3 Program Tools 39
PARAMETER
Under Ladder mode, press “SEL” key, function block display in sequence: TCRGASMDPIMXARMUT…
Under FBD mode, Press “SEL” key, Block displays in sequence.
RUN or STOP
(1) RUN Mode (2) STOP Mode
Move the cursor
OK Execute the instruction, then back to main menu
ESC Back to main menu
DATA REGISTER
Displaying preset value when the smart is STOP status and displaying current value when the smart is RUN status.
Move the cursor
OK Ensure the edit
SEL Enter edit (edit DR display number or DR preset value)
‘SEL’ then ‘SEL’ Edit DR preset value type
‘SEL’ then ‘↑ ↓’ 1. Edit DR display number (only first line)
2. Edit DR preset value
ESC 1. Cancel edit.
2. Back to main menu (save DR preset data)
SEL+/ Tip-up/down page
Page 44
Chapter 3 Program Tools 40
Other Menu Items
(1) CLEAR PROGRAM (Clear RAM, EEPROM and Password at the same time)
(2) WRITE: save the program (RAM) to PM05 (3rd) program spare cartridge
(3) READ: read the program from the PM05 or PM05 (3rd) program spare cartridge to SG2 (RAM)
(1) (3) Now Press:
Move the cursor
OK Execute the instruction
ESC Back to main menu
(4) SET (system setting)
content default
ID SET 01
Æ
ID setting (00~99)
REMOTE I/O
N
Æ
Remote I/O Mode
(N: none M: Master S: Slave)
BACK LIGHT
×
Æ
Back light mode (: always light ×: light for 10s after pressed.)
M KEEP
Æ
M: non-Volatile (:Volatile ×: Non- Volatile)
I/O NUMBER 0
Æ
Setting expansion I/O module number (0~3)
I/O ALARM
Æ
Siren setting when is not available to Expansion I/O Points (:Yes ×:No)
C KEEP
×
Æ
in stop/run switching, Counter Present Value Keeping (:Yes ×:No)
Z SET
×
Æ
Enable or disable keypad input Z01-Z04 (:enable ×:disable)
V COMM SET 03
Æ
Setting the form and baud rate of RS-485
DATA REG.
U
Æ
Setting the Data Register type
(U: 16bit-unsiged S: 16bit-sign)
M KEEP function is available for keeping M status and current value of T0E/T0F when power is re-supplied
after loss.
Page 45
Chapter 3 Program Tools 41
Now Press:
Move the cursor
SEL Begin to edit. ‘SEL’ then ‘←/→’
Move the cursor for ‘ID SET’ item and ‘V COMM SET’ item
‘SEL’ then ‘↑ /↓’
1. ID SET = 00~99 ; I/O NUMBER = 0~3
2. REMOTE I/O = N⇔M⇔S⇔N
3. BACK LIGHT ; C KEEP ; Z SET = ×
4. M KEEP; I/O ALARM = ⇔×
5. V COMM SET = (0~3)(0~5)
6. DATA REG. = U⇔S
OK Confirm the Edition Data
ESC 1. Cancel the setting when pressed ‘SEL’
2. Back to Main Menu(save edit data)
When DATALINK is selected, ID setting range is 0~7, which should be continuous.
ID=0 default as Master, ID=1~7 default as Slave.
When REMOTE I/O is selected, the distribution of the remote I/O is as follows:
Master Slave
Remote Input X01~X0C
I01~I0C
Remote Output Y01~Y08
Q01~Q08
The high bit of V COMM SET detects the form of RS-485, and the low bit detects the baud rate of RS-485.
More detailed to see chapter 4: Relay Logic Programming: Data Link/Remote IO Instruction
(5) RTC SET
Now Press
Enter RTC setting or Summer/Winter setting
SEL Begin to input parameters ‘SEL’ then ‘←/→’
Move the Cursor
‘SEL’ then ‘↑/↓’
1. year=00~99, month=01~12, day=01~31
2. week: MO⇔TU⇔WE⇔TH⇔FR⇔SA⇔SU⇔MO
3. hour = 00~23 , minute = 00~59
‘SEL’ then ‘SEL’ Summer/Winter setting: NO – EUROPE – USA – OTHER – NO …
OK Save the Input Data
ESC
1. Cancel the Input Data when press ‘SEL’.
2. Back to Main Menu.
RTC precision
Temperature Error
+25 ±3s/day
-20/+50℃ ±6s/day
Page 46
Chapter 3 Program Tools 42
RTC Summer/Winter setting
There are 2 fixed Summer/Winter, EUROPE and USA, 1 edit Summer/Winter in SG2.
Edit rule: The last Sunday is defined as 0; Hour range: 1~22; Summer hour and Winter hour are the same.
Summer/Winter can be set through the two methods as shown below.
1) PC Client
2) Keypad
Then pressing “” selects edit location, pressing “↑”, “↓” edit content.
Example:
Year 2009, SUM M: 05 D: 01 2009-5-3; M: 10 D: 00 2009-10-25.
Page 47
Chapter 3 Program Tools 43
(6) ANALOG SET
A 1=GAIN : 010
Æ
GAIN (0~999), default 10
OFFSET : +00
Æ
OFFSET (-50~+50), default 0
A 2=GAIN : 010
OFFSET : +00
A3~A8…Gain + Offset
Now Press
1. Move downward the Cursor
2. Switch the setting screen from A01/A02Æ A03/A04Æ A50/A06 Æ A07/A08
SEL Begin to input parameters ‘SEL’ then ‘←/ →’
Move the Cursor
‘SEL’ then ‘↑/ ↓’
1. GAIN =000~999
2. OFFSET=-50~+50
OK Save the Input Data
ESC
1. Cancel the Input Data when press ‘SEL’.
2. Back to Main Menu (save edit data).
V01 = A01*A01_GAIN + A01_OFFSET …… V08 = A08*A08_GAIN + A08_OFFSET
(7) PASSWORD (setting password)
Now Press
SEL
1. Begin to input numeral
2. When the password is ON, it will not display 0000, but ****.
‘SEL’ then ‘←/→’
Move the cursor
‘SEL’ then ‘↑/ ↓’
Data changed 0~F
OK Save the input data, not 0000 or FFFF, as the PASSWORD is ON.
ESC
1. Cancel the Input Data when press ‘SEL’.
2. Back to Main Menu.
A Class: Password number is set to 0001~9FFF.
B Class: Password number is set to A000~FFFE.
Password number = 0000 or FFFF is disabled Password function, Default setting: 0000.
Page 48
Chapter 3 Program Tools 44
A/B Class password Description (cannot use under password protected )
Menu A Class B Class LADDER
FUN.BLOCK FBD PARAMETER RUN/STOP
DATA REGISTER CLEAR PROG. WRITE READ SET
RTC SET ANALOG SET LANGUAGE INITIAL
(8) LANGUAGE (Selection menu language)
Æ
English
Æ
French
Æ
Spanish
Æ
Italian
Æ
German
Æ
Portuguese
Æ
Simplified Chinese
Now Press
Vertically move the Cursor
OK Select the language the cursor located
ESC Back to Main Menu
(9) INITIAL (select Ladder Logic and Function Block Diagram (FBD))
Now Press:
Vertically move the Cursor
OK Select the mode the cursor located
ESC Back to Main Menu
The origin program will be cleared as the change of edition method.
Page 49
Chapter 4 Relay Ladder Logic Programming 45
Chapter 4: Relay Ladder Logic Programming
Common Memory Types
General
output
SET
output
RESET
output
PULSE
output
N.O.
contact
N.C.
contact
Number
Symbol [
¿ À
P
(N.O./N.C.)
Input contact
I i 12(I01-I0C/i01-i0C)
Keypad input
Z z 4(Z01-Z04/z01-z04)
Output coil Q Q Q Q Q q 8(Q01-Q08/q01-q08)
Auxiliary relay
M M M M M m 63(M01-M3F/m01-m3F)
Auxiliary relay
N N N N N n 63 (N01-N3F/n01-n3F)
Counter C C c 31(C01-C1F/c01-c1F)
Timer T T T t 31(T01-T1F/t01-t1F)
Inputs (I memory Type)
The SG2 digital input points are designated I memory types. The number of digital I input points is 6, 8 or 12
depending on each SG2 model.
Keypad inputs (Z Memory type)
The SG2 keypad input points are designated Z memory types. The number of digital Z input points is 4 depending on
SG2 H type model and V type model.
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 Q01 will be turned on when input point I01 is activated.
Page 50
Chapter 4 Relay Ladder Logic Programming 46
Auxiliary Relays (M memory type)
Auxiliary relays ate 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, relays, lamps, etc. The number
of Auxiliary Relays M is 63. 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 M01 is being used
as an output coil and will energize when input I02 turns on. In the second rung auxiliary relay M01 is being used as
an input and when energized, will turn on outputs Q02 and Q03.
The state of auxiliary relays “M01~M3F” will be kept when the smart powers down if “M Keep” is active. “M
Keep” can be set by the two ways below.
Special Auxiliary Relays: M31~M3F
Code Signification Description
M31 User program upstart flag Outputting ON during the first scanning period; and used as
normal auxiliary relay at other scan period.
M32 1s blinking output 0.5s ON, 0.5s OFF
M33 Summer/Winter output Summer time turn ON, winter time turn OFF, used as normal
auxiliary relay.
M34 AT01 flag Output ON when the first channel of SG2-4PT is error
M35 AT02 flag Output ON when the second channel of SG2-4PT is error
M36 AT03 flag Output ON when the third channel of SG2-4PT is error
M37 AT04 flag Output ON when the fourth channel of SG2-4PT is error
M38~M3C reserved
M3D Received
M3E Error flag
M3F Time out
MODBUS function using
Page 51
Chapter 4 Relay Ladder Logic Programming 47
Auxiliary Relays (N memory type)
Auxiliary relays N is the same to auxiliary relays M, but it can’t be kept when the smart powers down.
In the first rung of this example, auxiliary relay N01 is being used as an output coil and will energize when input I03
turns on. In the second rung auxiliary relay N01 is being used as an input and when energized, will turn on outputs
Q04 and Q05.
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 I03 turns on, timer T01 will start. When the timer reaches the preset of 5 seconds timer status
contact T01 turns on. When T01 turns on, output Q04 will turn on. Turning off I03 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 or greater than the preset value of a selected counter. In
this example, each time the input contact I04 transitions from off to on, the counter (C01) increments by one. When
the counter reaches the preset of 2 counts, the counter status contact C01 turns on. When C01 turns on, output Q05
will turn on. When M02 turns on counter C01 will reset. If M09 is turned on, the counter will change from a count-up
to a count-down counter.
Page 52
Chapter 4 Relay Ladder Logic Programming 48
Specialty Memory Types
General
output
SET
output
RESET
output
PULSE
output
N.O.
contact
N.C.
contact
Number
Symbol [
¿ À
P
(N.O./N.C.)
Lo Hi Used in function block
Expansion input coil X x 12(X01-X0C/x01-x0C)
Expansion output coil Y Y Y Y Y y 12(Y01-Y0C/y01-y0C)
Differential (one shot) D d
RTC R R r 31(R01-R1F/r01-r1F)
Analog comparator G G g 31(G01-G1F/g01-g1F)
HMI H 31(H01-H1F)
PWM P 2(P01-P02)
DATA LINK L 8(L01-L08)
SHIFT S 1(S01)
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 53
Chapter 4 Relay Ladder Logic Programming 49
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 if
reset using another output instruction. It is not necessary for the preceding input contact controlling the Reset output
instruction to remain ON.
Page 54
Chapter 4 Relay Ladder Logic Programming 50
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 transition 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 I03 is pressed and released Motor
Q04 will turn on and remain on. When Pushbutton I03 is pressed again, Motor Q04 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 I03.
Analog memory type
Analog input Analog output number
Analog input A 8 (A01~A08)
Analog input parameter V 8 (V01~V08)
Temperature input AT 4 (AT01~AT04)
Analog output AQ 4 (AQ01~AQ04)
Add-Subtract control AS AS 31 (AS01~AS1F)
Multiply-Divide control MD MD 31 (MD01~MD1F)
PID contrl PID PID 15 (PI01~PI0F)
Data Multiplexer control MX MX 15 (MX01~MX0F)
Analog Ramp control AR AR 15 (AR01~AR0F)
Data Register DR DR 240 (DR01~DRF0)
MODBUS 15 (MU01~MU0F)
Analog value (A01~A08, V01~V08, AT01~AT04, AQ01~AQ04) and current value of functions (T01~T1F, C01~C1F,
AS01~AS1F, MD01~MD1F, PI01~PI0F, MX01~MX0F, AR01~AR0F, and DR01~DRF0) can be used as other
function’s preset value. And the parameter preset value is its limit value when the current value of those functions is
bigger or less than parameter’s limit value.
Page 55
Chapter 4 Relay Ladder Logic Programming 51
Timer Instruction
The SG2 includes a total of 31 separate Timers that can be used throughout a
program. T0E and T0F keep their current value after a loss of power to the smart
relay if “M Keep” is active, but the other Timers’ current value is non-retentive. Each
Timer has a choice of 8 operation modes, 1 for a pulse Timer and 7 for general
purpose 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 Timers.
Symbol Description Compatible Instructions Range
Timer Mode (0-7) Input I01-I0C/i01-i0C
Timer Unit 1: 0.01s, range: 0.00 - 99.99 sec Keypad input Z01-Z04/z01-z04
2: 0.1s, range: 0.0 - 999.9 sec Output Q01-Q08/q01-q08
3: 1s, range: 0 - 9999 sec Auxiliary coil M01-M3F/m01-m3F
4: 1min, range: 0 - 9999 min Auxiliary coil N01-N3F/n01-n3F
ON: the Timer reset to 0 Expansion input X01-X0C/x01-x0C
OFF: the Timer continues timing Expansion output Y01-Y0C/y01-y0C
Timer current value RTC R01-R1F/r01-r1F
Timer preset value Counter C01-C1F/c01-c1F
Timer code(T01~T1F total: 31 Timers) Timer T01-T1F/t01-t1F
Analog comparator G01-G1F/g01-g1F
Normal close contact Hi
The preset value of Timer could be a constant or other function current value. The current value of T0E and T0F will be kept when SG2 on a loss of power if the “M-Keep” is active.
Timer Mode 0 (Internal Coil)
Mode 0 Timer (Internal Coil) used as internal auxiliary coils. No timer preset value. The status of T coil becomes
with enable coil as shown below.
I01 is enable coil.
Page 56
Chapter 4 Relay Ladder Logic Programming 52
Timer Mode 1 (ON-Delay)
Mode 1 Timer (ON-Delay) will time up to a fixed value and stop timing when the current time is equal to the preset
value. Additionally, the Timer current value will reset to zero when Timer is disabled. In the example below, the timer
will stop timing when it reaches the preset value of 5 seconds. Timer status bit T01 will be ON when the current value
is 5.
T0E and T0F keep their current value after a loss of power to the smart relay if “M Keep” is active, but the others’
reset to 0.
Page 57
Chapter 4 Relay Ladder Logic Programming 53
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 Timer current value will be kept when Timer is disabled. In the
example below, the Timer will stop timing when it reaches its preset value of 5 seconds. Timer status bit T01 will be
ON when the current value is 5. The timer reset input is input I01. The timer current value will reset to 0, and Timer
status bit T01 will turn off when I01 is ON.
T0E and T0F keep their current value after a loss of power to the smart relay if “M Keep” is active, but the others’
reset to 0.
Page 58
Chapter 4 Relay Ladder Logic Programming 54
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 Timer current value will reset to zero when Timer is disabled. In
the example below, the timer reset input is Input I01.Timer status bit T01 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 T01 will turn OFF when the
current time value reaches its preset value of 10 seconds.
T0E and T0F keep their current value after a loss of power to the smart relay if “M Keep” is active, but the others’
reset to 0.
Page 59
Chapter 4 Relay Ladder Logic Programming 55
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 Timer current value will reset to zero when Timer is disabled. In
the example below, the timer reset input is Input I01. The timer status bit T01 will turn ON only after its rung
transitions from true to false. Timer status bit T01 will turn OFF when the current time value reaches its preset value
of 10 seconds.
T0E and T0F keep their current value after a loss of power to the smart relay if “M Keep” is active, but the others’
reset to 0.
Page 60
Chapter 4 Relay Ladder Logic Programming 56
Timer Mode 5 (FLASH without reset)
Mode 5 Timer is a Flash timer without reset that will time up to a fixed preset value and then change the state of its
status bit. Additionally, the Timer current value will reset to zero when Timer is disabled. In the example below, timer
status bit T01 will be ON immediately when its rung is true and begin its timing sequence. Timer status bit T01 will
turn OFF when the current time value reaches its preset of 10 seconds. This Flash sequence of the Timer status bit
T01 will continue as long as its rung remains true.
The current value of Timer can not be kept on a loss of power to smart.
Page 61
Chapter 4 Relay Ladder Logic Programming 57
Timer Mode 6 (FLASH with Reset)
Mode 6 Timer is a Flash timer with reset that will time up to a fixed preset value and then change the state of its
status bit. Additionally, the Timer current value will reset to zero when Timer is disabled. In the example below, the
timer reset input is Input I01. Timer status bit T01will be ON immediately when its rung is true and begin its timing
sequence. Timer status bit T01 will turn OFF when the current time value reaches its preset of 10 seconds. This Flash
sequence of the timer status bit T01 will continue as long as its rung remains true.
The current value of Timer can not be kept on a loss of power to smart.
Page 62
Chapter 4 Relay Ladder Logic Programming 58
Timer Mode 7 (FLASH Cascade without Reset)
Mode 7 Timer is a Flash Timer which using two Timers in a cascade configuration without reset. The second Timer
number follows the first Timer. 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 Timer current value will reset to zero when Timer is disabled. In the example below, timer
status T01 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 T02 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.
The two Timers used in Timer Mode 7 cannot be reused as Timers for other modes in the same program.
The current value of Timer can not be kept on a loss of power to smart.
Page 63
Chapter 4 Relay Ladder Logic Programming 59
Counter Instructions
The SG2 includes a total 31 separate counters that can be used throughout a
program. Each counter has a choice of 9 operation modes, 1 for pulse counter, 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.
Common Counter
Symbol description Compatible Instructions Range
Counting Mode (0-6) Input I01-I0C/i01-i0C
Use (I01~g1F) to set counting up or down Keypad input Z01-Z04/z01-z04
OFF: counting up (0, 1, 2, 3……) Output Q01-Q08/q01-q08
ON: counting down (……3, 2, 1, 0) Auxiliary coil M01-M3F/m01-m3F
Use (I01~g1F) to reset the counting value Auxiliary coil N01-N3F/n01-n3F
ON: the counter value reset to 0 Expansion input X01-X0C/x01-x0C
OFF: the counter continues to count Expansion output Y01-Y0C/y01-y0C
Counter current Value, range: 0~999999 RTC R01-R1F/r01-r1F
Counter preset Value, range: 0~999999 Counter C01-C1F/c01-c1F
Counter Code (C01~C1F total: 31 Counters) Timer T01-T1F/t01-t1F
Analog comparator G01-F1F/g01-g1F
Normal close contact Lo
The preset value of Counter could be a constant or other function current value.
The figure below shows the relationship among the numbered block diagram for a Counter, the ladder diagram view,
and the software Edit Contact/Coil dialog box.
Page 64
Chapter 4 Relay Ladder Logic Programming 60
Counter Mode 0 (Internal coil)
Mode 0 Counter (Internal Coil) used as internal auxiliary coils. No counter preset value. In the example below shows
the relationship among the numbered block diagram for a mode 0 counter, the ladder diagram view, and the software
Edit Contact/Coil dialog box.
Page 65
Chapter 4 Relay Ladder Logic Programming 61
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,
or count down to 0 and stop counting when the current count is equal to 0. Additionally, the current count value is non-retentive
and will reset to init value on a powering up to the smart relay. In the example below, the counter will stop counting when it
reaches the preset value of 20. Counter status bit C01 will be ON when the current value is 20.
Under this mode, the counter current value will be init value when the smart is power up or switching between
RUN and STOP. The init value is 0 if the counter configured as counting up, else, it is preset value.
Page 66
Chapter 4 Relay Ladder Logic Programming 62
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, but it won’t count when the
current value equals 0 if it’s configured as down Counter. Additionally, the current count value is non-retentive and will reset
to init value on a powering up to the smart relay or switching between RUN and STOP. In the example below, the counter
will continue counting after its preset value of 20. Counter status bit C01 will be ON when the current value is 20.
Under this mode, Counter will continue counting after reaching preset value if it’s configured as counter up. But it
stops counting when its current value is 0 if it’s configured as counter down.
The counter current value will be init value when the smart’s status switches between RUN and STOP or the smart
is power up. If the counter configured as counting up, the init value is 0, else, it is preset value.
Page 67
Chapter 4 Relay Ladder Logic Programming 63
Counter Mode 3 (Fixed Count, Retentive)
Mode 3 Counter operation is similar to Mode 1 except its current count value is retentive when Counter powers down. So, the
current value won’t be init value when Counter powers up, but be the value when it powering down. Mode 3 Counter
will count up to a fixed preset value and stop counting at that value, or stop counting when its current value is 0 if it’s configured as
down counter. Additionally, the current count value is retentive when the smart switches between RUN and STOP if “C Keep” is
active. In the example below, the counter will stop counting when it reaches the preset value of 20. Counter status bit C01 will
be ON when the current value is 20.
This mode is similar to mode 1, but:
The current counter value will keep on a loss of power when the smart status is RUN; The current counter value will keep when the smart switches between RUN and STOP if C-keep is active.
Page 68
Chapter 4 Relay Ladder Logic Programming 64
Counter Mode 4 (Continuous Count, Retentive)
Mode 4 Counter operation is similar to Mode 2 except its current count value is retentive. The current count value is
retentive and will keep its current count after a loss of power to the smart relay. Mode 4 Counter will count up to a fixed
preset value and then continue counting after the preset value, but it won’t count when the current value equals 0 if it’s
configured as down Counter. Additionally, the current count value is retentive when the smart switches between RUN and
STOP if “C Keep” is active. In the example below, the counter will continue counting after its preset value of 20. Counter
status bit C01 will be ON when the current value isn’t less than 20.
This mode is similar to mode 2, but:
The current counter value will be kept on a loss of power when the smart status is RUN; The current counter value will be kept when the smart switches between RUN and STOP if “C-keep” is active.
Page 69
Chapter 4 Relay Ladder Logic Programming 65
Counter Mode 5 (Continuous Count, Up-Down Count, Non-Retentive)
Mode 5 Counter’s operation is similar to Mode 2 except its current count value is continuous and non-retentive. The status bit
is fixed to the non-zero preset value regardless of the state of the direction bit. Its status bit will be ON when the counter current
value isn’t less than its preset value, and will be OFF when the current value is less than its preset value.
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 0 on a loss of power to the smart relay. Additionally, the Mode 5
counter is always reset to zero, and the current value also is always 0 when the smart switches between RUN and STOP
unrelated to the state of its direction bit. In the example below, the counter will continue counting after its preset value of 20.
Counter status bit C01 will be ON when the current value is 20.
Under this mode, the count will continuous after reaching its preset value; The current value is always 0 regardless of the state of its direction bit when the reset is availability; The current value is always 0 regardless of the state of its direction bit when the smart switches between RUN and
STOP.
Page 70
Chapter 4 Relay Ladder Logic Programming 66
Counter Mode 6 (Continuous Count, Up-Down Count, Retentive)
Mode 6 Counter’s operation is similar to Mode 4 except its current count value is continuous and retentive. The status bit is
fixed to the non-zero preset value regardless of the state of the direction bit. Its status bit will be ON when the counter current
value isn’t less than its preset value, and will be OFF when the current value is less than its preset value. Additionally, the
Mode 6 counter is always reset to zero, unrelated to the state of its direction bit. The current count value is retentive and will
keep its current count after a loss of power to the smart relay. And Counter will keep current value if “C Keep” is active.
In the example below, the counter will continue counting after its preset value of 20. Counter status bit C01 will be ON when
the current value isn’t less than 20.
This mode is similar to mode 5, but:
The current value is kept on a loss of power down to the smart when it status is RUN; The current value is kept when the smart switches between RUN and STOP if “C Keep” is active.
Page 71
Chapter 4 Relay Ladder Logic Programming 67
High Speed Counters (DC Version Only)
The DC powered version smart relays include two 1 KHz high speed inputs on terminal I01 and I02. 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. They 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 I01 or I02 for forward up-counting to 1 KHz
maximum at 24VDC high speed input signal. The
selected Counter Coil (C01-C1F) will turn ON when the
pulse count reaches preset value 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 among the numbered block diagram for a
Mode 7 Counter, the ladder diagram view, and the
software Edit Contact/Coil dialog box.
Symbol Description
Counting Mode (7) high speed counting
High speed counting input terminal: I01 or I02 only
Use (I01~g1F) to Reset the counting value
ON: the counter reset to 0
OFF: the counter continues to count
Current Count Value, range: 0~999999
Preset Value, range: 0~999999
Counter Coil Number (C01~C1F total: 31 counters)
Example
Page 72
Chapter 4 Relay Ladder Logic Programming 68
High Speed Counter Mode 8 (DC powered versions only)
The Mode 8 High Speed Counter can use either input
terminals I01 or I02 for forward up-counting to 1
KHz maximum at 24VDC high speed input signal.
The selected Counter Coil (C01-C1F) 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 counter will reset
when the preceding rung is inactive. The table below
describes each configuration parameter for High Speed Counter Mode 8.
Symbol Description
Counting Mode (8) high speed counting
High speed counting input terminal: I01 or I02 only
Counting interval time: 0~99.99 sec
Counter ‘on’ preset Value, range: 0~999999
Counter ‘off’ preset Value, range: 0~999999
Counter Coil Number (C01~C1F total: 31 counters)
Page 73
Chapter 4 Relay Ladder Logic Programming 69
Real Time Clock (RTC) Instructions
The SG2 smart relay includes a total of 31 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.
Symbol Description
Input the first week to RTC
Input the second week to RTCRTC mode 0~2, 0: internal coil 1:daily, 2:consecutive day
s
RTC displays the hour of present time. RTC displays the minute of present time Set RTC hour ONSet RTC Minute ONSet RTC Hour OFFSet RTC Minute OFFRTC Coil Number (R01~R1F Total: 31 RTC)
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 among the numbered block diagram for a Mode 0 RTC, the ladder diagram view, and the software
Edit Contact/Coil dialog box.
Page 74
Chapter 4 Relay Ladder Logic Programming 70
RTC Mode 1 (Daily)
The Daily Mode 1 allows the Rxx coil to active based on a fixed time across a defined set of days per week. The
configuration dialog below (example 1) allows for selection of the number of days per week (i.e. Mon-Fri) and
the Day and Time for the Rxx coil to activate ON, and the Day and Time for the Rxx coil to deactivate OFF.
Example 1:
Example 2:
Example 3:
Page 75
Chapter 4 Relay Ladder Logic Programming 71
Example 4:
Example 5:
Example 6:
RTC Mode 2 (Interval weekly)
The Interval Time Mode 2 allows the Rxx coil to activate based on time and day per week. The configuration
dialog below (example 1) allows for selection of Day and Time for the Rxx coil to activate ON, and Day and
Time for the Rxx coil to deactivate OFF.
Example 1:
Page 76
Chapter 4 Relay Ladder Logic Programming 72
Example 2:
Example 3:
Example 4:
RTC Mode 3 (Year-Month-Day)
The Year-Month-Day Mode 3 allows the Rxx coil to activate based on Year, Month, and Date. The
configuration dialog below (example 1) allows for selection of Year and Date for the Rxx coil to activate ON,
and Year and Date for the Rxx coil to deactivate OFF.
Symbol Description
RTC Year ON
RTC Year OFF
RTC Mode 3, Year-Month-Day
Display RTC present time, Year-Month-Day
RTC month ON
RTC day ON
RTC month OFF
RTC day OFF
RTC code (R01~R1F, total 31 group)
Page 77
Chapter 4 Relay Ladder Logic Programming 73
Example 1:
Example 2:
Example 3:
Page 78
Chapter 4 Relay Ladder Logic Programming 74
RTC Mode 4 (30-second adjustment)
The 30-second adjustment Mode 4 allows the Rxx coil to activate based on week, hour, minute and second. The
configuration dialog below shows for selection of week, hour, minute and second for the Rxx coil to activate
ON, and 30-second adjustment then Rxx OFF.
Symbol Description
RTC adj ust ment week
RTC mode 4
RTC present hour
RTC present minute
RTC adjustment hour
RTC adjustment minute
RTC adjustment second
RTC code (R01~R1F, total 31 group)
Example 1: preset second < 30s
The present time will be 8:00:00 when it achieves 8:00:20 at first time, and RTC status bit R01 will be ON.
RTC status bit R01 will be OFF when the present time achieves 8:00:20 at second time. Then time continuous
going. So, this means that RTC status bit is ON for 21 seconds.
Page 79
Chapter 4 Relay Ladder Logic Programming 75
Example 2: preset second > 30s
The present time will change to be 8:01:00 when it achieves 8:00:40, and RTC status bit R01 turns ON. Then
time is gonging on and R01 turns OFF. This means that the RTC status bit will be ON for one pulse.
Page 80
Chapter 4 Relay Ladder Logic Programming 76
Comparator Instructions
The SG2 smart relay includes a total of 31 separate comparator instructions that can be used throughout a program.
Each comparator has a choice of 8 operation modes. Additionally, each comparator has 5 parameters for proper
configuration. The table below describes each configuration parameter, and lists each compatible memory type for
configuring Comparators.
Symbol Description
① Comparison Mode (0~7) ② Ax analog input value (0.00~99.99) ③ Ay analog input value (0.00~99.99) ④ Reference comparative value, could be constant, or other data code ⑤ Output terminal (G01~G1F)
The preset value ②, ③ and can be a constant or other function current value.
Comparator Mode 0 (Internal Coil)
Mode 0 Comparator (Internal Coil) used as internal auxiliary coils. No preset value. In the example below shows
the relationship among the numbered block diagram for a Mode 0 Comparator, the ladder diagram view, and the
software Edit Contact/Coil dialog box.
Page 81
Chapter 4 Relay Ladder Logic Programming 77
Analog comparator Mode 1~7
(1) Analog Comparator mode 1:
ONAyAxAy ,
+
;
(2) Analog Comparator mode 2: ;
ONAyAx ,
(3) Analog Comparator mode 3: ;
ONAyAx ,
(4) Analog Comparator mode 4: ;
ONAx ,
(5) Analog Comparator mode 5: ;
ONAx ,
(6) Analog Comparator mode 6: ;
ONAx ,=
(7) Analog Comparator mode 7: ;
ONAx ,
Example 1: Analog Signal Compare
In the example below, Mode 4 is the selected function that compares the value of analog input A01 to a constant
value (N) of 2.50. Status coil G01 turns ON when A01 is not less than constant 2.50.
Page 82
Chapter 4 Relay Ladder Logic Programming 78
Example 2: Timer/Counter present value Compare
The Comparator instruction can be used to compare Timer, Counter, or other function values to a constant value or each
other. In this example below, Mode 5 is the selected function that compares the value of Counter (C01) with the value
of Timer (T01). Status coil G01 turns ON if present value of C01 isn’t less than present value of T01.
Page 83
Chapter 4 Relay Ladder Logic Programming 79
HMI Display Instructions
The SG2 smart relay includes a total of 31 HMI instructions
that can be used throughout a program. Each HMI instruction
can be configured to display information on the SG2 16×4
character LCD in text, numeric, or bit format for items such as
current value and preset value for functions, Input/Output bit
status, and text. There are three kinds of text in HMI. They
are Multi Language, Chinese (fixed) and Chinese (edit),
Multi Language is shown in the adjacent example. Each
HMI instruction can be configured separately using the
Edit>>HMI/Text menu selection from the SG2 Client
software. In the adjacent example, HMI instruction H01 is
configured to display the value of T01, and some descriptive
text.
Allows the SEL button on the SG2 keypad to activate the
selected message onto the LCD even the Hxx is inactive.
A phone number can be displayed on the screen to alert an operator to call for help. But 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) ② HMI character output terminal (H01~H1F)
Page 84
Chapter 4 Relay Ladder Logic Programming 80
The Chinese (fixed) and Chinese (edit) are shown below. The total number of Chinese (edit) is 60.
HMI function instruction
1. HMI can display character, built-in Chinese, user-defined Chinese and GSM telephone number. This
information can not be edited through keypad.
2. HMI can display function current value (T, C, R, G and DR, classifying units and un-units). This
information can not be edited through keypad.
3. HMI can display preset value of function (T, C, R, G and DR). This information can be edited through
keypad.
4. HMI display state of coil (I, X, Z, M and N (only FBD)), state of M and N can be edited through keypad.
HMI status
1. HMI scanning state, press SEL into at IO interface
2. HMI running state, HMI is enabled at IO interface
Page 85
Chapter 4 Relay Ladder Logic Programming 81
3. HMI edit preparing state, press SEL when HMI is scanning or running state, flicker cursor will show if
there is edited content.
4. HMI editing state, press SEL again under status 3
Keypad instruction
ESC Abrogate operation
Into status 3 if there is edited content at status 1 or 2
Into status 4
SEL
Change preset type under status 4
Under status 4, change data and number, function preset data; change coil state
Not in status 4, move cursor up and down
Under status 2, find the nearest enabled HMI
(SEL+↑ ↓)
Under status 1, find the nearest HMI whose mode is 1
Move cursor lift and right
OK Validate editing and store automatic
Page 86
Chapter 4 Relay Ladder Logic Programming 82
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 Q01 and Q02. The PWM instruction is able to output up to an 8-stage PWM waveform. It also provides a
PLSY (Pulse output) output on terminal Q01, whose pulse number and frequency can be changed. The table below
describes number and mode of PWM.
Mode Output
P01 PWM, PLSY Q01
P02 PWM Q02
PWM mode
P01 and P02 both can work under this mode. Each PWM has 8 group preset stages which contents Width and
Period. The 8 group preset values can be constant or other function current value. Each PWM has 10 parameters
for proper configuration. The table below describes each configuration parameter, and lists each compatible memory
type for configuring PWM.
Symbol Description Enable Select3 Select2 Select1 stage PWM Output
① PWM mode (1) OFF X X X 0 OFF ② present stages as operating (0~8) ON OFF OFF OFF 1 Preset stage 1 ③ Select1 (I01~g1F) ON OFF OFF ON 2 Preset stage 2 ④ Select2 (I01~g1F) ON OFF ON OFF 3 Preset stage 3 ⑤ Select3 (I01~g1F) ON OFF ON ON 4 Preset stage 4 ⑥ Current number of pulse (0~32767) ON ON OFF OFF 5 Preset stage 5 ⑦ Period of preset stage (1~32767 ms) ON ON OFF ON 6 Preset stage 6 ⑧ Width of preset stage (0~32767 ms) ON ON ON OFF 7 Preset stage 7 ⑨ Output port (Q01~Q02) ON ON ON ON 8 Preset stage 8 ⑩ PWM code (P01~P02)
Example:
Page 87
Chapter 4 Relay Ladder Logic Programming 83
The state of M01, M02 and M03 are 010, so PWM output pulse is like this as setting above:
The state of M01, M02 and M03 decide PWM output. PWM stages can be changed by the status of M01, M02 and M03 when P01 is running. displays the number of pulse when P01 is running, but ⑥ equals 0 when P01
is disabled.
PLSY mode
Only P01 can work under this mode, and the output is Q01. PLSY has 6 parameters for proper configuration.
The table below describes the information of PLSY parameters.
Symbol Description
PLSY mode (2)
Total number of pulse (storing in DRC9)
Preset frequency of PLSY (1~1000Hz)
Preset pulse number of PLSY(0~32767)
Output port (Q01)
PWM code (P01)
The preset frequency and pulse number could be constant or other function current value. They are variable if
the preset are other data code. The PLSY will stop output if it has outputted the number of pulse. PLSY will
run again if it is enabled for a second time.
Example:
Parameter setting: = 500Hz,④ = 5, output as shown below:
PLSY stops outputting when the number of output pulse is completed.
Page 88
Chapter 4 Relay Ladder Logic Programming 84
In the example below, the frequency is other data code (C01). So the wave’s frequency will change following
the current value of C01.
In the example above, frequency is 1000 if the current value of C01 is bigger than 1000. PLSY stops outputting pulse after it has output 100 pulses. PLSY will be going on as long as it’s enabled if ④ is 0.
Page 89
Chapter 4 Relay Ladder Logic Programming 85
Data Link/Remote I/O Instruction (SG2-20Vxxx model only)
The SG2-20Vxxx models include the capability to link additional SG2-20Vxx units
via the RS-485 connection terminals. The baud rate and communication format
both can be set using the Operation»Module System Set menu selection from the
SG2 Client software. They also can be set through keypad like adjacent picture.
The two bits of keypad how to decide the communication format and baud
rate like describing below.
Data Meaning
0 8/N/2 Data 8bit, No Parity, 2 Stop bit. 1 8/E/1 Data 8bit, Even Parity, 1 Stop bit. 2 8/O/1 Data 8bit, Odd Parity, 1 Stop bit.
High bit
3 8/N/1 Data 8bit, No Parity, 1 Stop bit. 0 4800bps 1 9600bps 2 19200bps 3 38400bps 4 57600bps
Low bit
5 115200bps
Data Link
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. The Master smart relay’s ID must be 00, and Slave nodes’ ID should
start with 01 and be continuous. If nodes’ ID isn’t continuous, the Master won’t communication with those
nodes which are behind the first broken. For example, the nodes’ ID is 01, 02, 04 and 05. The Master thinks
there are only two Slave nodes whose ID is 01 and 02, and communication with them.
ID Memory list
location
0 W01~W08
1 W09~W16
2 W17~W24
3 W25~W32
4 W33~W40
5 W41~W48
6 W49~W56
7 W57~W64
The Mode 1 Send memory range is determined by the Controller ID. Each controller ID is allocated a range of 8 I/O
points (Wxx - Wxx) that can be read into the Master smart relay using a Data Link instruction. The adjacent table
show the memory range of Wxx locations associated with each controller ID.
Page 90
Chapter 4 Relay Ladder Logic Programming 86
Symbol Description Type of points Range
Setting mode(1,2) 1:sending 2:receiving Inputs I01~I0C/i01~i0C
Number of send/receive points (1~8) Outputs Q01~Q08/q01~q08
Type of send/receive points Auxiliary coil M01~M3F/m01~m3F
Send/Receive W Table list location Expansion inputs X01~X0C/x01~x0C
I/O link output terminal (L01~L08) Expansion outputs Y01~Y0C/y01~y0C
Only one Data Link instruction can work at Mode 1, and the other Data Link instructions must be Mode 2.
Example 1: Data Link Mode 1
Set = 1, = 5, set as the initiate of I03, the state of actual sending terminal I03~I07 is sent to memory list; the
controller ID = 1, the state of corresponding memory list position W09~W13, and relationship of sending terminal is
as below:
=1, = 5, = I03~I07, ID=1 (④:W09~W13)
Memory List Position WW09 W10 W11 W12 W13 W14 W15 16
Corresponding receiving
0
0
Or sending terminal
I03 I04 I05 I06 I07 0
Example 2: Data Link Mode 2
Set = 2, = 5, set as start from M03, set as from W17, when enabling the Data Link, the state
ON/OFF of M03~M07 is controlled by the state of memory list position W17~W21.
=1, = 5, ③ = M03~M07, ④:W17~W21
Memory List Position W17 W18 W19 W20 W21
Corresponding receiving
Or sending terminal M03
M04 M05 M06 M07
Page 91
Chapter 4 Relay Ladder Logic Programming 87
Remote I/O
Up to 2 additional SG2 units can be configured as Remote I/O nodes, and linked to one master smart relay.
Don’t use expansion DI/DO modules, when remote I/O function is enabled.
Set to master
Remote I/O disable
Set to slaver
Set to master User program valid X = slave input Y = slave out
p
ut
Set to slave User program not valid Input = X coil of master Output = Y coil of master
Page 92
Chapter 4 Relay Ladder Logic Programming 88
SHIFT (shift output)
The SG2 smart relay includes only one SHIFT instruction that can be used throughout a program. This function
output a serial of pulse on selection points depending on SHIFT input pulse. It has 4 parameters for proper
configuration. The table below describes each configuration parameter, and lists each compatible memory type for
configuring SHIFT.
Symbol Description
Preset number of output pulse (1~8)
SHIFT input coil (I01~g1F)
SHIFT output coils (Q, Y, M, N)
SHIFT code (S01)
In the example below, = 5, = I01, : Q03~Q07.
Q03 is ON, and from Q04 TO Q07 are OFF when ENABLE is active. Q04 turns ON when I01’s rising edge
coming on, and others points turn OFF. The next coil turns ON at each rising edge of SHIFT input, and others
turn OFF.
Page 93
Chapter 4 Relay Ladder Logic Programming 89
AQ (Analog Output)
The default output mode of AQ is 0-10V voltage, the corresponding value of AQ is 0~1000. It also can be set as
0-20mA current, the corresponding value of AQ is 0~500. The output mode of AQ is set by the current value of
DRD0~DRD3 as shown below.
Number Signification Mode DRD0~DRD3 data definition
DRD0 Setting the output of AQ01 1 0: voltage mode, AQ output value is 0 under STOP mode
DRD1 Setting the output of AQ02 2 1: current mode, AQ output value is 0 under STOP mode
DRD2 Setting the output of AQ03 3 2: voltage mode, AQ keeps output value under STOP mode
DRD3 Setting the output of AQ04 4 3: current mode, AQ keeps output value under STOP mode
It will be thought as 0 if the value of DR isn’t in the range of 0~3. That means the output mode of AQ is
mode 1. AQ displays preset value (constant of code of other data) under STOP mode, displays current value
under RUN mode. AQ preset value can be a constant or other function current value.
AQ display
AQ displays the preset value under STOP mode, and displays the current value under RUN mode.
2 number of expansion analog output 2AO,AQ01~AQ04
A Q 0 1 = 0 1 . 2 3 V
010VDC voltage mode (AQ value: 01000), depending on DRD0
A Q 0 2 = 0 8 . 9 2 m
A
020mA current mode (AQ value: 0500), depending on DRD1
A Q 0 3 = A 0 1 V A Q 0 4 = D R 3 F m A
The value will be judged if it’s over-flow when writing AQ preset value or current value through PC
communication. So, output mode information should have been written before preset value.
AQ is current mode:
mAvaluedisplayAQvaluecurrentAQ 00.20:__500:__
=
AQ current value is different from display value, and current value is used in operation and storage. AQ
display is shown below.
Page 94
Chapter 4 Relay Ladder Logic Programming 90
AS (Add-Subtract)
The SG2 smart relay includes a total of 31AS instructions that can be used throughout a program. The ADD-SUB
Addition and/or Subtraction function enables simple operations to be carried out on integers. There are 6
parameters for proper configuration. The table below describes each configuration parameter, and lists each
compatible memory type for configuring AS.
Symbol Description
AS current value ( -32768~32767)
V1 parameter ( -32768~32767)
V2 parameter ( -32768~32767)
V3 parameter ( -32768~32767)
Error output coil (M, N, NOP)
AS code (AS01~AS1F)
Compute formula:
321 VVVAS
−+=
AS current value is the result of compute. Parameters V1, V2, and V3 can be a constant or other function
current value. The output coil will be set to 1 when the result is overflow. And the current value is no meaning
at this time. But it will do nothing if the output coil is NOP. The output coil will turns OFF when the result is
right or the function is disabled.
The example below shows how to configure AS function.
Error output coil N01 will turn ON when the compute result is overflow.
Page 95
Chapter 4 Relay Ladder Logic Programming 91
MD (MUL-DIV)
The SG2 smart relay includes a total of 31MD instructions that can be used throughout a program. The MUL-DIV
Multiplication and Division function enables simple operations to be carried out on integers. There are 6
parameters for proper configuration. The table below describes each configuration parameter, and lists each
compatible memory type for configuring MD.
Symbol Description
MD current value ( -32768~32767)
V1 parameter ( -32768~32767)
V2 parameter ( -32768~32767)
V3 parameter ( -32768~32767)
Error output coil (M, N, NOP)
MD code (MD01~MD1F)
Compute formula:
3/2*1 VVVMD
=
MD current value is the result of compute. Parameters V1, V2, and V3 can be a constant or other function
current value. The output coil will be set to 1 when the result is overflow. And the current value is no meaning
at this time. But it will do nothing if the output coil is NOP. The output coil will turns OFF when the result is
right or the function is disabled.
The example below shows how to configure MD function.
Error output coil M01 will turn ON when the compute result is overflow.
Page 96
Chapter 4 Relay Ladder Logic Programming 92
PID (Proportion- Integral- Differential)
The SG2 smart relay includes a total of 15 PID instructions that can be used throughout a program. The PID function
enables simple operations to be carried out on integers. There are 9 parameters for proper configuration. The
table below describes each configuration parameter, and lists each compatible memory type for configuring PID.
Symbol Description
PI: PID current value (-32768~32767)
SV: target value (-32768~32767)
PV: measure value (-32768~32767)
TS: sampling time (1~32767 * 0.01s)
KP: Proportion (1~32767 %)
T
I
: Integral time (1~32767 * 0.1s)
TD: Differential time (1~32767 * 0.01s)
Error output coil (M, N, NOP)
PID code (PI01~PI0F)
The parameters from to can be constant or other function current value. The error coil will turn ON
when either T
S
or KP is 0. But it will do nothing if the output coil is NOP. The output coil will turns OFF when
the result is right or the function is disabled.
PID computes formula:
()
()
=
=
++=
=
PIPI
PVPVPV
T
T
D
DEV
T
T
EVEVKPI
PVSVEV
nnn
S
D
n
nn
I
s
nnP
nn
21
1
2
The example below shows how to configure PID function.
Page 97
Chapter 4 Relay Ladder Logic Programming 93
MX (Multiplexer)
The SG2 smart relay includes a total of 15 MX instructions that can be used throughout a program. This special
function transmits 0 or one of 4 preset values to MX current value memory. The MX function enables simple
operations to be carried out on integers. There are 7 parameters for proper configuration. The table below
describes each configuration parameter, and lists each compatible memory type for configuring MX.
symbol description
V1 parameter ( -32768~32767)
V2 parameter ( -32768~32767)
V3 parameter ( -32768~32767)
V4 parameter ( -32768~32767)
Selection bit 1: S1
Selection bit 2: S2
MX code (MX01~MX0F)
The parameters from to can be constant or other function current value. The table below describes the
relationship between parameter and MX current value.
disable MX = 0;
enable
S10,S20: MX = V1; S10,S21: MX = V2; S11,S20: MX = V3; S11,S21: MX = V4;
The example below shows how to configure MX function.
Page 98
Chapter 4 Relay Ladder Logic Programming 94
AR (Analog-Ramp)
The SG2 smart relay includes a total of 15 AR instructions that can be used throughout a program. The AR function
enables simple operations to be carried out on integers. Analog Ramp instruction allows AR current level to be
changed by step from starting level to target level at a specified rate. There are 12 parameters for proper
configuration. The table below describes each configuration parameter, and lists each compatible memory type for
configuring AR.
symbol Description
AR current value: 0~32767
Level1:-10000~20000
Level2:-10000~20000
MaxL (max level):-10000~20000
start/stop level (StSp): 0~20000
stepping rate (rate): 1~10000
Proportion (A): 0~10.00
Excursion (B): -10000~10000
Level selection coil (Sel)
Stop selection coil (St)
Error output coil (M, N, NOP)
AR code (AR01~AR0F)
ABlevelcurrentARvaluecurrentAR /)__(__
=
The parameters from to can be constant or other function current value. The table below describes
detail information of each parameter of AR.
Sel Selection level Sel = 0: target level = Level1
Sel = 1: target level = Level2
MaxL is used as target level if the selected level is bigger than MaxL.
St Selection stop coil. The St’s state becomes from 0 to 1 will startup the current level decrease to start/stop
level (StSp + excursion “B”), and then keep this level for 100ms. Then AR current level is set to B
which will make AR current value equals 0.
Output coil The output coil turns ON when A is 0.
The output coil can be M, N or NOP. The output coil is set when the wrong thing happens, but it will do
nothing if the output coil is NOP. And the current value is no meaning at this time.
AR will keep the current level at “StSp + Offset "B"” for 100ms when it’s enabled. Then the current level runs
from StSp + Offset "B" to target level at enactment Rate. If St is set, the current level decreases from current level
to level StSp + B at enactment Rate. Then AR holds the level StSp + Offset "B" for 100ms. After 100ms, AR
current level is set to offset "B", which makes AR current value equals 0.
Page 99
Chapter 4 Relay Ladder Logic Programming 95
Timing diagram for AR
The example below shows how to configure AR function.
Page 100
Chapter 4 Relay Ladder Logic Programming 96
DR (Data register)
The SG2 smart relay includes a total of 240 DR instructions that can be used throughout a program. The DR function is
transferring data. DR is a temp register. DR sends data from prevention registers to current register when it’s enabled.
The data can be sign or unsigned by setting DR_SET bit through operation>>module system set menu selection from
the SG2 Client software. There are 2 parameters for proper configuration. The table below describes each configuration
parameter, and lists each compatible memory type for configuring DR.
symbol Description
Preset value: DR_SET = 0, 0~65535
DR_SET = 1,-32768~32767
DR code (DR01~DRF0)
The parameter can be a constant or other function current value.
The example below shows how to configure DR function.
STOP RUN (DR01 = C01 current value)
Loading...