Page 1
SG2 Smart PLC USER Manual SG2 Programmable Logic Smart Relay Apply to: SG2 firmware version 3.6, PC client program software version 3.4 PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
4KA72X023 Contents Contents.....................................I Summary of changes..............................Ⅴ Chapter 1: Getting Started............................... 1 Examination before Installation ..........................3 Environmental Precautions ..........................3 SG2 Model Identification..........................3 Quick Start Setup ..............................4 Install SG2 Client Software ..........................4 Connect Power to SG2 smart relay ......................... 4 Connect Programming Cable ..........................
Page 3
4KA72X023 LCD Display and Keypad ............................. 46 Keypad ................................46 Original Screen ............................. 47 LCD Display Main Menu..........................50 RTC Daylight saving setting........................55 SG2 system error............................59 Chapter 4: Parameter passing............................60 SG2 inner data type............................... 61 Passing parameter out of range ..........................63 Chapter 5: Relay Ladder Logic Programming ......................
Page 4
4KA72X023 XOR Logic Diagram........................... 147 SR Logic Diagram ............................147 NOT Logic Diagram ........................... 147 Pulse Logic Diagram........................... 148 BOOLEAN Logic Diagram ........................148 Function Block..............................149 Timer Function Block ..........................150 Common Counter function block........................ 158 High Speed Counter Function Block (DC Version Only) ................164 RTC Comparator Function Block .......................
Page 5
4KA72X023 Chapter 9: Expansion Module............................. 213 Summarize ................................214 Power .................................. 216 Size..................................216 Digital IO Module............................... 219 Analog Module ..............................223 Analog Input Module 4AI........................... 223 Temperature Input Module 4PT ........................224 Analog Output Module 2AO........................225 Communication Module ............................. 227 MBUS Module............................
4KA72X023 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.
Page 7
4KA72X023 version of SG2 PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Page 8
Chapter 1: Getting Started Chapter 1: Getting Started Examination before Installation..........................3 Environmental Precautions ..........................3 SG2 Model Identification ..........................3 Quick Start Setup..............................4 Install SG2 Client Software ..........................4 Connect Power to SG2 smart relay........................4 Connect Programming Cable...........................5 Establish Communication..........................5 Write simple program ............................6 PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
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.
Chapter 1: Getting Started 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. •...
Install SG2 Client Software Install the SG2 Client Software from CD or from the free internet download at www.teco.com.tw 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.
Chapter 1: Getting Started Connect Programming Cable Remove the plastic connector cover from the SG2 using a flathead screwdriver as shown in the figure below. Plug in 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 or USB port on the computer.
Chapter 1: Getting Started c. Select the correct Com Port number where the programming cable is connected to the computer then press the “link” button. d. The SG2 Client will then begin to detect the connected smart relay to complete its connection. Write simple program a.
Chapter 1: Getting Started 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.
Page 15
Chapter 1: Getting Started 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 16
Chapter 1: Getting Started 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 shows the active part, and the first Output (Q01) on the connected smart relay will be ON.
Page 17
Chapter 2 Installation Chapter 2: Installation General Specifications ............................11 Product Specifications............................14 Mounting................................16 Wiring ................................... 18 K type Indicator Light............................20 PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
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.
Chapter 2 Installation 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 8-point:190g Weight 10,12-point: 230g (C type: 160g)
Page 20
Chapter 2 Installation Relay Outputs Contact material Ag Alloy Current rating HP rating 1/3HP@120V 1/2HP@250V Resistive: 8A /point Maximum Load Inductive: 4A /point Maximum operating time 15ms (normal condition) Life expectancy (rated load) 100k operations Minimum load 16.7mA Transistor Outputs PWM max.
Chapter 2 Installation SG2-10CR-A 6 AC 4 Relay 100-240VAC SG2-20CR-A 12 AC 8 Relay ※ If module with keypad and display, Max IO can be added keypad input Z01-Z04. ※ More information about Product Specifications to see “chapter 6: Hardware Specification”.
Chapter 2 Installation 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) X1 X2 X3 Input...
Page 24
Chapter 2 Installation It is recommended to apply a DIN-rail end clamp to hold the SG2 in place. X3 X4 Input 4 × AC AC 100~240V DC 24V Input 8 x DC(A1,A2 0~10V) SG2-8ER-A SG2-12HR-D Output 4 x Relay / 8A Output 4 x Relay / 8A Direct Mounting Use M4 screws to direct mount the SG2 as shown.
Chapter 2 Installation 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.
Page 26
Chapter 2 Installation Sensor Connection Output (Relay) Output 4 x Relay / 8A Output 8 x Relay / 8A Output (Transistor) OUTPUT 4 x TR / 0.5A OUTPUT 8 x TR / 0.5A IO Link OR Remote I/O Link A1 A2 A3 A4 A3 A4 A1 A2...
Chapter 2 Installation 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 & Slaver). ※...
Chapter 3 Program Tools Chapter 3: Program Tools PC Programming Software “SG2 Client”......................21 Installing the Software ..........................21 Connecting the Software ..........................21 Start Screen ..............................21 Ladder Logic Programming Environment ....................22 Menus, Icons and Status Bar ......................... 23 Programming............................
Installing the Software Install the SG2 Client Software from CD or from the free internet download at www.teco.com.tw 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.
Chapter 3 Program Tools 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.
Chapter 3 Program Tools Menus, Icons and Status Bar 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.
Chapter 3 Program Tools 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.
Chapter 3 Program Tools 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 RUN icon. The program below is shown in simulation mode, identifying the significant available features.
Chapter 3 Program Tools 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. PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Chapter 3 Program Tools 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, ※...
Chapter 3 Program Tools Operation menu The Operation menu, includes several system configuration functions for both online and offline setup. The following explains the details of each function. Functional Description Online function for runtime monitor when connected to a smart relay Offline function for testing and debugging a program Self-motion simulator control Control running or simulator if not connect a smart relay...
Chapter 3 Program Tools HMI/TEXT This function block can display information on 16×4 LCD screen: 1. Preset value or current value of function blocks, such as Counter, Timer, RTC, Analog comparator and DR register etc. Under running mode, to modify the preset value via HMI is available. 2.
Page 38
Chapter 3 Program Tools ① 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”...
Page 39
Chapter 3 Program Tools Setting telephone number (GSM module SMS function): Build-in 20 HMI (H01~H14) can be set telephone number for SMS alarm. When HMI which set telephone is enabled, SG2 save text information. Extension GSM module send this HMI text to telephone after reading this HMI text.
Page 40
Chapter 3 Program Tools Example: HMI/TEXT and Z keypad input function Power ON and RUN (initial display) Press “↑” (Z01) and display H03 coil PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Chapter 3 Program Tools ① 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 ⑤...
Page 42
Chapter 3 Program Tools 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.
Chapter 3 Program Tools Analog Output Set… The AQ editing environment can be access through the menu using the Edit>> Analog Output Set… selection shown below. CH1~CH4 correspond to analog output AQ01~AQ04. The range is 0~4095 if the output mode is voltage mode. The range is 0~2047 if the output mode is current mode.
Chapter 3 Program Tools 3-Contact/5-Contact There are 3-contact and 5-contact edit modes available in SG2 LADDER mode. In 3-Contact mode, there are three inputs and one output available in one ladder line. And the maximum line number is 300. In 5-Contact mode, there are five inputs and one output available in one ladder line. And the maximum line number is 200.
Chapter 3 Program Tools Data Register Set… The content of Data Register is either unsigned or signed, 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>>...
Page 46
Chapter 3 Program Tools Special DR Register Function If the special DR coil, DR65~DRF0, is used as a special register, it dose not need to be enabled; it works as common register (it current value will equal to the preset value) once it is enabled. DR65~DRF0 can retain the current value when stop or power down.
Chapter 3 Program Tools View menu The view menu includes software display option selection. The following explains the details of each function. Functional Description Display usage list Display function block and parameter Display capacity left space Monitoring or Simulation coil status (I, X, Z, M, N) Simulation IO Link W status(only RS485 type) Monitoring or Simulation analog input A01~A04(only DC type) Monitoring or Simulation expand analog input A05~A08...
Chapter 3 Program Tools FBD Programming Environment The FBD Programming Environment includes all the functions for programming and testing the SG2 using the FBD programming language. To begin a new program select File-->New, and select the desired model of SG2, as shown right.
Chapter 3 Program Tools Programming The program can be edited by mouse, the following example describes the instructions for programming. Click the right mouse button, selecting “Constants/Connectors” on the appearing screen like below left one, or simply click on the FBD the toolbar (see below right), then all available coil icons will come out. Were selected symbol "M"...
Chapter 3 Program Tools Simulation Mode SG2 Client build-in simulation test function, the following diagram shows the display characteristics in simulation mode. Online Monitoring/Editing PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Chapter 3 Program Tools Symbol and Parameters list FBD list symbols for coils and function blocks which only been used in program, and will comment tags appear in the program; Symbol also can describe the function of main program. The following diagram operation, click the toolbar "Comments", Comments configuration dialog box appears, edit and click "OK", notes will be displayed in the programming interface, and can be moved by dragging the mouse position.
Page 52
Chapter 3 Program Tools Parameters List: Parameters list display coils and functional blocks which used in program and explain coil functions and tags, function block settings and markings and other information, as shown below. PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Chapter 3 Program Tools 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: SG2V2 PM05 SG2V2...
Chapter 3 Program Tools 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).
Chapter 3 Program Tools Original Screen LCD displays 4-line state Original screen as power on ◎ Press the button: Enter Main Menu screen Under LADDER Mode,DRD8 current value=0, display the state of relays (I/Z/Q ⇔ X/Y SEL+↑ ↓ ⇔ M ⇔ N ⇔ T ⇔ C ⇔ R ⇔ G ⇔ A ⇔ AT ⇔ AQ) ⇔ Original Screen Or ↑...
Page 56
Chapter 3 Program Tools Analog input A01~A04: 0~9.99V Expansion Analog input A05~A08: 0~9.99V or 0~20.00mA Press key: →, SEL+→ ←, SEL+← Expansion temperature analog input AT01~AT04: -100.0~600.0 Cent degree or -148.0~1112.0 Fahrenheit degree Press key: →, SEL+→ ←, SEL+← Expansion analog output AQ01~AQ04: 0~10.00V or 0~20.00mA Setting voltage mode or current mode, more information to see: Chapter 4: Relay Ladder Logic ※...
Page 57
Chapter 3 Program Tools e.g. In order to hide some I/O interfaces. You can set DRD8 current value through running a Ladder/FBD program, you also can setting it by PC-LINK as shown below: 1. Open “Edit>I/O Display Set…”: 2. Setting “I/O Display Set” as the picture shown below, and click OK : 3.
Chapter 3 Program Tools LCD Display Main Menu (1) The Main Menu as SG2 under ‘STOP’ Mode. Press “ESC” key on keypad after power on for entering into the Ladder main menu or FBD main menu, which depends on the program format, Ladder or FBD mode in SG2. Menu Description >...
Page 59
Chapter 3 Program Tools Main Menu LADDER ◎ Press the Button Button Description 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.
Page 60
Chapter 3 Program Tools FUNCTION BLOCK program input ◎ After into FUNCTION BLOCK, cursor flicker on “T”, press “SEL” key, cursor will into edit mode. This time if press “SEL” key continuously. Ladder function block display in sequence: T→C→R→G→H→L→P→S→AS→MD→PI→MX→AR→MU→T… This time if cursor flicker on “T”, press “↑ /↓”. Ladder function block display in sequence: T↔C↔R↔G↔H↔L↔P↔S↔AS↔MD↔PI↔MX↔AR↔MU↔T…...
Page 61
Chapter 3 Program Tools RUN or STOP ◎ (1) RUN Mode (2) STOP Mode ↑ ↓ Move the cursor Execute the instruction, then back to main menu 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. ↑...
Page 62
Chapter 3 Program Tools (4) SET (system setting) content default ID SET ID setting (00~99) REMOTE I/O Remote I/O Mode (N: none M: Master S: Slave) BACK LIGHT Back light mode × (√: always light ×: light for 10s after pressed.) M KEEP √...
Chapter 3 Program Tools (5) RTC SET Now Press ↑ ↓ Enter RTC setting or Daylight saving setting Begin to input parameters Move the Cursor ‘SEL’ then ‘←/→’ 1. year=00~99, month=01~12, day=01~31 ‘SEL’ then ‘↑/↓’ 2. hour = 00~23 , minute = 00~59 ‘SEL’...
Page 64
Chapter 3 Program Tools 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. (6) ANALOG SET A 1=GAIN : 010 GAIN (0~999), default 10 OFFSET : +00 OFFSET (-50~+50), default 0...
Page 65
Chapter 3 Program Tools (7) PASSWORD (setting password) Now Press 1. Begin to input numeral 2. When the password is ON, it will not display 0000, but ****. Move the cursor ‘SEL’ then ‘←/→’ ‘SEL’ then ‘↑/ ↓’ Data changed 0~F Save the input data, not 0000 or FFFF, as the PASSWORD is ON.
Page 66
Chapter 3 Program Tools (8) LANGUAGE (Selection menu language) English French Spanish Italian German Portuguese Simplified Chinese Polish Russian Turkish Now Press ↑ ↓ Vertically move the Cursor Select the language the cursor located Back to Main Menu ※ Language display “√” means current selection for menu language; ※...
Chapter 3 Program Tools SG2 system error After power on, SG2 keep detecting the running state. Once system error occurred, the error code will display on LCD. At the same time, SG2 will stop or just give error-warning base on the error type. Error types are show in the table below: Error code Explain...
Chapter 4: Parameter passing Chapter 4: Parameter passing SG2 inner data type.........................61 Passing parameter out of range .......................63 PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Chapter 4: Parameter passing In SG2, almost all the function block can use other function block’s current value as its preset value. This process we called data transmission. This chapter will describe some regulation about data transmission. SG2 inner data type All the data stored in SG2 inner system are integer.
Page 70
Chapter 4: Parameter passing Example2: MD01 current value passing to other function block as preset value: When B006(MD01)=430, MD01’s inner value 430 is passed to other function block as preset value. Passing to AQ01 automatically as 4.30V, Passing to B001(G01) automatically as 4.30, Passing to B002(T01 time base is 0.01s) automatically as 4.30s, Passing to B003(T02 time base is 0.1s) automatically as 43.0s, Passing to B004(T03 time base is 1s) automatically as 430s, Passing to B005(C01) automatically as 430:...
Chapter 4: Parameter passing Passing parameter out of range MD current value data range is -32768~32767, T preset value data range is 0~9999. If MD current value is passed to T as preset value, obviously sometimes MD current may greater T preset value upper limit, or less than T preset value down limit.
Page 72
Chapter 4: Parameter passing Example2: When AT01=-100.0, AT01’s inner value -1000 is passed to other function block as preset value. Passing to B002(T01 time base is 0.01s) as preset value. -1000 is less than lower limit of T01 0, so automatically as 00.00; Passing to B003(C01) as preset value.
Chapter 5 Relay Ladder Logic Programming B asic Elements General RESET PULSE N.O. N.C. Number output output output output contact contact Symbol (N.O./N.C.) Digital 12(I01-I0C/i01-i0C) Input Keypad 4(Z01-Z04/z01-z04) Input Digital 8(Q01-Q08/q01-q08) Output Auxiliary 63(M01-M3F/m01-m3F) Coil Auxiliary 63 (N01-N3F/n01-n3F) Coil Counter 31(C01-C1F/c01-c1F) Timer 31(T01-T1F/t01-t1F)
Page 75
Chapter 5 Relay Ladder Logic Programming Auxiliary Coils ( M ) Auxiliary Coils are the virtual coils inside the SG2 unit; they are not the real physically inputs or outputs that can be wired to any external devices, switches, sensors, etc. The number of Auxiliary Relays M is 63. Since auxiliary relays are internal elements within the CPU, they can be programmed as digital inputs (contacts) or digital outputs (coils).
Page 76
Chapter 5 Relay Ladder Logic Programming Auxiliary Coils ( N ) The function of auxiliary coils, N, is the same as auxiliary coils 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 be energized when input I03 turns on.
Chapter 5 Relay Ladder Logic Programming S pecialty Elements General RESET PULSE N.O. N.C. Number output output output output contact contact Symbol (N.O./N.C.) Used in function block Expansion input coil 12(X01-X0C/x01-x0C) Expansion output coil 12(Y01-Y0C/y01-y0C) Edge trigger (pulse output) 31(R01-R1F/r01-r1F) Analog comparator 31(G01-G1F/g01-g1F) 31(H01-H1F)
Chapter 5 Relay Ladder Logic Programming O utput 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 turns from OFF to ON. Once the output is ON or set, it will remain ON until it is reset using the “Reset output”...
Chapter 5 Relay Ladder Logic Programming Analog Elements Analog input Analog output number Analog input 8 (A01~A08) Analog input parameter 8 (V01~V08) Temperature input 4 (AT01~AT04) Analog output 4 (AQ01~AQ04) Add-Subtract control 31 (AS01~AS1F) Multiply-Divide control 31 (MD01~MD1F) PID control 15 (PI01~PI0F) Data Multiplexer control 15 (MX01~MX0F)
Chapter 5 Relay Ladder Logic Programming T imer Instruction The SG2 includes 31 Timer coils that can be used throughout a program. T0E and T0F keep their current value after power lost if “M Keep” is active, but the other Timers’...
Page 81
Chapter 5 Relay Ladder Logic Programming 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.
Page 82
Chapter 5 Relay Ladder Logic Programming 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.
Page 83
Chapter 5 Relay Ladder Logic Programming 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.
Page 84
Chapter 5 Relay Ladder Logic Programming 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.
Page 85
Chapter 5 Relay Ladder Logic Programming 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.
Page 86
Chapter 5 Relay Ladder Logic Programming 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.
Page 87
Chapter 5 Relay Ladder Logic Programming 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.
Chapter 5 Relay Ladder Logic Programming C ounter Instructions The SG2 includes 31 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.
Page 89
Chapter 5 Relay Ladder Logic Programming Counter Mode 1 (Non-Overtake, 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.
Page 90
Chapter 5 Relay Ladder Logic Programming Counter Mode 2 (Overtaking, Non-Retentive) Mode 2 Counter will count up to a fixed preset value and continue counting even reach the preset value, but it won’t count when the current value equals 0 in counting-down mode. 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.
Page 91
Chapter 5 Relay Ladder Logic Programming is power up. The initial value equals to zero if the counter is in counting-up mode, but the preset value in counting-down mode. Counter Mode 3 (Non-Overtaking, Retentive) Mode 3 Counter operation is similar to Mode 1 except its current count value is retentive when restart the power.
Page 92
Chapter 5 Relay Ladder Logic Programming Counter Mode 4 (Overtaking, 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 power lost. 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 counting-down mode .
Page 93
Chapter 5 Relay Ladder Logic Programming Counter Mode 5 (Overtaking, Up-Down Count, Non-Retentive) Mode 5 Counter’s operation is similar to Mode 2, overtaking and non-retentive. 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.
Page 94
Chapter 5 Relay Ladder Logic Programming Counter Mode 6 (Overtaking, Up-Down Count, Retentive) Mode 6 Counter’s operation is similar to Mode 4, its current count value is overtaking and retentive. 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.
Page 95
Chapter 5 Relay Ladder Logic Programming High Speed Counte s (DC sion On 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.
Page 96
Chapter 5 Relay Ladder Logic Programming Example:Q01 output ON with C01, and Q02 output ON with scan time. PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Page 97
Chapter 5 Relay Ladder Logic Programming High Speed Counter Mode 8 (DC powered versions only) The Mode 8 High Speed Counter can use either Symbol Description input terminals I01 or I02 for forward up-counting to Counting Mode (8) high speed counting ①...
Chapter 5 Relay Ladder Logic Programming R eal Time Clock (RTC) Instructions The SG2 smart relay includes 31 RTC coils that can be used throughout a program. Each RTC instruction has a choice of 5 operation modes, and has 10 parameters for proper configuration.
Page 99
Chapter 5 Relay Ladder Logic Programming RTC Mode 1 (Daily) The Daily Mode 1 allows the RTC coil acting based on a fixed time across a defined set of days per week. The configuration dialog below (example 1) allows setting the workdays per week (i.e. Mon-Fri) and the work hours per day.
Page 100
Chapter 5 Relay Ladder Logic Programming Example 3: Example 4: Example 5: Example 6: PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Page 101
Chapter 5 Relay Ladder Logic Programming RTC Mode 2 (Interval weekly) The Interval Time Mode 2 allows the RTC coil acting based on time and day per week. The configuration dialog below (example 1) allows setting the start-working time and stop-working time between two days in each week. Example 1: Example 2: PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Page 102
Chapter 5 Relay Ladder Logic Programming Example 3: Example 4: RTC Mode 3 (Year-Month-Day) The Year-Month-Day Mode 3 allows the RTC coil acting based on Year, Month, and Date. The configuration dialog below (example 1) allows setting the workday between two different dates. Symbol Description RTC Year ON ①...
Page 103
Chapter 5 Relay Ladder Logic Programming Example 1: Example 2: Example 3: PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Page 104
Chapter 5 Relay Ladder Logic Programming RTC Mode 4 (30-second compensator) The 30-second compensator, Mode 4, allows the RTC coil acting based on week, hour, minute and second. The configuration dialog below shows the setting of week, hour, minute and second for the TRC mode 4. Symbol Description RTC adjustment week ①...
Page 105
Chapter 5 Relay Ladder Logic Programming ※ The present time will change to be 8:01:00 when it achieves 8:00:40, and RTC status bit R01 turns ON in one scan time. Then time keeps going and R01 turns OFF. PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Chapter 5 Relay Ladder Logic Programming C omparator Instructions The SG2 smart relay includes 31 comparator coils that can be used throughout a program. Each comparator has 8 different operation modes. Additionally, each comparator has 5 parameters for proper configuration. The table below describes each configured parameter, and lists each compatible element for configuring Comparators.
Page 107
Chapter 5 Relay Ladder Logic Programming 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. 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.
Chapter 5 Relay Ladder Logic Programming H MI Display Instructions The SG2 smart relay includes 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 current value and preset value for functions, Input/Output bit status, and text.
Page 109
Chapter 5 Relay Ladder Logic Programming 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), analog input/output value (A, AT, AQ). This information can not be edited through keypad.
Page 110
Chapter 5 Relay Ladder Logic Programming HMI status 1~4: 1. HMI scanning state, press SEL into HIM at IO interface 2. HMI running state, HMI is enabled at IO interface 3. HMI edit preparing state, press SEL when HMI is scanning or running state, flicker cursor will show if there is edited content.
Chapter 5 Relay Ladder Logic Programming P WM Output Instruction (DC Transistor Output Models Only) 1 0 B The transistor output model, T type, 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.
Page 112
Chapter 5 Relay Ladder Logic Programming Example: The state of M01, M02 and M03 are OFF-ON-OFF, so that PWM output pulse is at stage3 like this as setting above. The state of M01, M02 and M03 decide the duty cycle and frequency of PWM output. PWM stages can be changed by the status of M01, M02 and M03 when P01 is running.
Page 113
Chapter 5 Relay Ladder Logic Programming Example: The preset frequency and pulse number could be constant or the current value of other function. 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.
Chapter 5 Relay Ladder Logic Programming I O Link/Remote I/O Instruction (SG2-20Vxxx model only) 1 1 B 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.
Page 115
Chapter 5 Relay Ladder Logic Programming and the other IO Link instructions must be Mode 2 (Grab mode). The Mode 1: Write the ON/OFF states of the selected coils into the chosen W elements. The available W elements in the mode 1 depend on the ID setting of that unit, refer to the table in the previous page for more information.
Page 116
Chapter 5 Relay Ladder Logic Programming Or sending terminal Example 2: IO Link Mode 2 ② ③ Set ① = 2, = 5, = M03~M07 and ④ =W17~W21; when enabling the IO Link, the ON/OFF state of M03~M07 is controlled by the W17~W21. ①=1, ②...
Chapter 5 Relay Ladder Logic Programming M U (Modbus) (SG2-20Vxxx model only) 1 2 B MU function performs Modbus RTU communication at RS485 port. There are 15 MU coils: MU01~MU0F. Remote IO and IO Link have higher priority than MU to use RS485 port. MU is executed when the remote IO setting in the system is disabled (No Remote IO) and ID isn’t 0.
Page 118
Chapter 5 Relay Ladder Logic Programming ※ The max data length for Mode 1 and 3 is 25 words, it means 25 continuous addresses. The max data length for Mode 4 is 400bits. MU mode1: Read Registers Set parameter ③, address, to be constant: as show in below figure, the data length is fixed at 1 (it means read signal register only).
Page 119
Chapter 5 Relay Ladder Logic Programming MU mode2: Write single register Set parameter ③, address, to be constant: Function parameter display: Set a constant address as 0003, Set DRE0=1234 (hex: 04D2) as the content which would be written into other register. When enable the MU function, the sending out Modbus command will be 01 06 00 03 04 D2 CRC16;...
Page 120
Chapter 5 Relay Ladder Logic Programming MU mode3: Write Multiple Registers Set parameter ③, address, to be constant: Function parameter display: Set a constant address, 0003. Data length is fixed at 1word, means writing single register. Set data DRE0=1234 (hex: 04D2) as the content which would be written into other register.
Page 121
Chapter 5 Relay Ladder Logic Programming MU mode4: Read Coils Set parameter ③, address, to be constant: Function parameter display: Set a constant address 20 ( here is a Hex number) Data length is a constant value: 10 in Hex format When enable the MU function, the sending out Modbus command will be: 01 01 00 20 00 10 CRC16;...
Page 122
Chapter 5 Relay Ladder Logic Programming MU mode5: Write single coil Set parameter ③, address to be constant: Function parameter display: Set a constant address as 0003 Set DRE0=65280 (hex: FF00) as the content which would be written into other coil. When enable the MU function, the sending out Modbus command will be: 01 05 00 03 FF 00 CRC16;...
Page 123
Chapter 5 Relay Ladder Logic Programming Example: MU sending and receiving data via RS485 port when it’s enabled. Here recommends user to put the D-trigger element in front of the MU coil. MU01 and MU05 coils are controlled by T01 as shown in above figure. Set MU01 as mode1, read registers mode, address starts from DR11=14=0x0E, data length DR12=4, and saving data to the registers from DR01 to DR04.
Chapter 5 Relay Ladder Logic Programming S HIFT (shift output) 1 3 B The SG2 smart relay includes only one SHIFT coil that can be used throughout a program. This function switches a set of serial coils sequentially by trigger a certain input pulse coil. It has 4 parameters for proper configuration.
Chapter 5 Relay Ladder Logic Programming A Q (Analog Output) 1 4 B The AQ instructions must be used with extension analog out module, 2AO.The default output signal of AQ is 0~10V, the AQ value and the corresponding 12 bits data value are in the range of 0~1000 and 0~4095. It also can be assigned to output 0~20mA, in current mode;...
Page 126
Chapter 5 Relay Ladder Logic Programming Run the program and don’t conduct the M01 contact, DRD4 output value, now, equals to the constant preset value of AQ01, and AQ01 outputs 9.77V. Then enable the M01, the DRD4 output value is depending on the value of V01, changing the value of V01 also influences the output value of AQ01 and DRD4.
Chapter 5 Relay Ladder Logic Programming A S (Add-Subtract) 1 5 B The SG2 smart relay includes 31AS coils that can be used throughout a program. The AS function performs a simple integral-math-calculation: Addition and Subtraction. There are 6 parameters for proper configuration. table below describes each configuration parameter, and lists each compatible element for configuring AS.
Chapter 5 Relay Ladder Logic Programming M D (MUL-DIV) 1 6 B The SG2 smart relay includes 31MD coils that can be used throughout a program. The MD function performs a simple integral-math-calculation, Multiplication and Division. There are 6 parameters for proper configuration. table below describes each configuration parameter, and lists each compatible element for configuring MD.
Chapter 5 Relay Ladder Logic Programming P ID (Proportion- Integral- Differential) 1 7 B The SG2 smart relay includes 15 PID coils that can be used throughout a program. The PID function performs a simple integral-math-calculation which is according to the equation as shown in below. There are 9 parameters for proper configuration.
Page 130
Chapter 5 Relay Ladder Logic Programming Three types of PID controller: Proportional loop (P); Integral loop (I); Differential loop (D); (PID controller diagram) Proportional controller According to the difference (or error) EV between the target value and measuring value, this alters the adjustable value (or variables) ΔPI proportionally, then change the output (result) PI of the program control.
Page 131
Chapter 5 Relay Ladder Logic Programming Integral controller For smooth and stabilize the system once the EV value and is change drastically, integral control can delay the react of the system and shrink control loop variation. EV and time automatically adjust variable ΔPI. Integral controller characteristic: reduce variation, delay reaction time.
Page 132
Chapter 5 Relay Ladder Logic Programming Illustrate diagram for Kp, Ti , Td variable setting value to SV 1, Td and Ti setting value is large. Kp setting value is small. 2, Td and Ti setting value is small. 3, Kp setting value is large. A micro sampling time T setting, will consume lots of resource of controller and variation value won’t have sufficient change, A huge sampling time T...
Chapter 5 Relay Ladder Logic Programming M X (Multiplexer) 1 8 B The SG2 smart relay includes 15 MX coils that can be used throughout a program. This function set its current value to be 0 or one of 4 preset values which depends on the state of selection bit 1 and 2. There are 7 parameters for proper configuration.
Chapter 5 Relay Ladder Logic Programming A R (Analog-Ramp) 1 9 B The SG2 smart relay includes 15 AR coils that can be used throughout a pro gram. Each AR coils has 2 modes. AR mode 1 In mode1, AR current level is changed to either Level 1 or Level 2 according to the ON/OFF state of “Sel coil” at a specified rate.
Page 135
Chapter 5 Relay Ladder Logic Programming Timing diagram for AR The example below shows how to configure AR function. PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Page 136
Chapter 5 Relay Ladder Logic Programming AR mode2 In mode 2, it supports four different preset levels, but only one of these 4 preset levels can be target level at one time. The current level will change to target level at a designed rate. There are 12 parameters for proper configuration. The table below describes each configuration parameter, and lists each compatible element for configuring AR mode2.
Page 137
Chapter 5 Relay Ladder Logic Programming Timing diagram for AR Rate = MaxL/Ta; T1=Level0*Ta/MaxlL; T2= Level1- Level0 *Ta/MaxL; ( ) T3= Level1- Level2 *Ta/MaxL; T4= Level3- Level2 *Ta/MaxL; ( ) ( ) The example below shows how to configure AR function. PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Chapter 5 Relay Ladder Logic Programming D R (Data register) 2 0 B The SG2 smart relay includes 240 DR coils that can be used throughout a program. The DR function plays a important role in data-transmission. Its current value equals to preset value once it’s enabled. The data can be signed or unsigned by Operation>>module system set…menu selection from the SG2 Client software or keypad set.
Page 139
Chapter 5 Relay Ladder Logic Programming Data register screen on HMI display DR preset value in stop mode and display DR current value in run mode. STOP RUN (DR01 = C01 current value) DR65~DRF0 can retain the current value when SG2 is stopped or powered down. The last 40 DR registers that from DRC9 to DRF0 are special data register as shown below.
Chapter 6 FBD Block Diagram Programming FBD system memory space The size of a FBD program in SG2 is limited by the memory space (memory used by the blocks). Resources available in SG2: Block number System memory (byte) 6000 ※ Each FBD block’s size isn’t restricted, it depends its function.
Page 143
Chapter 6 FBD Block Diagram Programming Logic Block include: AND, AND EDGE, NAND, NAND EDGE, OR, NOR, XOR, NOT, RS, PULSE, ※ BOOLEAN. Each logic block occupied a BLOCK; the available number is limited by the number of B and system memory space.
Chapter 6 FBD Block Diagram Programming Analog Analog include: Analog input A01~A04 Expansion analog input A05~A08 Analog input count value V01~V08 Expansion temperature input AT01~AT04 Expansion analog output AQ01~AQ04 Analog input and output value can be used as preset value of other function blocks. Analog Input Number Range...
Chapter 6 FBD Block Diagram Programming Analog Output AQ instructions need to use with extension analog out module 2AO. The default output of AQ is 0~10V voltage, the 12bits data is 0~4095 and the corresponding value of AQ is 0~1000. It also can be set as 0~20mA current output, the 12bits data is 0~2047 and the corresponding value of AQ is 0~500.
Chapter 6 FBD Block Diagram Programming Coil Block Instruction Output coils including Q, Y, M, N, H, L, P, S. FBD menu display: H, L, P, S is special function coil, and press “OK” button into function display. Press the button: Into function display when cursor address is output coil and coil type is H, L, P, S.
Chapter 6 FBD Block Diagram Programming 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.
Chapter 6 FBD Block Diagram Programming PWM function block (only transistor output version) 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.
Page 149
Chapter 6 FBD Block Diagram Programming Example: The state of N01, N02 and N03 are 000, so PWM output pulse is stage1 like this as setting above: The state of N01, N02 and N03 decide PWM output. PWM stages can be changed by the status of N01, N02 and N03 when P01 is running.
Chapter 6 FBD Block Diagram Programming IO Link function block 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.
Page 151
Chapter 6 FBD Block Diagram Programming Example 1: IO Link Mode 1 Set mode=1, num=5, set type of points as 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: mode=1, num=5, type=I03~I07, ID=1 (W09~W13) Memory List Position...
Chapter 6 FBD Block Diagram Programming SHIFT function block 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. Press “SEL”...
Chapter 6 FBD Block Diagram Programming Logic Block Instructions Logic blocks display in FBD: Press the button: → Move cursor: input terminals ① → Logic block number ③ → display next connected block or coil ← Move cursor: Logic block number ③ →...
Chapter 6 FBD Block Diagram Programming NAND Logic Diagram FBD: LADDER: Not(I01 And I02 And I03) Note: The input terminal is NOP which is equivalent to ‘‘Hi”; The B output ON when one of the input terminals status is OFF; NAND (EDGE) Logic Diagram FBD: LADDER:...
Chapter 6 FBD Block Diagram Programming NOR Logic Diagram FBD: LADDER: Not ( I01 or I02 or I03 ) Note: The input terminal is NOP which is equivalent to ‘‘Lo”; The B output ON when all input terminals status are OFF; XOR Logic Diagram FBD: LADDER:...
Chapter 6 FBD Block Diagram Programming Pulse Logic Diagram FBD: LADDER: Note: The input terminal is NOP which is equivalent to ‘‘Lo”; The B output change status when input terminal OFF→ON; BOOLEAN Logic Diagram FBD: LADDER: Note: The input terminal is NOP which is equivalent to ‘‘Lo”; Description: The relationship between input and real table is shown below.
Chapter 6 FBD Block Diagram Programming Function Block Operation rules of FBD function blocks is basically same as ladder mode. Function blocks display in FBD: If cursor address is “Par”, user can press “OK” button into parameter display and edit preset value. Press the button: →...
Chapter 6 FBD Block Diagram Programming Timer Function Block There is a maximum of 250 timers function blocks under FBD mode, can be set mode 0~7 and the function is same as Ladder mode. ※ Timer Mode7 occupied one blocks and two timers. T0E and T0F keep their current value after a loss of power to the smart relay if “M Keep”...
Page 159
Chapter 6 FBD Block Diagram Programming (2) Timer mode 1 (ON-Delay A Mode) Mode 1 Timer 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. FBD display Parameter display Enable Input →...
Page 160
Chapter 6 FBD Block Diagram Programming (3) Timer mode 2 (ON-Delay B Mode) 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. FBD display Parameter display Enable Input →...
Page 161
Chapter 6 FBD Block Diagram Programming (4) Timer mode 3 (OFF-Delay A Mode) 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. FBD display Parameter display Enable Input →...
Page 162
Chapter 6 FBD Block Diagram Programming (5) Timer mode 4(OFF-Delay B Mode) 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. FBD display Parameter display Enable Input →...
Page 163
Chapter 6 FBD Block Diagram Programming (6) Timer mode 5(FLASH A Mode) 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. FBD display Parameter display Enable Input →...
Page 164
Chapter 6 FBD Block Diagram Programming (7) Timer mode 6(FLASH B Mode) 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. FBD display Parameter display Enable Input →...
Page 165
Chapter 6 FBD Block Diagram Programming (8) Timer mode 7(FLASH C Mode) 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.
Chapter 6 FBD Block Diagram Programming Common Counter function block There is a maximum of 250 counter function blocks under FBD mode, can be set mode 0~6 as common counter and mode 7~8 as high-speed counter, and the function is same as Ladder mode. Counter edit and display: FBD display: Parameter display:...
Page 167
Chapter 6 FBD Block Diagram Programming (2) 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.
Page 168
Chapter 6 FBD Block Diagram Programming (3) 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.
Page 169
Chapter 6 FBD Block Diagram Programming (4) 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, 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.
Page 170
Chapter 6 FBD Block Diagram Programming (6) 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.
Page 171
Chapter 6 FBD Block Diagram Programming (6) Counter Mode 6(Continuous Count, Up-Down Count, Retentive) Mode 6 Counter’s operation is similar to Mode 5 except its current count value is continuous and retentive. FBD display Parameter display Counting Input → Up/Down Counting → ←...
Chapter 6 FBD Block Diagram Programming High Speed Counter Function Block (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.
Page 173
Chapter 6 FBD Block Diagram Programming (2) 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”...
Chapter 6 FBD Block Diagram Programming RTC Comparator Function Block There is a maximum of 250 RTC function blocks under FBD mode, can be set mode 0~4 and the function is same as Ladder mode. (1) RTC Mode 0(Internal Coil) Mode 0 RTC (Internal Coil) used as internal auxiliary coils.
Page 175
Chapter 6 FBD Block Diagram Programming (2) RTC Mode 1(Daily) The Daily Mode 1 allows the Bxxx (Rxx) coil to active based on a fixed time across a defined set of days per week. The below example1 allows for selection of the number of days per week (i.e. Mon-Fri) and the Day and Time for the B002 (R01) coil to activate ON, and the Day and Time for the B002 (R01) coil to deactivate OFF.
Page 176
Chapter 6 FBD Block Diagram Programming (3) RTC Mode 2 (Continuous) The Interval Time Mode 2 allows the Bxxx (Rxx) coil to activate based on time and day per week. The below example1 allows for selection of Day and Time for the B002 (R01) coil to activate ON, and Day and Time for the B002 (R01) coil to deactivate OFF.
Page 177
Chapter 6 FBD Block Diagram Programming (4) RTC Mode 3 (Year Month Day) The Year-Month-Day Mode 3 allows the Bxxx (Rxx) coil to activate based on Year, Month, and Date. The below example1 allows for selection of Year and Date for the B002 (R01) coil to activate ON, and Year and Date for the B002 (R01) coil to deactivate OFF.
Page 178
Chapter 6 FBD Block Diagram Programming (5) RTC Mode 4(30-second adjustment) The 30-second adjustment Mode 4 allows the Bxxx (Rxx) coil to activate based on week, hour, minute and second. The below examples show for selection of week, hour, minute and second for the B002 (R01) coil to activate ON, and 30-second adjustment then B002 (R01) OFF.
Chapter 6 FBD Block Diagram Programming Analog Comparator Function Block There is a maximum of 250 analog comparator function blocks under FBD mode, can be set mode 0~7 and the function is same as Ladder mode. (1) Analog Comparison Mode 0 (Internal coil) Mode 0 analog comparator (Internal Coil) used as internal auxiliary coils.
Page 180
Chapter 6 FBD Block Diagram Programming (2) Analog Comparison Mode 1~7 Analog comparator mode 1~7, setting three parameters, analog input Ax, analog input Ay and reference value G. Analog Comparator mode 1: (Ay- reference value G)≤Ax≤(Ay+ reference value G) , output ON; Analog Comparator mode 2: Ax≤Ay, output ON;...
Page 181
Chapter 6 FBD Block Diagram Programming Analog Comparison Mode 3 FBD display Parameter display Enable Input → ← Analog Input ← Analog Input Parameter → ← Reference B003 (G01) output ON when the value of A01 is not lower than the value of A05; Parameter display current value of Ax and Ay when running mode;...
Chapter 6 FBD Block Diagram Programming AS (ADD-SUB) function block There is a maximum of 250 AS (Addition and Subtraction) function blocks under FBD mode, and the function is same as Ladder mode. − Compute formula: 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.
Chapter 6 FBD Block Diagram Programming MD (MUL-DIV) function block There is a maximum of 250 MD (Multiplication and Division) function blocks under FBD mode, and the function is same as Ladder mode. MD = Compute formula: 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 or parameter V3 is zero.
Chapter 6 FBD Block Diagram Programming PID (Proportion- Integral- Differential) function block There is a maximum of 30 PI (PID) function blocks under FBD mode, and the function is same as Ladder mode. PID computes formula: − ⎧ ⎫ Δ −...
Chapter 6 FBD Block Diagram Programming MX (Multiplexer) function block There is a maximum of 250 MX (Multiplexer) function blocks under FBD mode, and the function is same as Ladder mode. This special function transmits 0 or one of 4 preset values to MX current value memory by selection control coils S1 and S2.
Chapter 6 FBD Block Diagram Programming AR (Analog-Ramp) function block There is a maximum of 30 AR (analog ramp control) function blocks under FBD mode, and the function is same as Ladder mode. (1)AR mode1 Function description: AR current value: 0~32767 AR will keep the current level at “StSp + Offset "B"”...
Page 187
Chapter 6 FBD Block Diagram Programming Example: FBD display: Enable Input → Select level input Sel → Stop input St → Parameter → Parameter display: Parameter display 1 Parameter display 2 AR current value → ← Start/Stop level Preset level1 → ←...
Page 188
Chapter 6 FBD Block Diagram Programming (2)AR mode2 Function description: AR current value: 0~32767 AR will vary form 0 to current level at a preset rate when it’s enabled. Base on Level0:0~32767 the state of Sel1 and Sel2, Current level will change to other preset level at the Level1:0~32767 preset rate.
Chapter 6 FBD Block Diagram Programming Example: FBD display Parameter display Program display Enable Input → Select l → SEL+←/→ Select2 → Parameter → Display AR current value when running mode; ※ PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Chapter 6 FBD Block Diagram Programming DR (Data-Register) function block There is a maximum of 240 DR (data register) function blocks under FBD mode, and the function is same as Ladder mode. The DR function is transferring data. DR sends data from prevention registers to current register and output coil Bxxx ON when it’s enabled.
Chapter 6 FBD Block Diagram Programming MU (Modbus) function block There is a maximum of 250 MU (Modbus) function blocks under FBD mode, can be set mode 1~5 and the function is same as Ladder mode. Remote IO and IO Link are precedence than MU. MU is executed when the system setting is N (No Remote IO) and ID isn’t 0.
Page 192
Chapter 6 FBD Block Diagram Programming MU mode1: Read Registers Setting communication address is constant: Address is constant 0003, Data length is fixed at 1word, Send data: 01 03 00 03 00 01 CRC16; Received response form slave1: 01 03 02 data1 data2 CRC16; Saving date to DRE0: DRE0 = data1~2 Mode1 FBD display...
Page 193
Chapter 6 FBD Block Diagram Programming MU mode2: Write single register Setting communication address is constant: Address is constant 0003, Setting data DRE0=1234 (hex: 04D2), Send data: 01 06 00 03 04 D2 CRC16; Received response from slave1: 01 06 00 03 04 D2 CRC16; Mode2 FBD display Parameter display...
Page 194
Chapter 6 FBD Block Diagram Programming MU mode3: Write Multiple Registers Setting communication address is constant: Address is constant 0003, Data length is fixed at 1word, Setting data DRE0=1234 (hex: 04D2), Send data: 01 10 00 03 00 01 02 04 D2 CRC16; Received response from slave1: 01 10 00 03 00 01 CRC16;...
Page 195
Chapter 6 FBD Block Diagram Programming MU mode4: Read Coils Setting communication address is constant: Address is constant 32 (hex: 0020), Data length is fixed at 16 (hex: 10H, 1word), Send data: 01 01 00 20 00 10 CRC16; Received response from slave1: 01 01 02 data1 data2 CRC16;...
Page 196
Chapter 6 FBD Block Diagram Programming MU mode5: Write single coil Setting communication address is constant: Address is constant 0003, Setting data DRE0=65280 (hex: FF00), Send data: 01 05 00 03 FF 00 CRC16; Received response from slave1: 01 05 00 03 FF 00 CRC16; Mode5 FBD display Parameter display...
Chapter 7 Hardware Specification Chapter 7: Hardware Specification Normal Specification ............................190 Product Specifications............................191 Power Specifications............................192 Normal model machine Specifications ....................... 192 12V DC model Specifications........................193 24V AC model Specifications ........................193 Power circuitry diagram..........................194 Input Specifications............................. 195 100~240V AC model ..........................
Chapter 7 Hardware Specification Normal Specification Content Specification Mode of user program Ladder & FBD Operation temperature -4° to 131°F (-20° to 55°C) Storage temperature -40° to 158°F (-40° to 70°C) Environmental Maximum Humidity 90% (Relative, non-condensing) Operation Gas No corrosive gases 0.075mm amplitude, 1.0g acceleration Maximum Vibration according to IEC60068-2-6...
Normal model machine Specifications content SG2-10HR-A SG2-20HR-A SG2-20HR-D SG2-12HR-D SG2-10KR-A SG2-20KR-A SG2-20KR-D SG2-12KR-D SG2-10CR-A SG2-20HT-D SG2-12CR-D SG2-20KT-D SG2-12HT-D SG2-12KT-D SG2-12CT-D operation AC 100~240V AC 100~240V DC 24V DC 24V Power range Voltage Rating AC 85~265V AC 85~265V DC 20.4~28.8V DC 20.4~28.8V...
Chapter 7 Hardware Specification 12V DC model Specifications content SG2-12HR-12D SG2-20HR-12D Voltage Rating DC 12 V DC 12 V operation Power DC 10.4~14.4 V DC 10.4~14.4 V range instantaneous power down time 10 ms / 10 times (IEC 61131-2) 1ms/ 10 times (IEC 61131-2) allowable fuse Need connect a fuse or breaker of...
Chapter 7 Hardware Specification Power circuitry diagram AC 10/20 points DC 12V,DC 24V Mainframe, expansion and communication PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Chapter 7 Hardware Specification Input Specifications 100~240V AC model content SG2-10HR-A SG2-10KR-A SG2-20HR-A & SG2-20KR-A SG2-10CR-A Input circuitry I01~I06 I01~I09, I0A, I0B, I0C number digital input digital input Signal current AC 110V AC 220V AC 110V AC 220V input 0.66mA 1.3mA 0.55mA 1.2mA...
Chapter 7 Hardware Specification 24V DC, 12 I/O model content SG2-12HR-D & SG2-12KR-D & SG2-12CR-D SG2-12HT-D &S G2-12KT-D & SG2-12CT-D Analog input used Normal digital input High speed input as normal digital Analog input input Input I03~I06 I01,I02 I09,I0A circuitry...
Chapter 7 Hardware Specification 24V DC, 20 I/O model content SG2-20HR-D & SG2-20KR-D SG2-20HT-D & SG2-20KT-D Analog input used Normal digital input High speed input as normal digital Analog input input Input I03~I08 I01,I02 I09,I0A,I0B,I0C circuitry number Signal current 3.1mA/24V DC 3.1mA/24V DC 0.63mA/24V <0.17 mA/10V...
Chapter 7 Hardware Specification 12V DC, 12 I/O model content SG2-12HR-12D Analog input used Normal digital input High speed input as normal digital Analog input input Input I03~I06 I01,I02 I09,I0A circuitry number Signal current 3.2mA/12V DC 3.2mA/12V DC 0.32mA/12V <0.17 mA/10V input ON current >1.875mA/7.5V...
Chapter 7 Hardware Specification 12V DC, 20 I/O model content SG2-20HR-12D Analog input used Normal digital input High speed input as normal digital Analog input input Input I03~I08 I01,I02 I09,I0A,I0B,I0C circuitry number Signal current 3.2mA/12V DC 3.2mA/12V DC 0.63mA/12V <0.17 mA/10V input ON current >1.875mA/7.5V...
Chapter 7 Hardware Specification Inductance Load There will be a surging voltage (KV) when the inductance load switches between ON and OFF, especially for the relay model. The methods to different power mode to absorb the surging voltage are shown below. a.
Chapter 7 Hardware Specification Size diagram of SG2 10/12 points 20 points I3 I4 I5 I6 A2 A3 DC 24V Input 12 x DC(A1...A4=0~10V) SG2-20HR-D Output 8 x Relay / 8A PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Chapter 8 20 Points RS485 type Models Instruction Only SG2-20VR-D, SG2-20VT-D, SG2-20VR-12D do have RS485 communication function. Communication function There are many parameters needed to be set before user uses the RS485 communication function. And there are two ways to set that parameter. ●.
Page 213
Chapter 8 20 Points RS485 type Models Instruction Function parameters: ID SET ID setting (00~99) REMOTE I/O Remote I/O Mode (N: none M: Master S: Slave) Function description: Function ID SET REMOTE I/O Description Up to 2 additional SG2 units can be configured as Remote IO function 00~99 M &...
Chapter 8 20 Points RS485 type Models Instruction Detail instruction Remote IO function Function Description: Remote IO function can make one SG2 as master link to another SG2 as slaver; the master can perform its program, but the slaver can’t. The ON/OFF state of the output coil Q in slaver will affect the ON/OFF state of the expansion output coil Y in master.
Chapter 8 20 Points RS485 type Models Instruction IO Link Function Function Description: Up to 8 SG2 units can be linked together as the IO Link Network. Each unit runs their own logic program; the ON/OFF state of input, output points, and Auxiliary Coils in each one can be assigned to “W Table”, see the next page for more information.
Page 216
Chapter 8 20 Points RS485 type Models Instruction Example: 1. Link 8 20 pointes RS485 models SG2 according to the steps of the Hardware Configuration. 2. Create a ladder program as show below in those 8 SG2. L 01 3. Set L01 of the SG2 which’s ID =7 as fellow illustration. 4.
Chapter 8 20 Points RS485 type Models Instruction MU instruction (Modbus RTU master) MU function performs Modbus RTU communication at RS485 port. There are 15 MU coils can be used in ladder mode, MU01~MU0F, and up to 250 MU function blocks diagram in FBD mode. There can be several MU commands executed at the same time, but only one command can be performed, the rest are postponed until the performed one is accomplished.
Page 218
Chapter 8 20 Points RS485 type Models Instruction ① MU mode (1~5) ② ID number of the target unit: range from 0 to127 The address of target register in that unit: 1) address is assigned to a constant, range from 0000 to ffff; •...
Chapter 8 20 Points RS485 type Models Instruction Modbus RTU slave function Function Description: SG2 unit can be controlled by the computer or other controller using the communication control. PC and other controller can read and write IO state, preset value of the elements and the setting of the unit. It also can use to read the current value of the element and control the Run/Stop mode of SG2.
Page 220
Chapter 8 20 Points RS485 type Models Instruction Exception Code The controller responses the Exception Code and send Function Code added 80H to main system if there is error happened. Exception Code Description Frame error (Function Code error, Register Encoding error, Data Quantity Error) Command can not be carried out in the RUN mode Command can not be carried out in Cipher mode Data value is over range...
Page 221
Chapter 9 Expansion Module Chapter 9: Expansion Module Summarize ................................214 Power .................................. 216 Size..................................216 Digital IO Module............................... 219 Analog Module ..............................223 Analog Input Module 4AI........................... 223 Temperature Input Module 4PT ........................224 Analog Output Module 2AO........................225 Communication Module .............................
Chapter 9 Expansion Module Summarize Digital Input/Output module: SG2-8ER-A, SG2-8ER-D, SG2-8ET-D, SG2-8ER-24A Analog Input module: SG2-4PT, SG2-4AI Analog Output module: SG2-2AO Communication module: MBUS, DNET, PBUS, EN01(TCP/IP), GSM SG2 V type, H type and K type can connect with expansion module. The maximal connectible number to the expansion module is: 3 Digital IO modes, 2 Analog Output modes, 2 Analog Input modules (one 4PT and one 4AI) and 1 Communication module.
Page 223
Chapter 9 Expansion Module There are two kinds of digital models: version 1.2 and version 3.0. They can connect with SG2 together. There are 3 kinds of connecting way for expansion modules as shown below. Only the EN01 and GSM module need to PL01 to connected with SG2. Mainframe + digital IO (V1.2/V3.0) * 3 + 4AI*1+COMM.*1 ※...
Chapter 9 Expansion Module Power The input voltage, current and power consumption for each expansion module is listed as below table: Module Voltage Current Power SG2-MBUS 24 Vdc 80 mA 1.92w SG2-4AI 24 Vdc 70 mA 1.68w SG2-DENT 24 Vdc 50 mA 1.2w SG2-PBUS...
Page 225
Chapter 9 Expansion Module Installation ※ All the expansion modules (except EN01 and GSM module) installation method is the same as shown below. X1 X2 Input 4 × AC AC 100~240V SG2-8ER-A Output 4 x Relay / 8A PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Page 226
Chapter 9 Expansion Module 0.14...1.5 0.14...0.75 0.14...2.5 0.14...2.5 0.14...1.5 26...16 26...18 26...14 26...14 26...16 (0.14in) lb-in DANGER: HAZARDOUS VOLTAGE Cut off all power before maintenance Electric shock will result in death or serious injury. PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Chapter 9 Expansion Module Digital IO Module The SG2 must set the number of expansion IO when connect with expansion module. The method of setting IO number is shown below. 1) Keypad 2) SG2 Client software PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Page 228
Chapter 9 Expansion Module Expansion display State Installation and Wiring E type of expansion module: SG2-8ER-D/8ET-D, SG2-8ER-A/8ER-24A PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Page 229
Chapter 9 Expansion Module Wiring 1) 24V DC power input 2) 24V/100~240V AC power input 3) Relay Output S G 2-8 E R -A O utp ut 4 x R ela y / 8 A PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Page 230
Chapter 9 Expansion Module 4) Transistor output SG2-8ET-D OUTPUT 4 x TR/0.5A ①-1A quick-blowing fuse, circuit-breaker or circuit protector ②-Surge absorber (43V DC) ③-Surge absorber (Input 24VAC:43V; Input 100~240VAC:430V AC) ④-Fuse, circuit-breaker or circuit protector ⑤-Inductive load AC inductive load needs to connect Surge absorber in parallel way to absorb the noise if the SG2 output ※...
Chapter 9 Expansion Module Analog Module The maximal connectible number of Analog expansion module to SG2 is 2*2AO, 1*4PT and 1*4AI. Analog Input Module 4AI The 4 channel 12bits analog input module, 4AI, has the corresponding registers, A05~A08, DREC~DREF, DRE4~DRE7. It can accept either 0~10V or 0~20mA signal, the range of the measured value is different which depends on the input signal mode.
Chapter 9 Expansion Module Temperature Input Module 4PT The 4 channel 12bits temperature (PT100) analog input module, 4PT, has the corresponding registers with AT01~AT04. content standard Temperature input range -100℃~600℃ Digital output -100.0℃~600.0℃ 0.1℃ Differentiation ±1﹪ Definition The input value of SG2-4PT is over range if wiring error or no input, SG2 will not update the corresponding channel, and the corresponding Error coil (M) turns ON.
Chapter 9 Expansion Module Analog Output Module 2AO SG2 main unit can connect with two 2-channel, 12bits analog output module, 2AO, at the same time. The close one will be auto-assign to AQ01~AQ02, and the other is distributed to AQ03~AQ04. It can out 0~10V voltage signal or 0~20mA current signal, and the data in the 12bits data register, DRD4~DRD7, will determined the output of AO channel.
Page 234
Chapter 9 Expansion Module ※ When the preset value in “Analog Output Set” screen is a constant, this value will be stored in DR register, (DRD4~DRD7) and the AQ value equals to (DRx/4.095). For example, CH1 is configured as mode 1, set a constant value, 4000, then the value of AQ01 will be 977, and HMI displays 9.77V.
Chapter 9 Expansion Module Communication Module MBUS Module Summarize MBUS module makes SG2 without the ability of communication control be controlled with other controller via RS 485 Modbus protocol. MBUS just can make SG2 work as slaver, responses the request of master, but it can’t work as master.
Page 236
Chapter 9 Expansion Module Connect with electrical source Input 24VDC ①-1A quick-blowing fuse, circuit-breaker or circuit protector. ②-Surge absorber. Communication set The MBUS communication baud rate and format can be set by 8 switches (DIP), SW1. Baud rate SW1-1~SW1-3 set communication baud rate is 4.8K, 9.6K, 19.2K, 38.4K, 57.6K as shown below. SW1-1 SW1-2 SW1-3...
Page 237
Chapter 9 Expansion Module Address The ID of MBUS module, whose range is from 0H used for broadcast address to 63H, must be the one of the ID setting of SG2 basic unit. Modify the ID number of the SG2 main unit, this new ID is effective when restart the power or it dose not receive any communication command within 0.5s.
Chapter 9 Expansion Module DNET Module Summarize DNET makes SG2, which doesn’t have the ability of DeviceNet, to work in DeviceNet network. At DeviceNet side, DNET is a GROUP 2 ONLY equipment, slave equipment in this network. At PLC side, DNET communicate with SG2 through SG2 COMM.
Page 239
Chapter 9 Expansion Module Connect with electrical source Input 24VDC ①-1A quick-blowing fuse, circuit-breaker or circuit protector. ②-Surge absorber. Connect with DeviceNet network Using 5-pin network tie-in connected DNET to DeviceNet bus. Please use network tie-in and cable ordained by ODVA.
Page 240
Chapter 9 Expansion Module SW1_7~SW1_8: Baud rate SW1-7 SW1-8 Baud Rate 125K 250K 500K Reserved (default baud rate: 125K) LED state display DNET has two LED lights, watching itself and communication Bus’ state. 1) mode state LED (MS) Double color LED (green and red) indicates DNET state. Module status LED Explanation Correct or prevent fault...
Chapter 9 Expansion Module PBUS Module Summarize PBUS makes SG2, which can’t work in ProfiBus DP network, to work in ProfiBus DP network. At ProfiBus DP side, PBUS mode is a gateway, a slave node in network. At PLC side, PBUS communicate with SG2 through SG2 COMM.
Page 242
Chapter 9 Expansion Module Connect with electrical source Input 24VDC ①-1A quick-blowing fuse, circuit-breaker or circuit protector. ②-Surge absorber. Connection with Profibus Net Using 9-hole pin to connect with PROFIBUS DP bus, please use the regulated pin and cable. Ports assign: name description reserved...
Page 243
Chapter 9 Expansion Module Baud rate adapt oneself and address set After PBUS mode powers up, it can identify the baud rate on Profibus automatically when at least one master sends right message. The baud rate range is: 9.6Kbit/s ~6Mbit/s. In equipment network, each slave node has a difference ID, and the maximal number of ID is 127 (0~126).
Chapter 9 Expansion Module EN01 (TCP/IP) Module Summarize EN01 makes SG2 to work in TCP/IP network, read, write and monitor program by software PC Link. EN01 Cell Configuration ①: 9-hole socket (PL01 connect with SG2) ②: Flexed installation feet ③: TCP/TP port ④: Button ⑤: Power indicate light (orange) ⑥: 24V DC power supply port...
Page 245
Chapter 9 Expansion Module Connect with electrical source ①-1A quick-blowing fuse, circuit-breaker or circuit protector. ②-Surge absorber. Communication (product EN01) Verification Check: If powered up correctly, the EN01 Evaluation Board power LED indicator lights orange and remains on. Install Device 1.
Page 246
Chapter 9 Expansion Module Configure You can use Local area network or Ethernet to configure this module. In the Ethernet this module need to have the IP address that can visit. You can obtain the IP address through the Network address Translation or The manager of the Ethernet.
Page 247
Chapter 9 Expansion Module 4. Click the Search icon and choose it. 5. Click the Ping icon → Ping button. The results display in the Status area, make sure the unit is properly attached to the network and that the IP address assigned is valid for the particular network segment you are working with.
Page 248
Chapter 9 Expansion Module 7. Click Start in the Windows Taskbar, → Programs → Lantronix → Redirector → Configuration. Click Com Setup button, A Port Setup dialog box displays; Click all the logical ports to which the PC will be redirected. Click Com Setup 8.
Page 249
Chapter 9 Expansion Module 10. To hide the pop-up window, check Silent Mode on the Com Port Redirector Configuration window. 11. Click Save button and Close button. Note: After completing this Configure, you can Link and control your product. Choose the Com port and click Link button. PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Appendix: Keypad Programming Appendix: Keypad Programming Appendix A: Keypad programming in Ladder mode ....................243 Appendix B: Keypad programming in Ladder FUNCTION BLOCK..............247 PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Appendix: Keypad Programming Appendix A: Keypad programming in Ladder mode Operation Sample: 6 7 8 Column Line 1 > L A D D E R F U N . B L O C K P A R A M E T E R R U N Procedure 1: 6 7 8...
Page 252
Appendix: Keypad Programming (Press ‘SEL’ + ‘← →’ to move the cursor to the position Required revision. Automatically Link Procedure 7 : 6 7 8 Column Line 1 q 0 4 ⎯ Press ‘OK’ (Move the cursor to character in column 3) Automatically Link Procedure 7 :...
Page 253
Appendix: Keypad Programming (move the cursor to column 2) Note: never press ‘SEL’ before hand Change Wire ‘ -’ to ‘ I ’ Procedure 13 : 6 7 8 Column Line 1 q 0 4 ┬ M 0 1 ⎯ I 0 3 ⎯ ( Q 0 1 Press ‘SEL’...
Page 254
Appendix: Keypad Programming (The digital 1 the cursor locating will change to 7) Procedure 20 : 6 7 8 Column Auto Enter Function ┌ 1 ┐ Press ‘OK’ Line 1 Block Edition 2 L o w ┤ │ (Auto shift to FUNCTION BLOCK │...
Appendix: Keypad Programming (‘ESC’ Cancel , ‘OK’ Execute) 4 E S C Insert a whole line. 6 7 8 column line 1 q 0 4 ┬ M 0 1 ⎯ I 0 3 ⎯ ( Q 0 1 ┴ r 0 3 ⎯ ⎯ ⎯ ⎯ ⎯ ( C 0 7 Step: 6 7 8 column...
Page 256
Appendix: Keypad Programming 4 N 0 1 ┴ ┘ Step 2: modify ①present target value ②preset the action relay Preset the target value Procedure 2-1: 6 7 8 Column Press ‘←’ Line 1 ┌ 1 ┐ 1 ┤ │ (move the cursor to the preset action │...
Page 257
Appendix: Keypad Programming │ V 0 1 S e c ├ T 0 1 ┴ ┘ Repeat the step 2-3A, following screen will be shown in turn: Step2-3B: 6 7 8 column Press ‘SEL’ line 1 ┌ 1 ┐ 1 ┤ │...
Page 258
Appendix: Keypad Programming ┴ ┘ Step 2-3J: 6 7 8 column Press ‘SEL’ line 1 ┌ 1 ┐ 1 ┤ │ │ P I 0 1 S e c ├ T 0 1 ┴ ┘ Step 2-3K: 6 7 8 column Press ‘SEL’...
Page 259
Appendix: Keypad Programming ┴ ┘ Procedure 2-9: 6 7 8 Column Press ‘↑’ Line 1 ┌ 1 ┐ 2 ┤ │ (Press ‘SEL’ + ‘ ↑/↓’ │ 3 3 . 3 3 S e c ├ T 0 1 to change ‘1’ to ‘ 2’) ┴...
Page 260
Appendix: Keypad Programming 4 L o w ┴ ┘ Procedure 2-16A: 6 7 8 Column Press ‘SEL’ Line 1 ┌ 4 ┐ 2 ┤ │ (Begin to modify ) │ 3 3 . 3 3 S e c ├ T 0 1 4 I 0 1 ┴...
Page 261
Appendix: Keypad Programming 4 M 0 4 ┴ ┘ Procedure 2-21: 6 7 8 Column Press ‘↑’ Line 1 ┌ 4 ┐ 2 ┤ │ (Move the cursor to preset action │ 3 3 . 3 3 S e c ├ T 0 1 value area to repeat the step 2-1) 4 M 0 4 ┴...
Page 262
Appendix: Keypad Programming Continue to input Function Block Method1: Next Function Block 6 7 8 Column ┌ 4 ┐ Line 1 2 ┤ │ │ 3 3 . 3 3 S e c ├ T 0 1 4 M 0 4 ┴ ┘...
Page 263
Appendix: Keypad Programming 6 7 8 Column ┌ 4 ┐ Press ‘↓’or ‘↑’ 1times 2 ┤ │ │ 3 3 . 3 3 S e c ├ T 1 1 4 M 0 4 ┴ ┘ 6 7 8 Column Press ‘→’...
Page 264
Appendix: Keypad Programming Method 1: Move the cursor to change to T, C, R, G, H, L, P, S, AS, MD, PI, MX, AR, MU Step 1: 6 7 8 Column Press ‘SEL’ Line 1 ┌ 4 ┐ 1 ┤ │...
Page 265
Appendix: Keypad Programming Step8: 6 7 8 Column Press ‘SEL’ Line 1 ┌ 1 ┐ 1 ┤ │ 3 L o w ┤ Q 0 1 ⎯ Q 0 1 ├ S 0 1 ┴ ┘ Step 9: 6 7 8 Column Press ‘SEL’...
Page 266
Appendix: Keypad Programming Step 14: 6 7 8 Column Press ‘SEL’ Line 1 ┌ 1 ┐ │ │ │ 0 0 0 1 ├ M U 0 1 ┴ D R 0 1 ┘ Step 15: 6 7 8 Column Press ‘OK’...
Page 267
Appendix: Keypad Programming │ │ │ ├ H 0 1 ┴ ┘ Press ‘↓’ Press ‘↑’ Step6: 6 7 8 Column Line 1 ┌ 1 ┐ 1 ┤ I 0 1 ⎯ I 0 1 │ ↓ ↓ ├ L 0 1 │...
Page 268
Appendix: Keypad Programming │ 0 0 0 0 0 ├ N o p │ 0 0 0 0 0 ├ P I 0 1 ┴ 0 0 0 . 0 1 ┘ Step 11-B: 6 7 8 Column Press ‘SEL + →’ Line 1 ┌...
Page 269
Appendix: Keypad Programming │ 3 3 . 3 3 S e c ├ T 0 1 4 M 0 4 ┴ ┘ Step 16: 6 7 8 Column Line 1 ┌ 4 ┐ Press ‘↑’ 8 times or Press ‘↓’ 7 times 2 ┤...
Page 270
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor...
Need help?
Do you have a question about the SG2-12HT-D and is the answer not in the manual?
Questions and answers