What is WinGRAF l A Programming Tool supports

  • Slides: 43
Download presentation

What is Win-GRAF? l A Programming Tool supports IEC 61131 -3 Standard l Programming

What is Win-GRAF? l A Programming Tool supports IEC 61131 -3 Standard l Programming Languages: Ladder Diagram Function Block Diagram Structured Text Sequential Function Chart Instruction List l An Useful Debugging Tool 2 (LD) (FBD) (ST) (SFC) (IL)

Win-GRAF Workbench Available on Windows XP/7/8/10 (32 -bit or 64 -bit) l Delivered with

Win-GRAF Workbench Available on Windows XP/7/8/10 (32 -bit or 64 -bit) l Delivered with a Win-GRAF USB Dongle. l It becomes Trial (Demo) Version if without the USB Dongle. Program Editor Variables FBD & others Message 3

Protocols embedded in the Win-GRAF PAC l l l 4 Modbus TCP (Slave, Master)

Protocols embedded in the Win-GRAF PAC l l l 4 Modbus TCP (Slave, Master) Modbus RTU (Slave, Master) Modbus UDP (Master) Modbus ASCII (Master) HART (Master) DCON (ICP DAS I-7000 series modules, RU-87 P 8/P 4 + I-87 xxx. W cards, I-87 K 8/K 4 + I-87 xxx. W cards)

Ladder Diagram 5

Ladder Diagram 5

ST 6

ST 6

FBD 7

FBD 7

SFC 8

SFC 8

Uses ST in Graphical Editor FBD LD 9

Uses ST in Graphical Editor FBD LD 9

Win-GRAF PAC (Programmable Automation Controller) l WP-8148/8448/8848 l WP-8128 -CE 7/8428 -CE 7/8828 -CE

Win-GRAF PAC (Programmable Automation Controller) l WP-8148/8448/8848 l WP-8128 -CE 7/8428 -CE 7/8828 -CE 7 l WP-5238 -CE 7 (1 x LAN) l VP-1238 -CE 7 ( 5. 7”, 3 x I/O Slots) VP-2208 -CE 7 ( 7” , w/o I/O Slot) VP-4208 -CE 7 (10. 4”, w/o I/O Slot) VP-4238 -CE 7 (10. 4”, 3 x I/O Slots) l XP-8048 -CE 6/8348 -CE 6/8748 -CE 6 10

Various Local I/O Modules (1) (Plugged in the PAC) 11 Digital Input (DI) I-8040

Various Local I/O Modules (1) (Plugged in the PAC) 11 Digital Input (DI) I-8040 W, I-8046 W, I-8051 W, I-8052 W, I-8053 PW, I-87040 PW, I-87046 W, I-87051 W, I-87052 W, I-87053 PW, I-87053 W-A 2, I-87053 W-A 5, I-87053 W-E 5 Digital Input/Output (DIO) I-8042 W, I-8050 W, I-8054 W, I-8055 W, I-87042 W, I-87054 W, I-87055 W Digital Output (DO) I-8037 W, I-8041 AW, I-8056 W, I-8057 W, I-87037 W, I-87041 W, I-87057 PW Relay Output I-8060 W, I-8063 W, I-8064 W, I-8068 W, I-8069 W, I-87061 PW, I-87063 W, I-87064 W, I-87065 W, I-87066 W, I-87068 W-2 A, I-87069 W, I-87069 PW AC Input I-8058 W, I-87053 W-AC 1, I-87058 W, I-87059 W Analog Input (AI) I-8017 DW, I-8017 HCW, I-87017 RW, I-87017 RCW, I-87017 DW, I-87017 EW, I-87018 RW, I-87018 PW, I-87018 ZW, I-87019 PW, I-87019 RW, I-87019 ZW Analog Output (AO) I-8024 W, I-87024 CW, I-87024 UW, I-87024 DW, I-87024 RW, I-87024 W, I-87028 CW, I-87028 UW, I-87028 VW-20 V

Various Local I/O Modules (2) (Plugged in the PAC) Multifunction (DIO, AIO) I-87026 W

Various Local I/O Modules (2) (Plugged in the PAC) Multifunction (DIO, AIO) I-87026 W Thermister I-87005 W RTD I-87013 W, I-87015 PW T/C I-87018 W, I-87018 RW, I-87018 PW, I-87018 ZW, I-87019 PW, I-87019 RW, I-87019 ZW Temperature Input 12 HART I-87 H 17 W Strain Gauge I-87016 W Counter/Frequency Input I-8084 W, I-87082 W, I-87084 W Encoder Input I-8093 W PWM Output I-8088 W Communication Module I-8112 i. W, I-8114 i. W, I-8142 i. W, I-8144 i. W Temperature & Humidity Input DL-100 T 485, DL-100 T 485 -W, DL-100 T 485 P-W (DCON Protocol) DL-100 TM 485, DL-100 TM 485 -W, DL-100 TM 485 P-W (Modbus RTU Protocol)

Win-GRAF Features Create your own C Function & Function Blocks 13

Win-GRAF Features Create your own C Function & Function Blocks 13

Win-GRAF Features Working With VB. net , C# App. 14

Win-GRAF Features Working With VB. net , C# App. 14

Win-GRAF Features Protect your Software n Win-GRAF PAC is equipped with a unique 64

Win-GRAF Features Protect your Software n Win-GRAF PAC is equipped with a unique 64 -bit serial number. It can be used to generate a license key to protect the software against illegal copy. WP-8 xx 8 15 WP-8 xx 8

Win-GRAF Features Multi-Modbus Master 16

Win-GRAF Features Multi-Modbus Master 16

Win-GRAF Features Multi-Modbus TCP/RTU Slave 17

Win-GRAF Features Multi-Modbus TCP/RTU Slave 17

Win-GRAF Features DCON Remote I/O 18

Win-GRAF Features DCON Remote I/O 18

Win-GRAF Features Local & Web HMI n Support remotely device control by using a

Win-GRAF Features Local & Web HMI n Support remotely device control by using a smart phone, tablet, or laptop. 19

Win-GRAF PAC Features Controller Redundancy #1 n n 20 LAN 1: Public port (to

Win-GRAF PAC Features Controller Redundancy #1 n n 20 LAN 1: Public port (to connect the SCADA) LAN 2: Replication port (to synchronize data between two PACs) RS-232: Alive port (to detect the PAC living) Even one cable can make the redundancy work

Win-GRAF PAC Features Controller Redundancy #2 n SCADA just connects to the Active_IP n

Win-GRAF PAC Features Controller Redundancy #2 n SCADA just connects to the Active_IP n The two PAC will automatically switch Active_IP and Passive_IP n The project will be automatically restored to the new one 21 ICP DAS www. icpdas. com service@icpdas. com

Win-GRAF PAC Features Data Binding n Can get data from max. of another 16

Win-GRAF PAC Features Data Binding n Can get data from max. of another 16 PACs 22

Win-GRAF PAC Features Schedule Control n Supports “Schedule-Control Utility” (freeware) n One PAC can

Win-GRAF PAC Features Schedule Control n Supports “Schedule-Control Utility” (freeware) n One PAC can implement max. 10 Targets (devices) with different schedule control. n Can apply schedule in Day, Holiday, Special Day, Season, Year. 23

Win-GRAF PAC Features On-line Change n n 24 Change the code of a program

Win-GRAF PAC Features On-line Change n n 24 Change the code of a program (LD, ST, IL) Change the condition of a SFC transition or the actions of a SFC step Create, rename or delete global and local variables Create, rename or delete global and local function block instances

Win-GRAF PAC Features Recipe 25

Win-GRAF PAC Features Recipe 25

Win-GRAF PAC Features PID Control n One PAC can handle more than 200 PID.

Win-GRAF PAC Features PID Control n One PAC can handle more than 200 PID. 26

Win-GRAF PAC Features HART Master n Support the I-87 H 17 W that plugged

Win-GRAF PAC Features HART Master n Support the I-87 H 17 W that plugged in the PAC to communicate with other HART devices. 27

Win-GRAF Features Intelligent Win-GRAF 3 G Solution 28

Win-GRAF Features Intelligent Win-GRAF 3 G Solution 28

Basic Concepts For Programming 29

Basic Concepts For Programming 29

Variables • Name : Starting with “A” ~ “Z” Case insensitive , “MOT” is

Variables • Name : Starting with “A” ~ “Z” Case insensitive , “MOT” is same as “mo. T” Can use 0 ~ 7 or “_” for 2 nd ~ *th character • Input / Output variable only appear in I/O boards • Function block instance variables must assign type as a function block name, for example, the type of the Inst_TIME_GET variable must be TIME_GET. 30

Variable Types Type BOOL (*) SINT USINT BYTE INT UINT WORD DINT (*) UDINT

Variable Types Type BOOL (*) SINT USINT BYTE INT UINT WORD DINT (*) UDINT DWORD LINT Bits --8 bits (Small int, signed) Value range TRUE,FALSE -128 ~ +127 8 bits (Unsigned small int) 0 ~ +255 16 bits (Int, signed) -32768 ~ +32767 16 bits (Unsigned int) 0 ~ +65535 32 bits (Double int, signed) -2147483648 ~ +2147483647 32 bits (Unsigned double int) 0 ~ +4294967295 64 bits (Large int, signed) -263 ~ +(263 -1) ULINT (No support) 64 bits (Unsigned large int) LWORD (No support) No support the Win-GRAF PAC. REAL (*) LREAL STRING (*) *: Common TIME (*) 31 32 bits (Floating point) 64 bits (Floating point) Max. 255 characters 32 bits 0 ~ +(264 -1) ± 3. 4× 10 -38 ~ ± 3. 4× 1038 ± 1. 7× 10 -308 ~ ± 1. 7× 10308 --T#0 ms ~ T#23 h 59 m 59 s 999 ms

TIME Variable • • Value : T#23 h 59 m 59 s 999 ms

TIME Variable • • Value : T#23 h 59 m 59 s 999 ms Always positive, “-T#5 s “ is wrong “T#10. 5 s” is wrong, “T#10 s 500 ms” is correct Can tick / stop / reset a time variable t. Start(TIME_VAR 1) ; t. Stop(TIME_VAR 1) ; TIME_VAR 1 : = T#0 s ; 32

Type Conversion • Math calculation should use same type. Wrong : DINT 01 :

Type Conversion • Math calculation should use same type. Wrong : DINT 01 : = REAL 01 + 5 ; Correct: DINT 01 : = Any_To_DINT(REAL 01) + 5 ; • Comparing value should use same type. Wrong : if DINT 01 > REAL 01 then Correct: if Any_To_REAL(DINT 01) > REAL 01 then 33

Type Conversion Functions • Help on Win-GRAF workbench, search “conversion” Any_To_BOOL , Any_to_SINT Any_To_INT

Type Conversion Functions • Help on Win-GRAF workbench, search “conversion” Any_To_BOOL , Any_to_SINT Any_To_INT , Any_To_DINT Any_To_LINT , Any_to_REAL Any_To_LREAL , Any_To_TIME Any_To_STRING , NUM_To_STRING BIN_To_BCD , BCD_To_BIN 34

Function Block Instance 35

Function Block Instance 35

ST Basics 1 • (* Here is comment *) • Each statement ends with

ST Basics 1 • (* Here is comment *) • Each statement ends with a “; ” A : = B + C ; (* “: =“ means assign *) if A <= D then (* do operations … *) end_if ; 36

ST Basics 2 • “: =“ means assignment A : = B * 5

ST Basics 2 • “: =“ means assignment A : = B * 5 ; (* correct *) A = B * 5 ; (* wrong *) • “=“ means “are they equal ? ”, result is TRUE or FALSE if A = B then (* correct *) end_if ; if A : = B then (* wrong *) end_if ; 37

Call a Function in ST • Return_val : = fun_name(par 1, par 2, …)

Call a Function in ST • Return_val : = fun_name(par 1, par 2, …) ; or fun_name(par 1, par 2, …) ; example: OK 1 : = COM_OPEN( 2 , ‘ 9600, N, 8, 1’ ) ; 38

Call a Function Block in ST • First declare a FB instance , type

Call a Function Block in ST • First declare a FB instance , type = FB name • fb_instance_name(par 1, par 2, …) ; Return 1 : = fb_instance_name. out_par 1; Return 2 : = fb_instance_name. out_par 2; … example: my_unpack 8 (type “unpack 8”) my_unpack 8( BYTE 1) ; BOO 0 : = my_unpack 8. Q 0 ; … BOO 7 : = my_unpack 8. Q 7 ; 39

Have a try Runtime Driver for PAC Note: The Win-GRAF Driver can run only

Have a try Runtime Driver for PAC Note: The Win-GRAF Driver can run only 2 hours on the controller (PAC) without runtime license. 40 ICP DAS www. icpdas. com service@icpdas. com

Have a try Developer for PC • Available on Windows XP/7/8/10 • Limitation in

Have a try Developer for PC • Available on Windows XP/7/8/10 • Limitation in Demo Mode: – Applications are limited to 40 I/Os – The code generated by the compiler and run in the controller (PAC) stops after 15 minutes – The simulation on PC stops after 15 minutes 41 ICP DAS www. icpdas. com service@icpdas. com

Further Information http: //www. icpdas. com/root/product/solutions/softplc_based_on_pac/win-graf/download. html 42 ICP DAS www. icpdas. com service@icpdas.

Further Information http: //www. icpdas. com/root/product/solutions/softplc_based_on_pac/win-graf/download. html 42 ICP DAS www. icpdas. com service@icpdas. com

泓格科技股份有限公司 Thank you! ICP DAS www. icpdas. com service@icpdas. com 43

泓格科技股份有限公司 Thank you! ICP DAS www. icpdas. com service@icpdas. com 43