Home
User‟s Manual of ISaGRAF® PAC
Contents
1. The voltage value converted from 18017H 0 7 i8024 0 3 Output Variable array Dim declared as 4 link to I 8024 s Ch1 to Ch 4 For counting time The time to get and save next record T1_Interval The interval time between two record Msgl Message Internal Operation state message Len is 255 init as No Action now addr as 41 Hex is 29 Len is 255 internal use User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 56 IO connection w ISaGRAF DEMO_71 I O connection total_record q HTMP To_Blink4FSH_ record_cntt T 500ms4CLK_ Display progress L1 L2 L3 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 57 When finished blink L1 to 3 ST program Sim_out Output I 8024 s Chl to Ch4 as different voltage curve 2 Pi T1 60000 T1 1 047197E 4 2 Pi TL 120000 T1 5 235985E 5 i8024 0 ANAC sin REAL T1 1 047197E 4 3276 8 i8024 1 ANA cos REAL T1 5 235985E 5 3276 8 18024 2 ANAC sin REAL T1 1 047197E 4 6553 6 18024 3 ANA cos REAL T1 5 235985E 5 6553 6 if INIT then INIT FALSE set as False to only do it once at 1st PLC scan if ava_num_S8256 0 then S256 S512 is not installed in I 8xx7 return Msg1 S256 S512 is not installed in I 8xx7 controller Return end_if Allocate 256 512 memory of byte No 1 to 200 000 for file
2. DE HUA WS to eB oemrm 7 demo Timer control TP TON TOF ALD Program demo 02 Start stop and reset timer TSTART TSTOP ST QLD demo 03 RAN system date amp time SYSDAT_R SYSDAT W SYSTIM_R SYSTIM_W QLD demo 04 Calculate empty cycle time TP 1 QLD m demo 05 Blinking output TP BLINK QLD x Reference Simple LD Project Author ICP DAS USA Inc E Date of creation 12 15 2001 Yersion number 1 ISaGRAF 3 41 Description Simple Example Of n LD Program Create new project BX Name FBD_Exam 10 configuration none gt After you have created the new project double click on the FBD_Exam name in the ISaGRAF Project Management window to open the new FBD project Click on the Create New Program icon in the TSaGRAF Programs window which will open the New Programs window First enter Main in the name field and selecte FBD Function Block Diagram in the Language field You can add a comment about your program but it is not mandatory Then click on the OK button LISAGRAF Project Management La File Edit Project Tools Options Help BS OOO MS to o G demo 01 Timer control TP TON TOF LD simpleld X Simple LD Program demo_02 Start stop and reset timer TSTART TSTOP ST QLD demo_03 RAN system date amp time SYSDAT_R SYSDAT W SYSTIM_R SYSTIM_V QLD demo 04 Calculate empty cycle time TP 1 QLD iet Reference FBD_Exam
3. I O library definition For ISaGRAF PAC Modem_Link utility Auto scan I O utility The ISaGRAF Workbench software program must be installed before attempting to install the ICP DAS Utilities for ISaGRAF If you have not already installed the ISaGRAF Workbench program please refer to section 1 1 before continuing There is a CD ROM supplied with each of the ISaGRAF controllers with the ICP DAS Utilities for ISaGRAF Please insert the CD ROM into your CD ROM drive Then run setup exe in the folder of CD ROM napdos isagraf Follow the steps to install it User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 1 6 v ICF DAS Utilities for SeGRAF ICP DAS Utilities for ISaGHAr Welcome to the ICP DAS Utilities for IS aGARAF Setup program This program will install ICF DAS Utilities for ma ISaGRAF on your computer Ibis strongly recommended that you exit all Windows programs before running this Setup program Click Cancel to quit Setup and then close any programs you have running Click Next to continue with the Setup program WARNING This program is protected by copyright law and international treaties Unauthorized reproduction or distribution of this program or any portion of it may result in severe civil and criminal penalties and will be prosecuted to the masimum extent possible under law Next gt Cancel Note If setup exe is not in your CD ROM please download ICP DAS
4. 1801 7H 4 variable array Dim 6 6 amp i8017H 5 variable array Dim 8 1801 7H 6 variable array Dim 8 l 1801 7H variable array Dim 3 aa a a o a a ee E ail E aail E Eal ee ee A aail E Eal E Eaa Hol kollo ul foo anle aal a e la 7a un User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 73 ST program Sim_out Output I 8024 s Chl to Ch4 as different voltage curve 2 Pi T1 60000 T1 1 047197E 4 2 Pi T1 120000 TI 5 235985E 5 i8024 0 i8024 1 ANAC sin REAL T1 1 047197E 4 3276 8 ANAC cos REAL T1 5 235985E 5 3276 8 18024 2 ANAC sin REAL T1 1 047197E 4 6553 6 18024 3 ANA cos REAL T1 5 235985E 5 6553 6 W 8xx7 can have max speed of 100Hz to record data minimum sample interval is 10 ms This example assume max 8 Ch so 1 second will record 100 x 8 REAL value 1 minute will record 100 x 8 x 60 48 000 REAL value If period is set as 10 minute we need 48 000 x 10 480 000 REAL value memory 480 000 x 4 1 920 000 bytes if INIT then INIT False Allocate 500 000 integer or 32 bit REAL space to store records up to 10 minutes total 500 000 x 4 2 000 000 bytes W 8xx7 support only No 1 Arcreate up to 3 000 000 integer space that is 12 000 000 bytes The first parameter in ARcreate should be 1 it doesn t support 1st parameter as 0 2 Ds sae LO Arc
5. Example IL Program meee SaGRAF IL_EXAM HELLO IL program Ati x Begir Fie Edt Tools Options Help Da OA MS xd E g TRUE FALSE LD AND OR XOR SUB MUL DIV LE EQ Declaring The Example IL Variables This example IL program uses the same variables as the example FBD program OUT1 OUT2 and the integer variable A1 Refer to Section 2 1 1 3 Declaring The Variables for assistance Use the same procedure for the Connecting I O and Compiling the program as detailed in Section 2 1 2 and 2 1 3 and use the same procedure to Simulate the program as detailed in Section 2 3 2 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 51 When you have connected the I O and compiled the example IL program click on the Simulate icon and the following window will appear D ISaGRAF IL_EXAM HELLO IL ror Ee x File Edit Search Options Help File Tools Options D ae A Heh Line Label Inst 0000 0001 0002 FALSE 0003 0 0004 0005 TRUE Because the variable A1 value is 0 OUT1 is set to false and OUT2 is set to true Change the value of Al to a value greater than 5001 and you will see that OUTI1 is set to true and OUT2 is set to false ISaGRAF IL_EXAM Global integers reals File Edit Tools Options Help owe Addr Value Comment 0000 5001 Simulate Temperature Input Line Label Inst i Comment User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS
6. end_if end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 18 10 5 3 Wpdmo_55 Read 20 Integer values from a file Total 2 rows each contains 10 Integer values The Wpdmo_55 pia can be found at WP 8xx7 CD ROM napdos isagraf wp 8xx7 demo or ftp ftp 1icpdas com pub cd winpac 8xx7 napdos isagrat wp 8xx7 demo If functions of Msg_F Msg N ARY_F_R AFY_F_W are not found in your PC ISaGRAF please download ICP DAS utilities For ISaGRAF at http www icpdas com products PAC 8000 isagraf htm gt Driver Then run setup exe to restore them to your ISaGRAF workbench The Wpdmo_55 program will read 20 Integer values from System_Disk data55 txt when the WP 8xx7 is just power up or user set the RE LOAD value to become TRUE at any time To read write file in the System_Disk take lots of CPU time please do not read write it frequently And please always close the file after the operation If user read write file in every PLC scan cycle the PLC scan time will become a very big time It will be a bad performance To test this sample program please edit a text file data55 txt in your PC by for example Notepad Please enter 2 rows each contains 10 Integer values Then download this data55 txt to WP 8xx7 s System_Disk folder by ftp utility The content of the data55 txt looks like below 1 1 2 3 4 5 6 7 8 9 1
7. strl fm_read Filel Read one row as String message Convert this string to some REAL values and store them into No 1 Float array NUMI1 Msg F str1 1 if data number of last row is not correct if 12 num_rowl 1 and NUMI1 lt gt last_numl or non last row must have 10 REAL values ii2 lt gt num_rowl 1 and NUMI1 lt gt 10 then error it means the format is not correct REAL values or data number is not enough exit exit for loop end_if conversion Ok store these REAL values to F_VALI if 12 num_rowl 1 then last row num2 last_numl last row has only last_num1 number of data else num 10 non last row has 10 data end_if Get these converted REAL values from No 1 Float array s addr 1 to 10 or 1 to last_num1 for last row for jj2 0 to num2 1 do F_VALI 10 ii2 jj2 ARY_F R 1 jj2 1 end_for end_for User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 28 Any file been open should be closed by f_close TMP2 f_close Filel All rows are read Ok if 12 num_rowl then read_F1l TRUE return value as TRUE Ok end_if This function write 20 REAL value F_VAL1 0 19 to file return save_f1 as TRUE Ok FALSE Error save_fl FALSE 3 set as FALSE Error at the beginning Filel f_creat File _namel Creat a new file to write i
8. Baud_Port2 to Baud_Port5 setting can be 600 1200 2400 4800 9600 19200 38400 57600 or 115200 Delay_time2 to Delay_time5 setting can be 0 or 1 to 10000 unit is 0 001 second It specifies the delaying milli seconds before replying to the PC HMI SCADA software Why dealy Please refer to the description of Chapter 3 3 3 Note 1 The XP 8xx7 Atom CE6 and XP 8xx7 CE6 support RTU slav and RTU_slv2 to expand max 8 another Modbus RTU slave ports 2 The WP 8xx7 VP 25W7 VP 23W7 and WP 5xx7 support only the RTU slav to expand max 4 another Modbus RTU slave ports User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 24 3 3 5 Using dis_stop to disable enable the ISaGRAF Download function For some reason to prevent someone to use ISaGRAF software to stop or to download a different controller project already running in the ISaGRAF PAC the Dis_stop can be applied Please connect dis_stop at a slot No larger than 8 and init the channel value to become TRUE Then stop download command is not allowed in this controller om ISaGRAF T5 I O connection O x File Edit Tools ptons Help Bl pBSrn tl FRAIS E man reft FF EI o Enable Stop Lo e W dis stop n x To disable Dis_stop to accept stop download command please run the original ISaGRAF project to link to this controller and set the channel value to become False Please refer Cha
9. Demo_23 Comary_R Comary_W Demo 35a E EEE EHEER EE EERE FER User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS Receive message and then send to COM3 in X507 8 9 and Using S MMI and Timer control command tStart tStop Time synchronization by using Fbus between two or more controllers Demo_35A should be used with Demo_35B demo If the time is modified in 35A the time in controller running 35B will be automatically modified User can modify the program to use Ebus Bus7000b X107 X507_8_9 X107 mbus Bus7000b Bus7000b Xbi8 set as virtual X50x X50x X50x Fbus_m 11 4 hame Demo 35b Time synchronization by using Fbus between two or more Fuss controllers Demo_36 Get driver version of the I 8xx7 7188EG XG i X607_608 Xbi8 virtual D D Xbos virtual D O Demo 43 SMS demo Please modify to your own phone number in the SMS ee ISaGRAF dictionary window Demo_43a Same as Demo_43 but sending SMS to two cell phone SMS X607_608 Demo_44 PC download data to X607 X608 Xbo8 virtual D O Demo_48a Redundancy I 7188XG redundant Master ore Demo_48b Redundancy I 7188XG redundant slave a Demo_50 PWM I O demo Pulse Width Modulation X107 Demo_5la Redundancy I 7188EG redundant Master a Demo_51b Redundancy I 7188EG redundant slave pe Ebus_s D I counters using DI_CNT I 7188 X107 Demo 61 Do something when D I signal happens A LU Send message to COM2 or COM3
10. FAQ Software ISaGRAF 062 Important Please set these two I 8437 80 s Net ID to the same No for ex setting as No 1 And the IP should be different but in the same domain For ex setting as 192 168 1 8 and 192 168 1 9 Mask should all set to 255 255 255 0 Demo program demo_49a and demo_49b ftp ftp 1cpdas com pub cd 8000cd napdos isagratf 7 188ee demo PC HMI SCADA can connect to this bus7000 redundancy system with only one IP of the i 7188EX MTCP NS 205 as i J P ww 7 PSA ail PC HMI SCADA i 7188EX MTCP COM2 Ethernet Modbus TCPIIP protocol Modbus RTU RS 485 P protocol _COM3 RS 485 Pa Pin 1 D Ping D i 7520R R5485 I 7000 I 7000 IL 8 7E45 8 9 ro FO I 87K FQ Cable Pin Assignment i 843 7 80 slot0 8054 Redundant Master COM1 Controller da status input Ebus Ethernet gt in i 8054 Cross cable 843 7 80 slotO 8054 Padandant Slave i 7520R RS232 i 8437 30 COM1 RS232 Male Male TXD 2 2 TXD I 7520R COM3 RS 485 RXD 3 3 RXD Pin 1 D Ping D GND 5 5 GND User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 16 Chapter 7 Controller To Controller Data Exchange Important Note The max boolean amp integer package No of Fbus amp Ebus reduce from 256 to 128 since driver version of I 8xx7 2 42 I 7188EG 1 32 I 7188XG 1 29 iP 8x
11. O Q L1 L2 L3 O E E VAL OUT VAL OUT 500 m 500 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 10 Click on Single text again set the associated Name as MSGI Caption as None Align as Left and un check Command variable E ISaGRAF DEMO_37 SF1 SpotLight OoOo 5 x File Edit Insert Options Help A 0ba yu mnla dws to SpotLight Demo 7 Caittearn Citar Button 1 Buttona ae me xi L1 Li Ea Cancel Color ae Back VAL_OUT 500 pmr else 4 eis p Caption Mone Font l Align Left a ja hal Back Color Move it to the prefered place and save it __BISaGRAF DEMO_37 SP1 SpotLight E oj xj Fie Edit Insert Options Help 8 OBA eter tee xB fd gee oo SpotLight Demo Button Button Buttons Button L1 Le L3 O IN IS VAL OUT VAL OUT 500 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 11 G Add Curve Click on Curve set the associated Name as VAL_OUT Scale as 5000 Color as red Back as gray Caption as Name Align as Top and un check Command variable E IeaGRaAF DEMO 34 untitled spotlight ie Edit Insert Optons Help 8 DO B a s nee oaee x lt f gw Ske e po Button Button Button Button Item style E x E Cancel YAL O l PEA 3 Direction Palee al Wwe al Color Ba
12. 4Q 1 2 OUT2 4QK1 3 OUT3 Kim ay User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS D1 IXx0 1 D2 IX0 2 D3 IX0 3 QX1 1 OUTI QX1 2 OUT2 QX1 3 OUTS 3 27 Now we can use the internal variables D1 through D3 and OUT1 through OUTS3 that have been created in other programs in the same project The newly created internal variables will generate input and output actions to the associated channels in this ST program IMPORTANT NOTE If once the input or output attributed variables have been connected to an connected IO board or complex equipment and if they would like to be replaced by Directly represented variables these input or output attributed variables have to be re attributed to internal and the board or equipment must be re connected to the slot m IoaGRAF SA I O connection File Edit Tools Options Help If you wish to replaced a pS wm tH RAIE these variables by directly i 8060 m ref 8060 represented variables m a OUTI re attributed them to 2 R o OUT2 internal attribution in the 3 3 Sy OUTS dictionary window 4 a 4 E sfa 6 ce a Clear slot and re connect again IMPORTANT NOTE If you enable the compiler option of upload option Comments for not connected I O channels must be choosed if Directly represented variables is used in this project refer to section 9 2 User s Manual Of ISaGRAF PAC Sep
13. D m dema mae aT ak proje q ptrol TP TON TOF QLD fbd exami me FBD Project simpleld Simple LD Program demo_02 Start stop and reset timer TSTART TSTOP ST QLD m demo 03 RAN system date amp time SYSDAT_R SYSDAT_W SYSTIM_R SYSTII m demo 04 Calculate empty cycle time TP 1 QLD rs Refer iit bug ni E x Autho Date Desci I0 Ea none gt Declaring The Example ST Variables as below content Refer to Section 2 1 1 3 Declaring The Variables for assistance Description initial value at TRUE TRUE means 1 scan cycle The first pushbutton on the front panel of the I 8xx7 The second pushbutton on the front panel of the I 8xx7 COUNT Integer Internal JA integer value generated by push K1 amp K2 initial value is set at 0 Creating a LD program LD1 with the below content Refer to Section 2 1 1 4 and 2 1 1 5 for assistance User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 39 Follow the same steps as 2 1 1 6 to create a ST program end_init with the below content INIT FALSE Creating a ST program ST1 with the below content Refer to Section 2 1 1 6 for assistance Open Com3 with 9600 baud rate 8 char size no parity stop bit at first scan cycle if INIT TRUE then TEMP comopen 3 9600 8 0 1 end_if Do something when K1 or K2 is pushed if M1 TRUE or M2 TRUE then COUNT plus 1 when K1 is pushed If M1 TRU
14. DO NOT wire two or more S_MB_ADR and FR_B_A in one row because they may not return TRUE Using 1 8172W s Port 1 in slot2 map 128 FRNET D O channels starting from Module Addr 0 Channel 1 to the DOUT array variable This sample will be DOUT O to 15 mapping as Module Addr 0 s Ch 1 to Ch 16 DOUTI 16 to 31 as Module Addr 1 s Ch 1 to Ch 16 DOUT 112 to 127 as Module Addr 7 s Ch 1 to Ch 16 For uPAC 7186EG FX 016 please set Slot_ and Port as 0 Using 1 8172W s Port 1 in slot 2 map 128 FRNET D I channels starting from Module Addr 8 Channel 1 to the DIN array variable This sample will be DIN O to 15 mapping as Module Addr 8 s Ch 1 to Ch 16 DIN 16 to 31 as Module Addr 9 s Ch 1 to Ch 16 DIN 112 to 127 as Module Addr 16 s Ch 1 to Ch 16 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 23 9 Chapter 24 Using COM Functions TO Read Write the RS 232 422 485 Port ICP DAS ISaGRAF controllers support below Serial COM Port RS 232 422 485 protocols Modbus RTU Slave Refer to Chapter 4 of the SaGRAF user s manual amp respective getting started manual 7000 and I 87xxx RS 485 I O _ Refer to Chapter 6 of the ISaGRAF user s manual Modbus RTU Master M 7000 Refer to Chapter 8 and 21 of the ISaGRAF user s manual Modbus ASCII Master Refer to Chapter 8 of the SaGRAF user s manual SMS Short Message Service Refer to Chapter 17 of the ISaGRAF use
15. Double click on the colored area below the Boolean tab and a Boolean Variable window will open Enter in the name of the variable to be used in the project For the purpose of this example program the variable Boolean Variable Name is INIT and Flag to indicate first scan cycle or not 1s added to the Comment Section The next item that must be declared is what type of Attribute the variable will possess In this example program INIT s attribute will be an Internal Lastly check on the set to true at init since we need INIT has its initial value as TRUE when the project 1s just power up to run Then press the Store button to save the Boolean variable that has been created SalRAF SIMPLELD Global booleans File Edit Tools Options Help Cd OOS exe Integers Reals Timers Messages FE instances Defined words tt 2 aq Attributes Internal C Input C Dutput C Constant Cancel Hext Jeta Previous Extended User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 7 The new Boolean variable has now been declared Note the other information areas that are provided for the programmer to fully explain how the variable will be handled W saltRAFk SIMPLELD Global boolean File Edit Tools Options Help Cd OOO HE KES RS Booleans IntegersiRe Hh Messages FB instances Defined words Mame Pi Addr Comment Flag to indica
16. ISaGEAF T5 LO connection Je m x Fie Edit Tools Optons Help SB PBSeo ELIFAS o em x60 603 mnj ref 121 B status t Module 608 a zi If the controller is I 7188EG XG uPAC 7186EG please connect X607 608 and enter the correct value 607 X607 608 X608 elelee User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 2 Examplel Set by variable name Please set all retain variables in the first PLC scan cycle as the below code and place this code on the top position of the project To_Retain is declared as an internal boolean variable with an initial value TRUE TMP is declared as an internal boolean variable Check is declared as an internal integer This Check1 is for detecting if all the retain values have been well initialized For example you can define the value 1357246 to mean all the initial value of retain variables have been well set And then if the Check1 value is 1357246 then allow the process to start If the Check1 value is not equal to 1357246 it means some retain variables havn t been set a proper value yet So the process can not start To run a program without the correct initial value for retain variables may cause some error So user must set proper value for all retain variables at least once And then remember to set this Check1 as 1357246 to well start the proces Then after the program
17. OO l2xed Xe Booleans Integers Reals Timers Messages FB instances Defined words Hame Attrib Addr Comment Intever Feal Variable Name NUK Network Address fs Attributes Format Integer standard C Real Internal E Input Cancel C Output Next C Constant initial value 0 7 oe Previous Extended Note If battery backup SRAM is found in the controller I 8xx7 256 S512 I 7188EG XG uPAC 7186EG X607 X608 WinCon 8xx7 S256 S512 Please use new retain function listed in the former section The old retain method has two disadvantage 1 The data will lose when download a modified ISaGRAF project 2 Its retain variable amount is less than new method User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 5 10 2 Data Backup To The EEPROM Data can be stored into the EEPROM The value will be always hold even the power is dead unless the value is updated It can be read freely however can be written only about to 100 000 times So it apply for saving the configured data To read a value from the EEPROM the following functions can be used EEP BR Read one boolean EEP BY_R Read one byte EEP WD_ R Read one word 2 bytes signed 32768 to 32767 EEP_N_R Read one integer 4 bytes signed EEP F R Read one REAL 4 bytes float If the related data saved in the EEPROM is not REAL format using EEP_F_R to read it may generate a controller local fa
18. Ophimize ranid check only the Ist Run two optimizer passes option fuild binary d Please refer to Chapter 2 6 TIME TO COMPILE THE PROJECT Now that you have selected the proper compiler options click on the Make Application Code icon to compile the example LD project If there is no compiler errors detected during the compilation process CONGRATULATIONS you have successfully created our example LD program If errors are detected during the compilation process just click on the CONTINUE button to review the error messages Return to the Project Editor and correct the errors as outlined in the error message window User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 28 ISaGRAF SIMPLELD Programs Gg 5 x File Make Project Tools Debug Tta Help SU AR E Rt oe FES B a iai Make application code Code Generator x K aR No error detected Begin Do you want to exit the Code Generator now Continue 2 1 4 Simulating The LD Project A powerful program debugging feature of the ISaGRAF software program is the ability to SIMULATE the program you have developed before loading it into the ISaGRAF controller system After successfully compiling the example LD program click on the SIMULATE icon as shown below gt SeGRAF SIMPLELD Programs File Maske Project Toole Debug Opton Help BS me om eo i om ea Begin HEA LOW fxample LO Program
19. STEP 10 for next step NUM NUM 1 plus valid received byte number by 1 TMP Array_w 2 NUM byt save other valid byte to byte array 2 if NUM gt 5 then command is too long drop it STEP 0 reset STEP TSTOP tout stop ticking tout tout T 0s reset tout NUM 03 reset NUM EXIT exit while loop end_if else STEP 0 not valid data reset STEP to 0 TSTOP tout stop ticking tout tout T 0s reset tout NUM 03 reset NUM end_if end_case end_while Check timeout Check timeout a valid complete If tout gt T 5s then if timeout command should be received in 5 STEP 0 reset STEP seconds TSTOP tout stop ticking tout tout T 0s reset tout NUM 03 reset NUM end_if reset STEP to 0 Valid command has been if STEP 21 then processed reset to STEP 0 TSTOP tout stop ticking tout tout T 0s reset tout NUM 03 reset NUM STEP 0 end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 32 SFC program Out 66 99 Each statement should end with a colon If Mode 1 run child program action If Mode 2 run child program action If Mode 3 run child program action3 MODE 1 MODE 2 MODE 3 1 3 4 B eee MODE 1 MODE gt 2 MODE gt 3 2 5 Gi 1 S
20. TMP_v ANA mid data 4 2 extract 4 bytes starting from string position 2 and then convert to an integer valid format if TMP_v gt 50 and TMP_ v lt 9999 then T1 TMR TMP_v convert to timer Msg_to_send Current T1 change to Msg TMP_v ms M2 TRUE Trigger to send a report message to sender else invalid format Msg_to_send Wrong command Val should be between T0050 to T9999 Current T1 remains at Msg Ana T1 ms M2 TRUE Trigger to send a report message to sender end_if end_if 1f mid data 1 1 T then end_if 1f Q1 then User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 17 4 ST program snd_msg if message sending status is not 1 busy if Msg_status lt gt 1 and SMS_available then Message sending status if M1 then alarm triggering 0 waiting for a new sending request 1 busy message is processing now 21 TMP SMS send to_who K1 is pushed The message is sent successfullly M1 FALSE 1 SMS system is not available 2 Timeout No response elsif M2 then Report triggering TMP SMS_send phone Msg_to_send report message back M2 FALSE Must disable it set to FALSE end_if after SMS_ send is called end_if More description of SMS_sts SMS_send SMS_ test SMS_ get amp SMS_ gets Please refer to ISaGRAF s On line Help Library C functions
21. Then you may check 1f the record file is uploaded to your PC at the same path 6 Then please open this record file trend1 js on M S Excel Please refer to section 11 3 6 step 6 Note You may run VB 6 0 Demo_6 in your PC to on line control this I 8837 80 via ethernet refer to section 11 2 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 55 ISaGRAF project architecture SaGRAF DEMO 71 Programs loj x File Make Project Tools Debug Options Help T Variable connect to show3Led s Ch 1 to Ch 3 Push K1 to start recording K4 to stop We use 4 channels in this demo Ch 1 to 4 Ava_num_s256 Connect to S256_512 s Ch 1 1f value is 0 it means can not find S 256 512 Current operating byte address in S 256 512 Len1 TMP_V File_begin1 Integer Constant The Begin amp End byte address in the S 256 S 512 allocated File_end1 for the record file STEP1 Recording state 0 No action l recording 2 finished How long to record unit is minute addr as 3 How long to save a record unit is ms addr as 1 Total_record1 Integer Internal How many records in this recording action This value is calculated by the ISaGRAF program automatically addr declared as 5 Current finished record count addr declared as 7 To use in for loops i8017H 0 7 Variable array Dim as 8 link to I 8017H s Ch1 to Ch 8 Volt1 0 7 REAL Internal Variable array Dim declared as 8
22. User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 12 9 7 Setting Comment Text For An ISaGRAF Project A useful feature of the IsSaGRAF Workbench program is the ability to create Comment Text that will be placed next to an ISaGRAF program name in the ISaGRAF Project Management window This way you can provide additional information about the purpose and any other additional comments regarding a particular ISaGRAF program To create Comment Text for an ISaGRAF program first open the ISaGRAF Project Management window click on the name of the ISaGRAF program you want to create the comment text for then select Edit from the menu bar and then click on Set Comment Text When you click on Set Comment Text the Project Comment Text window will open and now you can enter any comments and information you desire for the IsSaGRAF program you have selected ISaGRAF Project Management E x File Edit Project Tools Options Help Set comment text gt DemoPgm g mm ogge separator E trol TP TON TOF QLD FEE pean e FBD Project Move up in list le LD Program Ref Move down in list ple LD Project al Author ICP DAS USA Inc Tij Program name tt x A ISaGRAF Project Management Oj x File Edit Project Tools Options Help Be Ohm We t g Demm demo O01 Timer contro TP TON TOF QLD fbd exam Example FBD simpleld st_exam Reference
23. a ioixi Me Edt Tools Options Help Set board equioment a 5 re 24 N Push4key amp Show3Led is only a for the I 8xx7 and iP 8xx7 If your Le controller is other model number Z you can also connect Push4key amp Select hooro mn B xj Show3Led for simulation however please mark them as virtual board show3led 3 indication LED on Bx pas xa Simulate analog inputs xa08 Simulate analog outputs xbi8 Simulate boolean inputs xbo8 Simulate boolean outputs xm Simulate message mputs mof Simulate message outp Click on the I O Connection icon as shown in the top picture and the I O Connection window will appear as shown in the next illustration For the purpose of this example you can either double click on the 9 slot or just click on the 9 slot then click on Edit and then Set Board Equipment and then the I O Connection window will appear This now associates the four control panel pushbuttons push4key as four digital inputs We don t use it in this example program since there is no boolean variable declared with Input attribution User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 26 IMPORTANT NOTICE I O Slots 0 through 7 are reserved for REAL I O boards that will be used in the ISaGRAF controller You can use slots 8 and above for additional functionality as illustrated by the example program To create the I O connections for the
24. stri str1 0D 0A add lt CR gt lt LF gt at the end of each row Lenl MLEN str1 get string length data number larger than file s max allocated memory if Current_posl1 Lenl 1 gt File_end1 then STEP1 0 0 no action Msg File allocated memory is not enough to hold the data Tstop T1 T1 T Os To_Blink FALSE Set as FALSE not to blink the display value Return end_if TMP S_M_W Current_pos1 Lenl stri write all bytes in str1 to S256 S512 Current_pos l Current_pos1 Leni Current position move on TMP S_FL_AVL 1 1 Current_posl 1 Re caculate File s Head amp Tail Check 1f record number reach the end record_cntl record_cntl1 15 current record count plus 1 if record_cntl gt total_recordl then STEPI 2 2 recond finished Msg1 Record is finished You may download the record file to your PC now Tstop T1 T1 T 0s To_Blink FALSE Set as FALSE not to blink the display value end_if end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 60 11 3 8 How to do periodic operation in ISaGRAF controllers The BLINK function block can apply to generate a Pulse True periodically So it can apply in some periodic operations like as below LD program Pulsel is Boolean Internal Periodic operation every 2 sec Pulse 25
25. t boo_pack ana_pack X il User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 4 The parameter package_xxx_xxx at fbus_m boo_pack indicates the Boolean package number which is allowed to be written to or read from across the Fbus network The parameter value is given as a 32 bit integer in hexadecimal As an example if the package_1_32 is set to FFFFFFFF this will enable all the packages from number 1 to number 32 to be written to or read from across the Fbus network If the package _1_32 is set to a value of A this will only enable the number 2 and number 4 Boolean packages to be written to or read from across the Fbus network The more packages that are enabled on a Fbus network the slower the communication efficiency will be With this in mind always remember to enable only the required number of packages that you need for your application so you will have greater communication efficiency across the Fbus network a SaGRAF TEST 1 0 connection File Edit Tools Options Help 2 PBPOm tL FAK Se Only Package No 1 to 128 is available woa rel 102 as package 1 _32 0 mi package 33 _64 0 aus package 65 96 0 L4 mw package 97 128 0 wo package 129 160 0 6 mo package 161 192 0 mw package _193_224 0 mw package 225 256 0 Co m tbus m 4 rate n B boo_pack ana_pack 1 0 Board parameter x Parameter p
26. 10 5 1 Wpdmo_51 Read 10 REAL values from a file Total 10 rows each contains one REAL value The Wpdmo_51 pia can be found at WP 8xx7 CD ROM napdos isagraf wp 8xx7 demo or ftp ftp icpdas com pub cd winpac 8xx7 napdos isagrat wp 8xx7 demo If functions of Msg_F Msg _N ARY_F_R AFY_F_W are not found in your PC ISaGRAF please download ICP DAS utilities For ISaGRAF at http www icpdas com products PAC 8000 sagraf htm Driver Then run setup exe to restore them to your ISaGRAF workbench The Wpdmo_51 program will read 10 REAL values from System_Disk data5 1 txt when the controller is just power up or user set the RE LOAD value to become TRUE at any time To read write file in the System_Disk take lots of CPU time please do not read write it frequently And please always close the file after the operation If user read write file in every PLC scan cycle the PLC scan time will become a very big time It will be a bad performance To test this sample program please edit a text file data51 txt in your PC by for example Notepad Please enter 10 rows each contains one Real value Then download this data51 txt to WP 8xx7 s System_Disk V folder by ftp utility The content of the data51 txt looks like below 2 345 999 03 1 01 456 789 2 456 77 5 9E 12 32 3 45 1 33 3 Variables Len is 255 internal use Variable array Dim
27. 12 24 2001 ersion number 1 ISaGRAF 3 41 Description Example Structured Text Program Create new project i x Name 10 configuration Cancel none hd For the purpose of this example IL program I have created a new IL project name of IL_Exam Click on the OK button and the ISaGRAF Project Management window will appear with the new project name User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 50 Double click on the IL_Exam name and the ISaGRAF Programs window will appear Click on the Create New Program icon and the New Program window will appear Enter Hello in the name field and you can add a program comment if desired and make sure to select IL Instruction List from the language field click on the OK button when you are done A 1SaGRAF Project Management _ 15 x File Edit Project Tools Options Help Dal DEt mS t g 2 Demm F fbd_exam Example FBD Project an st_ exam Example ST Project Example IL Project n EES A Simple LD Program Ref SARETI et ee Maes ee tree AEF Aut Fie Make Project Tools Debug Options Help Dat ver A mSn ASO Sxe me SOR DEE nn NOOSA cH When you click on the OK button the ISaGRAF Programs window will open Double click on Hello and the ISaGRAF IL Program window will open ISaGRAF IL_EXAM Programs _ 5 x Fie Make Project Tools Debug Options Help D Be Ceo eur oH 29 Begin
28. 20 COM20 BAUD Integer baud rate 2400 4800 9600 19200 38400 57600 115200 CHAR Integer char size 7 or 8 PARI Integer parity O none l even 2 odd STOP Integer stop bit 1 or 2 Return boolean ok TRUE fail FALSE User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 37 Ary_N_W NUM ADR DATA Save one long integer into an integer array Parameter NUM nteger save to which array 1 6 ADR _ Integer save to which Pos in this array 1 256 DATA Integer the integer value to save Return boolean ok TRUE fail FALSE ComWrite PORT DATA Write one byte to a Com port Parameter PORT Integer 3 COM3 4 COMG4 20 COM20 DATA Integer the byte value O 255 to write Return boolean ok TRUE fail FALSE ComAy_NW PORT ARY_NO NUM POS Write an integer array to a Com port Parameter PORT Integer 3 COM3 4 COM4 20 COM20 ARY_NO Integer the array No to write 1 6 NUM Integer number of integers to write 0 256 POS Integer start position inside the array to write 1 256 Return boolean ok TRUE fail FALSE User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 38 The first step is to create a new project From the SaGRAF Project Management window click on the Create New Project icon and enter a project name ex ST_Exam 4 1SaGRAF Project Management i 5 x File Edit Project Tools Options Help AS peo re t g B Demam
29. 20mA HIV User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 11 Below table is for the I 7017RC and I 87017RCW no external 125 ohm resistor required I 7017RC 87017RC W Range type by DCON Utility Physical value Analog Input value Decimal ame Jo Jerr mama oD eoma A 0 20mA OmA om Please refer to the on line help for each I O module s table or refer to the Appendix D Please mouse double clik on the function block and click on Info then click on Note Be SaGRAF TESTI LD1 Quick LD Program oOj x File Edit Tools Options Help Aa Xes mp xd wr QQubhl ge FO 4b FS 4E Fa GH FS H Fe THE F7 JH FS yl Fo gt tS 7O1SN COMM_OK1S 7 gt x GET_SN get hardware unique serial Mo GET_VER Set Hardware Driver Version GETCTS Get CTS status HYSTER hysteresis Cancel FOOSsD ach Thermistor 2 comp Integer Inf Parameters 1_7018H xj Mut oo k ADR i _7018N m sue fry e MIT H2 ee NIS a Nid MISL i_r lSn Faster 8 CH Thermocouple Input l IEANS COMMUNICATION 15 BAD TH NIB_ integer Analog input valu amp ef channel 1 8 Win gt gt Max 32768 0 32767 modbus wal 8000 gt 0000 gt 7FFF User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 12 6 3 2 Setting a special ADR_ parameter of remote temperature input module to get clear Degree Celsius
30. E Declare local variables We need a boolean internal variable TMP SaGRAF W_EEF N STp O x File Edit Tools Options Help DAX he xed Elg IF Wi_ lt gt Dictionary JEN if value changed gt TMP EEP_N_WCADDR_ Ui_ gt k save it to the EEPROM y l EE nu nma z si vooo o o File Edit Tools Options Help a L as Boolean g INtegersiReals Timers Messages FB instances Defined words Attrib Addr C orm ment internal 0000 File Edit Tools Options Help Dal x gmg xad elg IF Savel gt V2_ THEN x if value changed gt THP FRAP HW LWfannh i w C canun at tna tha KERPROM 3 ISaGRAF W_EEP_N 8T program o lO x File Edit Tools Options Help g x A Show toolbar A Show Eewwords IF Wi_ lt gt Font IMP EE Tah setting oe Update diary L TE kbench Simulat EHD IF Update diary gt arkbench Simulator ISA68M TIC code for Motorola Compiler options E E xj Compiler options ISABEM TIC cade for Intel s hob L code fo te CCAM C source code W3 04 I Use embedded SFC engine Upload Suppress unused labels Optimize variable copying Optimize expressions Suppress unused code Optimize arithmetic operations Optimize boolean operations Build binary decision diagrams BDD s Evaluate constant expressions 0k User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 15
31. FA_READ Read one binary long integer 4 bytes signed from file FA_WRITE Write one binary long integer 4 bytes signed to file FM_READ Read one message string from file FM_WRITE Write one message string with lt CR gt lt LF gt char at end of message to file WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 VP 25W7 23W7 support below ICP DAS c functions F_APPEND Append one file to the end of the other file F_COPY Copy one file to another file F_CREAT Create a new file F_DELETE Delete a file F_DIR Create a new directory folder F_END move current file position to the End Of File position F_EXIST Test if a directory or a file exist F_SEEK Move current file position to a specified position F_READ_B Read one binary byte 0 255 1 byte unsigned from file F_WRIT_B_ Write one binary byte 0 255 1 byte unsigned to file F_READ_W_ Read one binary word 32768 to 32767 2 byte signed from file F_WRIT_W_ Write one binary word 32768 to 32767 2 byte signed to file F_READ_F Read one binary REAL 4 bytes Float from file Like 123 45 2 15E 03 F_WRIT_F Write one binary REAL 4 bytes Float to file Please refer to section 11 3 6 or below for demo program WP 8xx7 CD ROM napdos isagraf wp 8xx7 demo wpdmo_54 pia 55 56 51 50 1 or 2 or ftp ftp icpdas com pub cd winpac 8xx7 napdos isagrat wp 8xx7 demo User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 14
32. Fo Fa h He ee B2 erR w B3 erR pos 1 1 A1 pushtkey 1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 25 Chapter 10 The Retained Variable And Data Backup 10 1 The Retain Variable Note Read floating point value RETAIN_F RETAIN_X RETAIN_A from battery backup memory or S 256 512 amp X607 608 may cause controller fault if there is no floating point value saved inside Please refer to Section 10 6 Controller Fault Detection New Retain Function The I 8417 8817 8437 8837 I 7188EG XG W 8xx7 1P 8xx7 WP 8xx7 WP 5xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 VP 2xW7 VP 2117 uPAC 7186EG uPAC 5xx7 supports new retain function since below driver version I 7188EG X607 or X608 driver ver 2 05 or later better to be 2 17 or later I 7188XG X607 or X608 driver ver 2 04 or later better to be 2 15 or later UuPAC 7186EG X607 or X608 driver ver since they are released around Jan 2008 UPAC 5xx7 X W boards driver ver since they are released I 8xx7 S256 or S512 driver ver 3 07 or later better to be 3 19 or later W 83x7 83x6 S256 or S512 driver ver 3 18 or later better to be 3 36 or later with new back plane of WB 831 For 3 slot released in 2006 Rev 2 6 W 87x7 87x6 S256 or S512 driver ver 3 18 or later better to be 3 36 or later with new back plane of WB 871 For 7 slot released in 2006 Rev 2 8 The following controllers with a built in battery backup SRAM 1P 8x
33. Please run 7188xw exe in the PC and give command for ex gateway 10 0 0 254 if the gateway IP is 10 0 0 254 Please refer to ISaGRAF User s Manual appendix B The PC s command prompt windows can also request the Mail server s IP address We need it in the ISaGRAF program For example to request IP of msa hinet net please type command TraceRT msa hinet net as below Here is 168 95 4 211 a GOAN EI Documents and Settings Administrator TraceRT wmsa hinet net Facing route to msa hinet net 168 95 4 211 1 pwer a maximum of 36H hops lt 1 ms lt 1 ms 160 8 80 254 ms 1 ms 61 218 42 1 HIMET IP hinet net 61 218 42 11 ms 29 ms 16 218 42 254 ms ae ms tp s2 c7Y76r5 pouter hinet net 168 9582 206 ms 26 ms 228 128 2 234 HIMET IP hinet net 228 128 2 234 ms 2 ms 226 128 2 225 HINET IP hinet net 228 128 2 225 ms ms msa hinet net 168 95 4 211 1 Email demo download from www icpdas com gt FAQ gt Software gt ISaGRAF gt 067 076 has three example programs Wdemo 62 pia is the demo without attached file Wdemo_ 63 pia is the demo with one attached file For W 8xx7 WP 8xx7 WP 5xx7 VP 25W7 XP 8xx7 CE6 XP 8xx7 Atom CE6 Wdmo_63a pia is the demo with one attached file For uPAC 7186EG uPAC 5xx7 and iPAC 8447 8847 Please modify at least the below setting in the demo program to your own setting TMP MAIL_SET 1 chun icpdas com Receiver plea
34. Project Management r _ 5 x File Edit Project Tools Options Help AS Cam MS t 2 Z Demm F demo_ 01 Timer control TP TON TOF QLD Ho simplea A Simple LD Program demo 0 Start stop and reset timet TSTART TSTOP ST QLD demo_03 RAN system date amp tine SYSDAT_R SYSDAT_V SYSTIM_R SYSTIM m demo 04 Calculate empty cycle time TP 1 QLD demo 05 Blinking output TP BLINK QLD demo_ 06 Change output mode 1 SFC v Reference simpleLD Author W Date of creation 12 15 2001 Yersion number 1 ISaGRAF 3 41 Description User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 6 2 1 1 3 Declaring The ISaGRAF Project Variables Before you can start creating an ISaGRAF program you must first declare the variables that will be used in the ISaGRAF program To begin this process first click on the Dictionary icon and then click on the Boolean tab to declare the Boolean variables that will be used in our example program 1 ISaGRAF SIMPLELD Programs Eo imf x Fie Make Project Tools Debug Options Help miog Ey a ae get Peet ee A SAE Pet Yast eat et eee ea Pea Pet eat at ee a ee a Ct Peet ae ee ae Pet Fee ert ee et Ces Peat Oat Cee Feat eat Peat Meat Pet Pest tee tet rest eh ISaGRAF SIMPLELD Global booleans Dj x File Edit Tools Options Help __ OMe HxBd Xe Booleans integersiReals Timers Messages FB instances Defined words
35. RS 232 Cable Pin assignment between controllers and Touch 500 series I 8000 COMI amp I 7188 COM1 RS 232 Touch 506TE 506L 510T PLC 232 9 Pin Dsub Male 9 Pin Dsub Male 2 TXD ee 2 TXD 3 RXD 3 RXD 5 GND S 5 GND 7 CTS RTS WinCon COM2 RS 232 Touch 506TE 506L 510T PLC 232 9 Pin Dsub Female 9 Pin Dsub Male 2 RXD 2 TXD 3 TXD 3 RXD 5GNDIO __ 5 GND 7TCTS RTS RS 485 Cable Pin assignment between controllers and Touch 500 series I 8417 8817 COM2 RS 485 Touch 506TE 506L 510T PLC 485 DATA 2 R DATA m I R WinCon COM3 RS 485 Touch 506TE 506L 510T PLC 485 D oo RY D JR User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 13 4 4 1 Program the ISaGRAF PAC To make data of the ISaGRAF controller to be accessible to the Touch 510T variables in the controller should be assigned a network address Please refer to section 4 1 4 2 If you are not familiar with the ISaGRAF programming recommended to review Chapter 2 Variables used in this example Network address OUTO 0001 se OUTO2 0002 VALI OOOACO IO connection ww ISaGRAF TEST VO connection File Edit Tools Options Help 2 PRAm t4 HR se 4 tmj ref 10 X gt i s oum Ns sa ouTo2 m ii A The I 7188EG XG amp WinCon 8xx7 doesn t support show3led but you can change it as Virtual board Show3dled
36. ST program IF Pulsel THEN above LD program will generate a pulse TRUE in pulse1 variable do operation END IF The above program has a disadvantage When the periodic interval time is short for example 200ms or smaller or the controller s PLC scan time is bigger the operation time will not be precise For example to do a periodic operation every 50 milli second Because 50ms is a shorter interval it is much closer to the PLC scan time compared with interval time of 250 ms or 2 seconds the result time will not be precise To improve this following codes can be applied ST program IF INIT THEN INIT False INIT is declared as Boolean Internal T1 T 0s And init as TRUE T1_next T1 T 50ms T1 and T1_next are Timer Internal Tstart T1 END IF IF Ti gt T1 next THEN Timer will be overflow 1f it is ticking to IF T1 gt T 22h THEN T 23h59m59s999ms So we can reset it to 0 T1 T 0s second when it just reach the 22h or 16h T1_next T O0s whatever a bigger time you like END_IF T1_next T1_next T 50ms calculate next operation time do operation User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 61 11 3 9 Demo_72 Connecting I 7018z and I 7188EGD to get 6 channels of 4 to 20 mA input and 4 channles of Thermo couple temperature input And then also display the value on PC by VB 6 0 program The ISaGRAF demo
37. Simple LD Project Author ICP DAS USA Inc Date of creation 12 15 2001 Version number 1 ISaGRAF 3 41 Description Simple Example Of n Lo rivyram User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 13 9 8 Setting The Slave ID For An ISaGRAF Controller Each ISaGRAF controller system has a NET ID address that must be set to identify the controller to the ISaGRAF Workbench program By default the NET ID address is 1 when it is shipped out If you need to communicate with multiple controller systems via RS 485 network you must set the NET ID address in the ISaGRAF program for the specific controller system you want to communicate with To communicate with different controller systems from one development PC open the SaGRAF Programs window and click on the Link Setup icon When you click on the Link Setup icon the PC PLC Link Parameters window will open Enter the Target Slave Number of the controller system you want to communicate with ISaGRAF TEST Programs Ioj x File Make Project Tools Debug Options Help D SU Cem Sx Ow AQ Begin Simple Test Program Link setup PC PLC link parameters mee xy FARE EERE TREE RRR E TEER ESE RE EERE EERE ERT HH OK Vee e nee e Rene REE EERE EEE EERE RE EEE REE E Target Slave Number yA 2 J COM2 x Cancel Setup Communication port IMPORTANT NOTE To set Net ID for the controller please refer to their resp
38. TMP f_close Filel always close File after its operation If ii 2 then All data is succefully read and converted 2 rows Msg1 Read File_namel OK end_if end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 20 10 5 4 Wpdmo_56 Retain values of 1 to 255 Real variable in CompactFlash card The Wpdmo_56 pia can be found at WP 8xx7 CD ROM napdos isagraf wp 8xx7 demo or ftp ftp icpdas com pub cd winpac 8xx7 napdos isagraft wp 8xx7 demo If functions of Msg_F Msg _N ARY_F_R AFY_F_W are not found in your PC ISaGRAF please download ICP DAS utilities For ISaGRAF at http www icpdas com products PAC 8000 isagraf htm gt Driver Then run setup exe to restore them to your ISaGRAF workbench The Wpdmo_56 program will read 1 to 255 REAL values from System_Disk data56 txt to the related variable when the WP 8xx7 is just power up If this data56 txt doesn t exist all 1 to 255 values will be init as 0 0 At run time if any value of these variable is modified all 1 to 255 values will be written once to the data56 txt to make sure these variable s value are well retained in file If the file doesn t exist this program will create it To read write file in the System_Disk take lots of CPU time please do not read write it frequently And please always close the file after the operation If user read write file in every PLC scan cycle th
39. User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 63 If PC can not link the I 7188EG well the Communication state at the bottom will display the related error message If the I 7188EG can not connect I 7018z well there will be a I 7018z not on line message displayed in red color You may click on set Boo 21 to True button One click will increase the long 15 value by 1 You may also enter a value to set long 15 column then click on set long 15 w YB 6 0 Demo 4 Modbus TCPAP Master protocol demo Please remember download ISaGRAF project Demo_ 2 to controller first controller IP should be set as 192 168 1 3 and Net ID should be set as 1 Your PC should be in the same IP domain as the controller for example 192 168 1 5 ISaGRAF demo_ 2 is at ftp ftp icpdas com pub cd 8000cd napdos isagraf 8000 demo YB_6 Demo_4 is at ftp ftp icpdas com pub cd 8000cd napdos isagrat b_demo ICP DAS technical support at service icpdas com Please use DCON utility version since 4 4 3 to configure 1 70182 s addr 1 baud 9600 format 2 s compliment checksum disable Ch 1 to 6 Type as 14 0 20 m Ch to 10 as F T C K type New DCON utility can be download at ftp ftp icpdas com pub cd 8000cd napdos driver dcon_utilty setup IF you want to test VB net 2005 demo program please visit www icpdas com FAQ Software ISaGRAF 051 There is one another B_6 demo program at 052
40. User s Manual of ISaGRAFe PAC By ICP DAS CO LTD amp ICP DAS USA January 2002 All Rights Reserved The User s Manual of ISaGRAF PAC is intended for integrators programmers and maintenance personnel who will be installing and maintaining an ISaGRAF series controller system featuring the ISaGRAF Workbench software program XP 8047 CE6 XP 8046 CE6 XP 8347 CE6 XP 8346 CE6 XP 8747 CE6 XP 8746 CE6 XP 8147 Atom CE6 XP 8146 Atom CE6 XP 8347 Atom CE6 XP 8346 Atom CE6 XP 8747 Atom CE6 XP 8746 Atom CE6 WP 8147 WP 8146 WP 8447 WP 8446 WP 8847 WP 8846 WP 8137 WP 8136 WP 8437 WP 8436 WP 8837 WP 8836 WP 5147 WP 5146 WP 5147 OD WP 5146 OD VP 25W7 VP 25W6 VP 23W7 VP 23W6 wPAC 5007 5 107 5207 5307 5507 uwPAC 7186EG I 7188EG I 7188XG VP 2117 1P 8447 1P 8847 1P 8417 iP 8817 I 8417 1 8817 I 8437 80 I 8837 80 ICP DAS CO LTD would like to congratulate you own your purchase of our ISaGRAF controllers The ease to integration of the controller system and the power of the IEC 61131 3 ISaGRAF software program combine to make a powerful yet inexpensive industrial process control system Legal Liability ICP DAS CO LTD assumes no liability for any and all damages that may be incurred by the user as a consequence of this product ICP DAS CO LTD reserves the right to change this manual at any time without notice ICP DAS CO LTD constantly strives t
41. analog Input value of 0 or close to O could mean the Sensor input is 4 mA and also possible the Sensor is broken line So it is not easy to distinguish these two situations by this AI value Howevr if setting the range type as D 20 mA or 1A 0 20 mA analog input value of O or close to 0 only means the Sensor is broken line If the Sensor input is 4 to 20mA the analog value should be 6553 to 32767 When it input 4 mA the value is 6553 not close to Q Of course the RS 485 communication state between the AI module and controller must be Ok The Ok1 and OK2 variable in the above example 3 can indicate the communication is Ok or not If the communication is False it means the controller can not link to the RS 485 I O well You need to handle this situation in your ISaGRAF program So if you want to distinguish whether the Sensor 4 20 mA is OK It would be better to set the type as D 20 mA or 1LA 0 20 mA Then you can set the condition in your ISaGRAF program For example when the Al A16 input value is less than 5000 or 4000 it can be regarded as Sensor broken line or abnormal User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 10 Example 4 Program I 7018 block Please use new I_7018n block I 7018z is a better hardware choice Please refer to Chapter 11 3 9 for demo example Please configure I 7018 and I 7018R s format as 2 s complement b
42. can be extend to as below please refer to Section 10 1 256 Integer Real ee W 8337 8737 8336 8736 S256 312 with new WinCon back plane section 10 1 po NewRetain function old retain method 4096 Integer Real ICP DAS provides an utility ICPDAS UDloader that can be installed in the PC to upload and download data from to the ISaGRAF controller Please copy UDloader exe from the ICP DAS s CD ROM napdos isagraf some_utility to your PC windows The I 8417 8817 8437 8837 supports S256 S512 since its driver version of 2 25 better to be 3 19 or later while I 7188EG supports X607 608 since its driver version of 1 18 better to be 2 17 or later and version 1 16 for I 7188XG better to be 2 15 or later W 8337 8737 8336 8736 supports S256 S5 12 since its driver version 3 18 better to be 3 36 or later Please refer to section 10 1 If your driver is older one please upgrade the hardware driver to the associate version or a higher version The driver can be found from the ICP DAS s web site http www icpdas com products PAC 1 8000 sagraf htm User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 8 10 3 1 Access to the SRAM The SRAM can store boolean byte word integer real amp message Their format is as below Please refer to Chapter 11 3 7 for a demo program using S 256 512 by UDloader exe Boolean True 1 False 0 1 byte Byte OQ 255 1 byte Word 32768 32767 2 bytes Inte
43. gq DO Mapping Al Mapping AO Mapping Digital Triprest Txxxx Comment a l 8077 0 0 40 Digital Module l 2077 0 40 Digtal Module l 8077 0 2 40 Digital Module l 5077 0 a 40 Digital Module l 8077 0 4 40 Digital Module l 5077 0 z 40 Digtal Module l 8077 0 E 40 Digtal Module l 5077 0 T 1 0F1 1 F 40 Digital Module MM iiakal kindle F User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 22 6 There is a Watchdog setting for the I 3KE4 8 MTCP The default value is disable the watchdog You may enable it by assigning a Watchdog timer value for example from 10 to 120 seconds This will automatically set the Digital outputs and Analog outputs of the I 3KE4 8 MTCP to a pre defined Safe Value when the Ethernet communication between the WinCon and the I 8KE4 8 MTCP is break If you check the Ch0 to of the Safe Value it means to set these Channels to have a safe value of ON If you un check it it means the related channel has safe value of OFF The Safe value function only works when you assign a value larger than zero to the Watchdog timer and the communication is break Set 0 to the Watchdog timer is to disable the Watchdog function HJ Modbus Utility Yer168 Jol x Fie Windows Clenttoole Settme Help eRe I SKE4 WNetiD 1 10 0 0 109 Connect Online Mode Ethernet Disconnect a Summary DI
44. or Degree Fahrenheit input value ICP DAS provides many temperature input modules as below With broken line detection or called wire opening detection Thermocouple type I 87018ZW 87018RW 87019RW 87019zZW 7018R 7018BL 7018Z 7019 7019R RTD type I 87013W 87015W I 87015PW 7013 7015 7033 Thermister type I 87005W 7005 Without broken line detection Thermocouple type I 87018 7018 7018P The ADR_ parameter of temperature IO function block can be standard setting or special setting For example setting ARD_ of the I_7033 function block to 1 to 255 Dec value means standard setting the value of 1 to 255 indicates the address of the remote I 7033 The temperature input value is normally 32768 to 32767 in the case It depends on the IO module s Type code setting Set by DCON utility normally value of 32768 amp 32767 means wire broken line ADR_ 10 TT 00 RR 00 AA 0A Hex means standard setting address 10 the temperature input value is normally 32768 to 32767 If ADR_ 16 10201A TT 10 RR 20 AA 1A Hex means special setting Degree Celsius type code 20 of this I 7033 module set by DCON utility address 26 the temperature input value is a clear Degree Celsius value for example value of 4556 mans 45 56 degree 500 means 5 00 degree If user want to get a clear temperature
45. standard s C Real Cancel C Dutput Next l Constant Initial value oO Peleg Previous Do Not check the Retain option for variable array For example setting integer variable array CNT O 9 as retained data in the integer retained memory starting from 20 21 to 29 INIT is declared as internal Boolean with initial value at TRUE TMP is declared as internal Boolean IF INIT THEN INIT FALSE only do it at 1 PLC scan TMP Retain_A N 1 10 20 Ist parameter B boolean N Integer F Real T Timer 2nd parameter Network address No for the Ist element of the Variable Array 3rd parameter 1 255 number of element in the variable array to be assigned as retained data 4th parameter starting retained address for this variable array 7188EG XG X607 608 I 8xx7 S256 512 B amp T is 1 to 256 N amp F is 1 to 1024 WinCon 8xx7 8xx6 S256 512 B amp T is 1 to 1024 N amp F is 1 to 4096 k END_IF User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 69 Chapter 3 Establishing I O Connections Before you can operate an ISaGRAF program with the 1P 8xx7 I 8xx7 I 7188EG XG uPAC 7186EG uwPAC 5xx7 WP 8xx7 WP 5xx7 VP 25W 7 XP 8xx7 Atom CE6 and XP 8xx7 CE6 controller you must make sure that the I O Library has been installed If you haven t done so already install it as outl
46. valid is 1 200 Low_Speed_ gt Acc_Dec_ High_Speed_ integer high speed Low_Speed_ lt High_Speed lt 2047 Return Q_ boolean always return TRUE Note The lower DDA cycle _ is given the smaller delay time between ORG1 ON and X_ STOP ON or ORG2 ON and Y_STOP ON when using M_hsporg amp M_lsporg command For ex DDA_cycle_ set to 4 the delay time is about 5 to 13 ms High_Speed Acc_Dec Acc_Dec Low_Speed Restriction Default value 1 lt DDA_ cycle lt 254 DDA_cycle 10 1 lt Acc _ Dec lt 200 Acc_Dec 1 Low_Speed 10 I lt L Speed lt 200 OW _ pee High_Speed 100 Low _ Speed lt High _ Speed lt 2047 Low_Speed gt Acc_Dec Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 TMP M_s_var 1 5 2 10 150 DDA_cycle 5 gt DDA period 5 1 1 024ms 6 144ms Acc_Dec 2 gt Acc Dec speed 2 6 144ms 42 52981 p s 2 Low_Speed 10 gt low speed 10 6 144ms 1628pps High Speed 150 gt high speed 150 6 144ms 24414pps User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 16 M_s dir Define output direction of axes Sometimes the output direction of X axis Y axis 1s undesired direction due to the motor s connection or gear train In order to unify the output direction as shown in Fig 5 and Fig 6 Where CW FW direction is defined as toward outside from motor CCW BW direction is defined as
47. 0 This_ip Only for the controller with two 5000 depend on the property Send_Time_Gap 2 Ethernet port two IP es you need to of distant receiving devices reserved D specify the correct IP of LANI or LAN2 reserved 0 port These two IP must be different refer to jia hope appendix F to enable the LAN2 AUNA p g em udp ip bs to ipl 5000 B Socket n cons port 12001 come to_ipe N A moe ports 12001 Only necessary for sending message out Please set IP as N A if the controllers only receiving message no sending Porti to Port4 Port No of UDP IP of the remote PCs and controllers Max 4 connections to send message to remote PCs or controllers IP1 to IP4 IP address of the remote PC or controller If the sending connection is not used please set as N A I 7188EG uPAC 7186EG uPAC 5xx7 I 8437 80 8837 80 VP 2117 1P 8xx7 WP 8x47 WP 5xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 and VP 2xW7 can use its UDP IP to auto report acquisition data or control data to local or remote Internet PC HMI The PC HMI can also send control commands or time synchronization command to the controller The advantage is every Controller in different location doesn t need a fixed Internet IP Please refer to www icpdas com FAQ Software ISaGRAF 065 for demo program Gateway server in ISP company PC HMI w e More er Roe Y j Ga
48. 1 uitput Real Output 2 Real Output 3 w The second method for assigning network addresses to variables requires that you declare the variables BEFORE you assign them This method allows you to assign numerous network address variables before you link them to an ISaGRAF program User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 2 When you click on Modbus SCADA Addressing Map SCADA is an industrial process control acronym that stands for Supervisory Control And Data Acquisition the Modbus SCADA Addressing Map window will open ISaGRAF ST_INTER Programs DI x File Edit Tools Options Help Quick declaration as Xe instances Defined words Import text IITTI Export text i Real Input 1 Import true false definitions Real Input 2 Real Input 3 real Output 1 real Output 2 real Output 3 Sort Renumber addresses I O connection DI i Re Conversion tables ane fir Cross references Note that one of the variables D1 is already assigned from our previous example You will note that the other variables that are not yet mapped are displayed in the lower portion under the Variables Not Mapped portion of the Modbus SCADA Addressing Map window Modbus SCADA addressing map 3 ji i aci File Edit Options Help 0000 Reserved D1 Real Input 1 Dz Rea Inout 2 D3 Real Input 3 OUT1 Real Output 1 OUT2 Real Output 2 O
49. 8 serial inputs amp 8 serial outputs Slot 2 I 87017 Board 8 channel analog input Slot 3 I 87024 Board 4 channel analog output Slot 8 Push4Key Slot 9 Show3Led ISaGRAF IO4LD Programs ee of x File Make Project Took Debug Options Help D eS O00 Fer BH ADS Bean Hello Reset amp Set Each i TETEN Control Outpits E push key E show3led Name Of VO Name Of connected Board Variables Associated With Each V O Board User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 3 3 1 1 Linking I O Boards With the I O Connection window open double click on the slot that you want to connect an I O board to The Select Board Equipment window will open scroll to the name of the I O board that you want to associate with the particular slot The ISaGRAF controller library defines two basic types of real I O boards Boards and Equipments The Boards selection is for I O boards that are single type meaning that all of the channels on that board are of a single type and attribute The Equipments selection is for I O boards that are multi type which means boards that have multiple types such as the I 8055 digital I O board that has 8 digital inputs and 8 digital outputs all on the same board To begin the linking I O board process double click on the slot that you want to associate an I O board to ow SaGRAF IO4LD I O conr File Edit Tools Options Help SB Pse mth TL FA amp a a
50. Chapter 18 of the ISaGRAF User s Manual WP8xx7 10 0 0 102 link two i8KE8 I O one is 10 0 0 108 one is 10 0 0 109 FAQ 042 yndmo 3 WP8xx7 10 0 0 2 link one i8Ke8 T O 10 0 0 109 pemo_ FAQ 042 Set up WP8xx7 as TCP IP Client amp link to other TCP IP server 1 connection Chapter 19 3 of the ISaGRAF User s Manual wodno 33 Same as Wpdmo_32 but send message only when event last for larger slot 0 P 7 than 3 seconds 1 87055W Read Real Val from Modbus RTU device www icpdass com gt FAQ gt Software gt ISaGRAF gt 47 amp 75 wpdmo_37 Write Real Val to Modbus RTU device FAQ 047 amp 75 wpdmo_38 Using Modbus function code 6 to write 16 bits FAQ 046 amp 75 WP 8xx7 I 8172W connecting FRnet I O modules FAQ 082 vodmodi COM3 connecting 1 M7053D 2 M7045D MBRTU format baud 9600 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 10 wpdmo_30 wpdmo_32 wpdmo_36 wpdmo_39 wpdmo_42 wpdmo_43 wpdmo_44 wpdmo_45 wpdmo_46 wpdmo_48 wpdmo_50 wpdmo_51 wpdmo_52 wpdmo_53 wpdmo_54 wpdmo_55 wpdmo56 wpdmo56a wpdmo56b wpdmo56c wpdmo56d wpdmo56e wpdmo_6l wpdmo_62 wpdmo_63 wpdmo64a wpdmo64b wpdmo65a wpdmo65b format baud 9600 baud 9600 Modbus format COM3 connecting 1 M 7019R set as T C K type input MBRTU format baud 9600 COMS3 connecting 1 M7080 MBRTU format baud 9600 VB net 2005 demo MBTCP_demo
51. If your application is to measure faster signal of tlOV or 20mA please use I 8017HW To program I 87018ZW please connect 1_87018z in the related slot No on the I O connection window Then set proper range setting Then connect related Integer Input variable to Ch 1 to Ch 10 om SaGRAF T gt IFO connection _ o x File Edit Toole Options Help B SBRO TL RR amp gt a ref 87018FA ee ranges Each channel of 1 87018ZW can have different E i_87018z e ws CH2_rang 1A range setting mw CH3_rang 1A EN CH4_rang 1A In this example Ch 1 to 4 are using o tea CH5_rang 100F 1A 0 20mA E m CH6_rang 100F l l m CHF _rang 100F mw CH8 rang 100F Ch 5 to 8 are using 100F T C K Type convert Please click on to mmm CH3_rang 200F to Degree Celsius unit is 0 0ldegree get On Line Help of 5 CHTO_rang 200F the range setting Ch 9 amp 10 are using 200F T C K Type cobvert 7 to Degree Fahrenheit unit is 0 01 degree a 4 ia When using special setting and the return value is male 999990 it means Sensor broken line ia 4 3 4 gt a User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 20 3 3 Linking Some Special Virtual board 3 3 1 Using Push4Key and Show3Led The I 8xx7 and iP 8xx7 controller has some helpful tools for testing and debug that are Push4Key and
52. PWM output in slotO Connect the I 87088W 1 7088 addr 1 baud 115200 via WP 8xx7 s COM2 RS485 sending Receiving UDP bytes by using eth_udp and eth_send and eth_recv sending Receiving TCP bytes by using eth_tcp and eth_send and eth_recv WP 8xx7 COM2 Mbus Master M 7011 ID 1 baud 9600 to get ALDI FAQ 118 API of FAQ119 Mbus RTU Master Central station API of FAQ119 Mbus RTU Slave local 1 Must set PAC ID Slave Number to 1 API of FAQI19 Mbus RTU Slave local 2 Must set PAC ID Slave Number to 2 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS slot 2 I 8024W slot 3 I 8017HW GTM 201 RS232 slot O I 8088W I 87088W I 7088 11 12 wpdmo8s0a AP2 of FAQ119 Mbus TCP Master Central station opdmos0h AP2 of FAQ119 local 1 Must set ID to 1 LANI 192 168 1 178 P LAN2 192 168 1 179 imogie AP2 of FAQ119 local 2 Must set ID to 1 LAN1 192 168 1 180 WP LAN2 192 168 1 181 wbdmog1 WP 8xx7 slot 1 I 8017HW single End to get Moving Average j refer to FAQ 120 1 8017HW VB NET 2008 example program Running with ISaGRAF program in the same WP 8xx7 WP 8xx7 CD ROM napdos isagraf wp 8xx7 vb net_2008_demo or ftp ftp 1icpdas com pub cd winpac 8xx7 napdos isagrat vb net_ 2008 demo Project Description T O board name WP 8xx7 amp VB NET 2008 used wD vbOl Digital I O demo slot 0 P The related demo project name wp_vb01 pia I 87055W slo
53. SMS_xxxx a SaGRAF Project Management E Ioj X Fie Edit Project Toole Options Help B OE Mm Users guide Language reference fe fbus mas fo test4 fe fbus sly Em boch 3 fo boct Referen Technical notes Author Date of i Trena E Yersion Functions a Descriptor 22 C nction E 5 eger SMi get C function blacks Conversion functions Ct I MALE i author CJ International Get message date and time from controller s date 2 time call P1 P2 ANA Target l 8417 8817 8437 8837 7188EG l 7188xG return Q addition of Pl call CFsample Ref integer to getwhat 1 1 get year N_ 2000 2099 2 get month N_ 1 12 3 getdate N_ 1 31 i User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 17 5 Chapter 18 Motion Note 1 XP 8xx7 CE6 and XP 8xx7 Atom CE6 support the I 8094 8094F 4 axis Motion amp Encoder and the I 8092F 2 axis Motion amp Encoder and that is the better solution than I 8091W please refer to http www icpdas com fag sagraf htm gt FAQ 132 Limitation 1 If using the I 8417 8817 8437 8837 the standard driver version is not support the I 8090 and I 8091 Therefore the users need to update it to the Motion driver please visit the website below http www icpdas com products PAC 8000 sagraf link htm 2 I 8437 8837 CAN NOT do Ethernet communication when using I 8091 to do motion contr
54. Set symbol text N Enter Change coil contact type Space Find Replace Find matching name Alt F2 i Find matching coil Alt F5 wae poss Copy drawing metafile Sia Or you may just simply click on the F2 Contact On The Left icon and the following will appear within the Quick LD Program window i ISaGRAF SIMPLELD LD1 Quick LD Program File Edit Tools Options Help Da MBA wes xO dd Ht aQ F2 JH F3 3HE F4 GH FS F HE F 1H F8 Il F3 gt tF 9G Contact on the left Click on the F7 Block on the right icon and you will create a block on the right of the first input contact Bie ealGRAP sIKPLELD LDI Quick LD F File Edit Tools Options Help Aa yga mp Ed Br QQak fs Fo 4E F3 JHE Fd GH FS H F THE F7 440 Fa Gl Fo 8 P Soc User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 13 Click on F7 Block on the right icon again to create one another block on the right of the first block Bie lhad RAF SIMPLELDCLDI Quick LD F File Edit Tools Options Help EEFE gs xd r QQake 2 F2 4HE F3 JHE Fd GH FS H F THE F E Fs EI Fo FS Then you will get the window as below Move the cursor to the Coil on the right Then click on F5 Coil to add one coil just below the first coil And then click on F5 Coil again to add the third coil ie salt RAF SIMPLELD LDI Quick LD Program File Edit Tools Options Help Dal xez mgl xd
55. Shap library Create Bit Lamp Object General Shape Label shape Shape library I Use shape Bitmap Eitmar ibrar r Use bitmap shape Library Shape library CUES 17 Untitled 18 Untitled 20 Untitled 21 Untitled 22 Untitled 23 Untitled Background L Select Lib New Lib Unattach Lib Delete shape Place CANCEL User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 21 And then select Label given a OFF to Content for State 0 Make sure Use label is choosed Create Bit Lamp Object General Shape Label Attribute Color a Font 16 7 Align Center State lo Content Tracking And then change State to 1 and given a ON to Content Make sure Use label is choosed Create Bit Lamp Object General Shape Label Attribute Color a Font 16 Align Left Content E ee re i M Lse label Tracking User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 22 By the same way as former create one another Bit Lamp with a Device address 2 Bit Lamp bject Attribute General Shape Label Profile Description Fead address Device typ ox Device address Attribute Function Nox mal EBasyBuilder EBPril Window 10 Initial Screen EE File Edit View Option Det am
56. Value Text Bitmap Picture to make application more friendly 14 1 A Spotlight Example This Demo example can be restored from the ICP DAS s I 8000 CD ROM demo_37 Please refer to Chapter 11 to restore it Variables used In the example Name Output 1 connect to Chl of show3led Output 2 connect to Ch2 of show3led Output 3 connect to Ch3 of show3led Input 1 connect to Chl of push4key Input 2 connect to Ch2 of push4key to set blinking period initial value is set at 500 unit ms Old value of VAL_OUT Ty Mimer intra Time Period of inking 0 HMI screen outline ISsGRAF DEMO_37 SP1 SpotLight CS 0 x File Edit Insert Optons Help B Oba MP Ueske te alxe dw ele oo SpotLight Demo Button Button Buttons Button L3 VAL OUT 500 WAL OUT 300 VAL OUT User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 1 Project architecture A Sad EAF Project Management Fie Edit Project Tools Optone Help AS Dem eA fi creation Group name Spotlight O x Fie Make Project Tools Debug Optons Help SP HBS Aa m s wie meh zeae project name demo_37 ene end_init Begin stint Structured Text ST Program st_init in the Begin area Do some init action if INIT TRUE then T1 TMR VAL_OUT Convert integer VAL_OUT to Timer T1 in ms MSG1 0K OLD_VAL_OUT VAL_OUT init
57. WP 5xx7 VP 25W7 23W7 2 MB for XP 8xx7 CE6 XP 8xx7 Atom CE6 controller system Before trying to download the program it is advisable that you check the size of the uploaded program Then go to the appropriate sub directory that the application program resides in As an example the SIMPLELD program that was create resides in the C isawin demopgm simpleld program sub directory Remember the DEMOPGM sub directory is the Project group that the SIMPLELD program resides in and the SIMPLELD sub directory is where the actual application code files reside in Look for the file named APPLI X8M and check the size of this file The APPLIC X8M file is the file that contains the actual code that will be uploaded or downloaded to the controller system Make sure the sizes of this file DOES NOT exceed 64K byte for I 8xx7 1P 8xx7 I 7188EG XG uPAC 5xx7 uPAC 7186EG VP 2117 The code size limitation is 512 KB for W 8xx7 1 MB for WP 8xx7 WP 5xx7 VP 25W7 23W7 2 MB for XP 8xx7 CE6 XP 8xx7 Atom CE6 UPLOADING AN ISaGRAF PROJECT To upload an ISaGRAF project from a controller system open the File gt Upload Project in the TSaGRAF Project Management window and check if the communication between your development PC and the controller system is working properly If the communication is not in normal please click on the Setup button to configure the proper communication settings User s Manual Of ISaGRAF PAC Sep 2012 Rev 6
58. We will create one another Structured Text hence forth referred as ST program to indicate the first PLC scan cycle That means in this example ISaGRAF project we have two programs inside it One 1s written in LD and the other is written in ST The example project name is simpleLD The name of the LD program of this example project is LD1 and end_init is the name of the ST program Project name ha simpleLD gt Thala RA SIMPLELD Programs ___d Begin LOY Ladder Diagram User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 1 Variables Used In The Example LD Program Initial value at TRUE TRUE means 1 scan cycle Indicate a pulse is generated or not Output Output 2 Output Output 3 Tl Timer Internal Time Period of blinking initial value is set at T 1s T _No _ Integer Internal To puls one when M3 pulse is generated initial value is set at 0 Ladder Logic Program LD 1 Outline VALI0LED is only for I 8xx7 amp I 7188EGD XGD W 8xx7 doesn t support this block ST program end_ init Outline INIT FALSE User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 2 Process Operation Actions Ladder Logic Program LD1 Blink Outputs 1 2 amp 3 with a period of T1 in the first 15 seconds T1 has initial value equal to 1 second Atfer these 15 seconds Outputs 1 2 amp 3 will be turned OFF Gener
59. amp Alt amp EA SEIBIEG JRE 66 99 z Del at the same time to open aeee mE ene 520 0 00 00 2944 E the yo Task Manager a NAVAPSYVC EEE 560 aa 0 00 02 3TA E WISUM EXE 604 oOo 0 00 00 4 3216 K then stop CTFMON EXE as TEST ENE 656 OO 0 00 00 O52 E metask exe 696 oOo 0 00 00 3 272 E next page S MPROEVES C 720 00 0 00 00 5 500 K Win eont ese soo 00 0 00 06 220 E If k svchost exe 576 oOo 0 00 02 9 672 E inetinfo exe 904 D3 0 00 00 3 688 K you want to know more WISSERV EXE 936 oOo 0 00 00 5 268 E about the CTFMON EXE explorer exe 1140 oo 0 00 06 5 040 E a gt saalioza oi 0 00 00 5 500 E please visit sai C5 N S S EEE EE EEE iti OH a 204 E Wwww microsoft com amp search MAVAPW32 EXE 1444 on 0 00 00 7 120 K PTEE E E Mana Da eme 1468 g 0 00 00 4 504 E CTFMON EXE UsrPiompt exe 1504 oo 0 00 00 1672 E COL ite exe 1512 oo 0 00 01 14 248 E el HET AJAI ewes 15270 nn nO a 760 ee al One Quick way to avoid the hold problem on windows 2000 You may create a short cut for the ied ch kipa ISaGRAF project manager And then General Shortcut Security check on run in separate memory CERA space option in the shortcut property Ze t Target type Application Target location EE Target C MSAWINSEXE SWSPMIEDT EXE I Run in separate memory space Start ir C ISAWIN Sexe Shortcut key None Run Normal windovyy Di Comment Find T arget Change Icon Run
60. folder from CD ROM Napdos others mmicon to your hard disk or you can download it from the website ftp ftp icpdas com pub cd 8000cd napdos other mmicom Note Please change all these file s attribute removing Read only gt Create all the background pages by Microsoft painter Please refer to PO bmp gt Edit your Autox dat file Please refer to Auto1 dat This file must remove its Read only attribute Run MMIDOS exe to build the romx bin For ex rom1 bin gt Using your ROM programmer to burn this romx bin image to the ROM memory Then plug it into the socket on the MMICON Please refer to the MMIDOS Software User Manual which is delivered with the hardware for more software details 16 3 Writing Control program The I O complex equipment mmicon should be connected to the I O connection window first You can find 3 boards under MMICON O x File Edit Tools Optons Help BS PBeg tL 5 o aj j ref 114 mwm COM _port 4 if ES E am MMICON B Status n Key_in ru gt Page_out ru l User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 16 2 Status Parameter com_port defines the COM No to link to the MMOCON 3 or 4 for I 8xx7 while 3 for I 7188EG XG and 2 for W 8xx7 1 channel of Digital Input True means communication between the controller and the MMICON is Ok FALSE means fail Key_in
61. free access HOO gonzo Global protection Overwrite with archive Backup on archive Project descriptor History of modifications KO connection Global variables Global and common defined words Create new program To verify that your password protection is now set for your ISaGRAF program close all of ISaGRAF windows and then open the ISaGRAF Project Management window Double click on the ISaGRAF program that you have created the password protection for A Data Protection window will now open requiring you to enter the password for the ISaGRAF program you are attempting to open 4 ISaGRAF Project Management File Edit Project Tools Options Help S Fem We tg B Demoa st_exam Example ST Project il exam Example IL Project sfc exam Example SFC Project SE A Simple LD Program v Reference Simple LD Project jai Author ICP DAS USA Inc Wi Date of creation 12 15 2001 Yersionnumber 1 ISaGRAF 3 41 Description Simple Example Of An LD Program I x Global protection Function or data protected by a password Enter passwords Fe T Cancel Read only User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 7 9 4 Creating An ISaGRAF Program Diary When you modify an ISaGRAF program you can keep track of these revisions by entering a comment into the Edit Diary window This affords the programmer the opportunity to add comments about program modifications and then save a record of these c
62. in ISP company fin ra Ri k on mete Send Command eae or Time Synchronization Auto Report S A J k Location B Location C User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 19 5 To setup W 8xx7 as TCP IP Client please connect IO complex equipment Tcp_clie first in the IO connection windows as below Max 4 TCP IP Client can be setup in one WinCon 8xx7 om ISaGRAF WDEMO_ 32 I O connection O x File Edit Tools Options Help a PRBeaml tll A amp aj bun ref 120A am i BOF cmt Time to Sleep 60 DIB n cme this ip xxx xxx xx oo DOE me mm reserved 0 pe 14001 to ipl 10 0 0 91 send Time _Gapl 250 aug seaport 14001 Le iman to ip Ni cs Send Time_Gap 2 250 am tcp_clie soo ports 14001 B Socket ms m to_ip3 N A EN am Send_Time_Gap3 250 The 4 Channel of Boolean m porta 14001 inputs return True if the moe to_ip4 N A related TCP IP connection is jas Send_Time_Gap4 250 Ok It returns False if the 13 1 a R related TCP IP connection 1s A broken gt 4 The Time_to_sleep setting ranges from 10 to 600 or O unit is second If setting as 0 The TCP IP sending connection is always connected unless the TCP IP has communication problem Setting as 10 to 600 sec means if no message is sending persist for such a long time the connection will be disconnected TCP IP connection will
63. parameter can be set as 1 to 33 please refer to Table 1 in the former page If using multiple Modbus Master port at the same time it needs to link more Mbus or Mbus_asc and the port_no parameter for each function must be different Delay time port_no 100 Delay time for sending the next Modbus frame unit is ms min value is 1 max value is 1000 ms The Delay time can be explained as the time gap between two modbus commands Some devices need larger delay time However setting a larger delay time will slow down the scan rate of the Modbus communication Setting a value larger than 1000 will use the value of 1000 ms Default Delay Time is 100 ms if setting port_no lt 100 For example if setting port_no as 3 it uses default delay time value as 100 ms in COM3 If setting port_no as 3206 it uses delay time 32 ms in COMO If setting port_no as 40005 it uses delay time 400 ms in COMS User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 8 2 baud It defines what the communications baud rate setting will be The baud can be set to 2400 4800 9600 19200 38400 57600 or 115200 baud rate All controllers on the same Modbus MUST be set to the same baud rate char The default value is 8 it can t be changed when using Mbus If using Mbus_asc you can Set it as 7 or 8 and this value must be the same with the connected Modbus Slave device parity It defines what the
64. sub directory you want to delete An example of this is that if you wanted to delete the project just created use the Windows Explorer and go to the C isawin factory directory and then just delete the factory sub directory User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 2 9 2 Uploading An ISaGRAF Project The Upload functionality provided by ISaGRAF Due to enable this function will make the original code ONE and A HALF TO THREE times larger it isn t recommended to use in a small capacity controller such as I 7188EG XG and I 8xx7 controller system can be used to upload the program that already running on your controller Before uploading you need to do some setup To turn the upload function on from the Compiler Option open the ISaGRAF Programs window select Make from the menu bar and then click on Compiler Options The Compiler Options window will open make sure the ISA86M TIC Code For Intel is selected and then click on the Upload button The Prepare Project For Upload window will open click on the Embed Source Code For Upload checkbox and then click on the OK button lolx File Make Project Tools Debug Options Help Make application M i om m Q gt Begir Verity D Program Touch Application run time Options Compiler options Compiler options l a xi Targets gt SIMULATE Workbench Simulator eects ie arena ition TIC code for i U
65. this means that up to 16 passwords can be assigned with the ISaGRAF Workbench program You will also need to select the type of data protection you are creating for your ISaGRAF project In the example below we are defining the Global Protection for this IsSaGRAF project LA 1SaGRAF Project Management 7 loj x File Edit Project Tools Options Help Project descriptor f 1 lt 2 gt DemoPgm 2 History st e il e gt sfc a x l l m LD Program Reference Simple LD Project Author 3 ICP DAS USA Inc Passwords IARE ing cone 4 l x Permissions Global protection Overwrite with archive Backup on archive Project descriptor History of modifications VO connection Global variables Global and common defined words Create new program OK Cancel When you click on the OK button from the Enter Password window your new password will now be associated with the ISaGRAF project The next item you need to define is the type of data protection Permissions that will define for your ISaGRAF project Double click on new password you have created and the Data Protection Permissions window will open To allow full access WITH password protection click on the Full Access scroll bar and click on the new password name you have created User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 6 Data protection ees Full access 00 gonzo
66. 0x0006 The NET ID address is 1 The value to write to 1s OxFF Request 01 05 00 06 FF 00 6c 3 answer 01 05 00 08 FF 00 ec In this example of function 5 the Boolean variable is set to True Function 16 Write 2 words 4 bytes to the integer variables with the Modbus address starting from 0x2100 The first word value to write to is 0x1234 The second word value to write to is Ox5678 The NET ID address 1s 1 Request ot 10 eooo oo os ta sa 56 1 ca answer 01 10 210000 02 al Fe User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 5 5 5 2 Modbus Protocol Format TCP IP The Ethernet port of I 8437 80 I 8837 80 I 7188EG uPAC 7186EG uPAC 5xx7 1P 8x47 VP 2117 WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 controller systems supports the Modbus TCP slave communications protocol ALL requests are sent via TCP on port number 502 The Modbus TCP IP protocol adds 6 extra bytes before the Modbus RTU serial protocol and these 6 extra bytes and the Modbus RTU serial protocol are all packed inside the TCP IP protocol TCP IP Extra 6 Modbus RTU serial TCP IP Bytes The request and responses are prefixed by the six bytes as follows Byte 0 transaction identifier copied by server Byte 1 transaction identifier copied by server Byte 2 protocol identifier 0 Byte 3 protocol identifier 0 Byte 4 length field upper byte 0 since all messages are smaller than 256 Byte 5 l
67. 1 channel of Integer Input The value is the key been pressed And the value will last only for one scan cycle then go back to 0 Key Key OH Entr 160D po OE a aa 6 166 Backspace 16 08 8 8B P 6P S 9 9 2 Po BT S eee SOOO eees DHA po EAS a C Page_out 1 channel of Integer Output The value output define the page No to display The I 8417 88 17 8437 8837 I 7188EG XG amp W 8xx7 controller provide below functions to control the action of the MMICON MI_BOO Display a boolean value as ON or OFF MI_INT Display an integer value MI_REAL Display a real value MI_STR Display a string MIINP_N _ To enter an integer MI INP S To enter a string REAL_STR Convert a real value to a string STR_REAL Convert a string to a real value Please refer to the demo_38 dem_39 in chapter 11 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 16 3 Chapter 17 SMS Short Message Service The ISaGRAF controller can integrate with a GSM Modem to support SMS Short Message Service This allows user to request information or control something from his own cellular phone to the ISaGRAF controller Beside the controller can also send information and alarms to user s cellular phone The following is the COM port number of the GIM 201 RS232 for connecting different PAC I 8xx7 4 or 5 I 7188EG wPAC 7186EG uPAC 5xx7 XP 8xx7 Atom CE6 l or 3 or 4 XP 8xx7 CE6 5 or
68. 10 input channels please connect 18717z10 in related slot No in the IO connection window then set the proper Range setting for each channel double click ChOx_rang to set it and then connecting related integer input variables in channel 1 to 10 Double click the channel No to set it Note If the jumper on the I 87107ZW is set to 10 Ch means that it can measure voltages or currents It is also noteworthy that you must set the proper Voltage input or Current Input way for each channel by adjusting the jumper JP2 JP11 on the board Please refer to http www icpdas com tw product solutions datasheet i 8k amp 1 87k I 87017ZW pdf wu SaGRAF CREATION VO connection File Edit Tools Options Help a P gt Seam rly amp o A t ref 87017FA cos CHO1_rang 8 am 18717210 ma CHO2_rang 8 B All_10 Noe m CHO03_rang 8 Ne am CHO4_rang 6 soa CHOS rang 8 nuun cH G Select boardiequip ment E e MEAE 57052 2 Counter amp read_back DO ae m HOG i_87062t 2 Frequency amp 200 o 064 o ch Freg In or 4fo Ch Cnt In mj CHOI Lo Oddy o Ch Phd 8 Ch Orl or Counter Cancel E ma CHTO ji_87089 Master card of VW sensors 10 o AJ 8 113d Carson strain Gauage Input ER 87117 8 CH WaveForm card Bore o A2 i 97118 8 CH WaveForm card range 1E 42 3 i 9 101 Concrete Freq amp Temper input i_87211w 67K GPS 1 0 board Library _Bkdoi 7000 IOs
69. 15 You may double click on VAL_OUT and give a value large than 5000 to see what it happens ISaGRAF DEMO_37 SP1 SpotLight 0 x File Edit Inert Options Help S O a enueeaeel xB gece ss oo SpotLight Demo Button Button Buttons Buttons E Write inte genreal variable Enter new value VAL OUT Lock Unlock Cancel 500 VAL OUT Note For quick response user may click on Options Parameters and then set the Cyclic refresh duration to a smaller value Recommand not to set below 200 ms D IbagkEAF DEMO 34 Debugger File Control Tools Options Help Parameters Show cycle timing Show errors lear errors Conmwacaton Parameters e x Communication time out Cyclic refresh duration Cancel All times ares given in milliseconds User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 16 Chapter 15 Creating User Defined Functions ISaGRAF supoorts functions written in ST FBD IL and QLD languages User defined functions are normally for some algorithm which been used again and again A function always has an return value outp ut parameter and its name should be the same name as the function and may have up to 31 input parameters The code written inside functions can not call any function block however can call other ISaGRAF standard functions and c functions provided by ICP DAS We are going to creating a function to save
70. 18 16 M_s_dir Define output direction OF AKES aeie A visi lave E EE 18 17 M_s_mode SEOUL UE TMOG S eaa waren cseiteal otonde de iiaueen E nee ea oes 18 17 M_s_serv SECSEEVO ON OFF aeaea e A E A mntauas 18 18 M_s_nc DG INO IN seacoast ceva cnc sd sea ag maces edness neces ceeds gle edna vee econ nara 18 18 SOPLO 111012 19 S aera ener e nT NOT ar MnO eer TER A roe ACN See AT ene Sete ane NT nee ary ae ee 18 19 M_stpx EL UL EEA Ac T Sea toi cuted Aula eats E E T EA dps T E T T E E E 18 19 M_stpy SODE ON ES etude te Acetic eto cuca Aula elapse desiccated tears stp sic ce vc sete lon vied Aca ee dain N es 18 19 M_stpall ASLO Os Garuda fae Dol SI RPE Nea NRE ee arate RPT POAT re aC nen TT ee ar I eee er 18 19 STMIP LE TG ONC O MMM ANC S a a a a aos tase bean N nae 18 20 M_Isporg LOWS Peer MOVE CO OR rerom Nr Deenanalunivedaluatseiaiiaceeien scones 18 20 M_hsporg Fh S peed MOVE LO OR sis ences nascadvetaryatiagaiuateadduenctanainadvolevsntaiaiiasmotesircberaiatuedausatuaiei acesien seats 18 20 M_Isppmv OW SECO USC TO VC stv atet enctananca dean sntiasasaswetavoncbenaicndsodavsatiaiaienanotesixehanaieatvedabatsaie acesmu estes 18 21 M_hsppmv FT eh SECO PUISC MOV S ce swasevenceanascadvetarnatiagaiuateadeuenstanaiadvoleventapaiienmetenirebetaisatuedausatiaieiSanesien scat 18 21 M_nsppmv Normal Speci PUISC MOVE resen ra o N snotesicebanaieatuedabatsaie aceoteuseetes 18 22 M_lspmv EOW SPE OVO mies O N O AS 18 22 M_hspmv FTG HAS 9 6 GINO anna a a a a cere 18 23
71. 2 52 2 5 A Simple Sequential Function Chart SFC Program A Sequential Function Chart SFC program is a graphical programming language used to describe sequential operations The process is represented as a set of defined steps linked by transitions A Boolean condition is attached to each transition and actions with the steps are detailed by using other languages such as ST IL LD and FDB An SFC program is a graphical set of steps and transitions linked together by oriented links Multiple connection links are used to represent divergences and convergences Some parts of the complete program may be separated and represented in the main chart by a single symbol call macro steps The basic graphic rules for an SFC program are l A Step CANNOT Be Followed By Another Step 2 A Transition CANNOT Be Followed By Another Transition The basic components graphical symbols of the SFC programming language are steps and initial steps transitions oriented links and jumps to a step This section details how to build a Sequential Function Chart henceforth referred to as SFC program Example SFC Control Specification The following details the variables that will be used in our example SFC program Mode 2 button input TMR 1 Switch time of output initial value is T 1s Mode Integer Internal 1 means model 2 means mode2 initial value is 1 The SFC Program Outline When you have completed the SaGRAF Programs window it shoul
72. 20 Then click on Browse to select the associated text file Import variables daqpro eb2g i7 188e be3 aint Atat tut And then it is done as below ISaGRAF TEST31 Global integers reals xd Hame Comment COUNTER User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 21 9 12 Spy list ISaGRAF supports Spy list to spy some specific variables when linking to the controller Please follow below steps to create a spy list First click on Simulate then click on Tools Spy list ISaGRAF LD_TEST Programs File Make Project Tools Debug Optone Help D mea Oem xr Ow Ag Begin E File Control Tools Optons Help Next click on Insert variable to insert the variable to be spied ap _ saGRAF LD TEST titled List of variables File Edit Options Help DA amp gms Mame YAE zend of list comment select variable Boolean 2103 0 Integer Real Timer Message Program C functor LCSW OF Cancel User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 22 When all spied variables are inserted remember to click on Save list Tha RAP LD_ TEST Lal List of variables File Edit Option Help comment 0 i_8017h Slot Ch1 Ch8 0 0 Al 2 04 T val 100000 Real 1 23 zeng of list Cancel Then close the Debugger win
73. 2012 Rev 6 3 ICP DAS 11 28 Variables If controller is just powered up initial value is TRUE ST program st init If INIT TRUE then Init Do some init at the first scan cycle Mode 1 STEP 0 T1 T 500ms NUM 0 tout T 0s Open Com3 as baud 9600 char size 8 no parity amp stop bit 1 TMP comopen 3 9600 8 0 1 end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 29 ST program R_W_COM STEP E 0 no valid data coming e 1 first valid byte received 2 receive command 10 check if other byte is 0 9 T 21 receive complete command num_com3 0 reset to 0 if ComReady 3 then num_com3 Comary_R 3 1 end_if test if data coming from Com3 read all coming bytes to byte array if data coming process it index 1 while num_com3 gt 0 do Process all coming bytes num_com3 num_com3 1 byt array_r 1 index get current operating byte from array 1 index index 1 a i STEP 0 check if 1 byte valid or not Case byt of check Ist byte 16 4D 16 6D 16 54 16 74 Ist byte is valid M m T or t STEP 1 for next STEP NUM 13 plus valid received byte number by 1 TSTART tout start ticking tout CMD byt record command type TMP Array_w 2 NUM byt save Ist valid byte to byte array 2 end_case 1 Cist by
74. 27 11 3 4 Demo_33 R W User Defined protocol Via Com3 RS 232 RS 485 This demo program can let I 8xx7 1P 8xx7 WP 8xx7 WP 5xx7 VP 25W7 accept commands coming from PC via a RS 232 cable The command protocol format can be defined by the user We use the below protocol format in this example Command is case insensitive that means M1 amp ml are same Protocol Format PC req M1 lt CR gt _ Change to Mode 1 M2 lt CR gt Change to Mode 2 M3 lt CR gt Change to Mode 3 Txxxx lt CR gt Change Period time to xxxx ms for ex T250 lt CR gt will change period time to 250ms Controller Ans OK lt CR gt PC req M lt CR gt Request the current Mode Controller Ans Mx lt CR gt _ for ex M1 means Mode 1 PC req T lt CR gt Request the current Period time Controller Ans Txxxx lt CR gt for ex T1500 means Period time is 1500ms Timeout a valid command should be completely sent in 5 sec Project architecture bag RAF DEMO 33 Programs File Make Project Tool Debug Optone Help D mST Dam xr Oe ADR Begin Z St init do some actions at first PLC scan this program must be at the most upper 1 R W COM Ray coms Sequential out Operation output ES action action of Mode 1 ES action action of Mode 2 ES actions action of Mode 3 AARLE end of first scan set INIT FALSE this program must be at the most lowe End End end int Structured Text User s Manual Of ISaGRAF PAC Sep
75. 378 Word 2n 1 2n Integer n User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 6 For iP 8xx7 uPAC 7186EG uPA C 5xx7 VP 2117 WinCon 8xx7 Byte 4n 3 4n 2 4n 1 4n n 1 2 3568 Word 2n 1 2n Integer n For WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 VP 25W7 VP 23W7 Byte 4n 3 4n 2 4n 1 4n n 1 2 1536 Word 2n 1 2n Integer n When using the write functions the EEPROM will be damaged if the write operation is more than 100 000 times For example the following program is dangerous since the EEPROM will be written once every PLC scan cycle normally the cycle time is about 3 to 60 ms depends on the application and controller model No ST program Val is declared as an integer TEMP is declared as a boolean TEMP eep_n_w 1 Val Dangerous However the following program is safe if Val is not changed frequently ST program Val Old_Val declared as integers TEMP declared as a boolean IF Val lt gt Old _ Val THEN TEMP eep_n_w 1 Val Old_Val Val END_IF Each read write operation in the EEPROM will consume a lot of CPU time of controller system The following approximate time is for each function being called Recommend to read values from the EEPROM at one time when the controller is powered up and then updated the associated address in the EEPROM when the value is changed Please refer to a sample program in Chapter 11
76. 483 647 If value is over 2 147 483 647 it will restarts at O Note Only Parallel D I board plug in slot 0 supports Di_Cnt Do not support other slot Only the first 8 D I channel support Di_Cnt I 7188EG XG uPAC 7186EG must connect the Xxxx board at slot 0 the WP 5xx7 requires the XW board or the Di_Cnt will not work ow saGRAF 41 140 connection E Ol x File Edit Tools Options Help SS ePBweaml rel r x amp Demo Please refer to I 8xx7 and 1P 8xx7 s demo_52 amp demo_ 53 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 37 Chapter 4 Linking Controllers To An HMI Program This chapter details how to make data from the I 8xx7 I 7188EG XG uPAC 7186EG uPAC 5xx7 1P 8xx7 VP 2117 WP 8xx7 WP 5xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 VP 25W7 and VP 23W7 controller system available to Human Machine Interface HMI programs This is a powerful feature that allows customers to create their own custom HMI programs and link them to the controller system After you realize the material described in section 4 1 if you would like to use the ISaGRAF controller as a Modbus RTU or Modbus TCP IP I O you may refer to section 4 3 Additionally there are touch screen monitors provided by ICP DAS that support the Modbus protocol and these touch screen monitors can also access data from an controller Section 4 4 illustrates how to link a Touch 510 monitor to an ISaGRAF controller syste
77. 6 I 7188XG 3 or 4 VP 2117 3 or5 WP 5xx7 3 1P 8xx7 4or 5 VP 25W7 VP 23W7 3 or 5 WP 8xx7 4 or 5 Note Recommend not to use the GIM 201 RS232 if your PAC is the WP 8xx7 VP 25W7 VP 23W7 and XP 8xx7 CE6 XP 8xx7 Atom CE6 using the I 8212W I 8213W GPRS GSM board is better The I 8212W J 8213W can be plugged in the leftmost I O slot of the WP 8xx7 VP 25W7 VP 23W7 slot 0 and the XP 8xx7 CE6 XP 8xx7 Atom CE6 slot 1 To enable the I 8212W J 8213W please refer to http www icpdas com faq isagraf htm gt FAQ 143 For using the 8212W J 8213W the related COM port is WP 8xx7 VP 25W7 VP 23W7 COMS XP 8xx7 CE6 XP 8xx7 Atom CE6 COM6 17 1 Hardware Installation The I 8417 8817 8437 8837 supports SMS since its driver version of 2 24 while version 1 14 for I 7188EG and version 1 12 for I 7188XG If your driver is older one please upgrade the hardware driver to the associate version or a higher version The driver can be found from the below ICP DAS s web site http www icpdas com products PAC 8000 isagraf link htm The I O library should be re installed if yours is older one Please refer to section 1 2 Or you can refer to Appendix A 2 to simply install C functions with the below items SMS_ test SMS_get SMS_ gets SMS_send SMS_sts and I O complex equipment SMS Recommend to use the GIM 201 RS232 as GSM Modem You may purchase them from ICP DAS or from your local agent ICP DAS is not sure f
78. 8 G Verify the function saGRAF W_EEFN STp File Edit Tools Options Help Daly mg md elg IF Ui_ N x if value changed gt TMP EEP WM WCADDR_ Wi 3 save it to the EEPROM WHEEP_N Ui_ anne _ x EWHD_IF Eim Ho eror detected Do you want to esit the Code Generator now Continue Then you can call it in any project User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 15 9 Chapter 16 Linking MMICON The I 8417 8817 8437 8837 I 7188EG XG and WinCon 8xx7 controller can integrate the ICP DAS s MMICON to become their Man Machine Interface The MMICON is featured with a 240 x 64 dot LCD and a 4 x 4 Keyboard User can use it to display picture string integer float and input a character string integer and float All control logic is written in ISaGRAF program There is a better HMI tools the Soft GRAF studio for the XP 8xx7 Atom CE6 XP 8xx7 CE6 WP 8xx7 VP 25W7 VP 23W 7 and WP 5xx7 Please refer to http www icpdas com faq isagraf htm gt FAQ 146 and http www icpdas com products Software Soft GRAF soft graf htm 16 1 Hardware Installation Please refer to the MMICON Hardware Manual which is delivered with the hardware for more hardware details http www icpdas com products HM I touch_Icd man_machine_list htm 1 The MMICON has a COM port Please set as a RS 232 port Please look at the jumper J7 amp J8 setting on
79. 8437 8837 WP 8x47 represents the products of WP 8147 8447 8847 XP 8xx7 CE6 represents the products of XP 8047 CE6 8347 CE6 8747 CE6 2 J 8xx7 s COMS 20 amp W 8x47 8x37 s COMS 14 resides at the I 8112 8114 8142 8144 81421 expansion modules 1P 8xx7 s COM5 20 amp VP 2117 s COM5 16 resides at the I 81121W I 8114W I 81141W I 81421W I 81441W expansion modules User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 12 El 4 Js 6 a t8 7 10 1 1 WP 8x47 WP 8x37 and VP 25W7 23W7 s COM5 14 resides at the I 81 121W I 8114W I 81141W I 81421W I 81441W expansion modules XP 8x47 CE6 s COM6 33 resides at the I 81121W I 8114W I 81141W I 81421W I 81441W expansion modules I 7188 uPAC 7186 s COM3 8 resides at the X board X5xx expansion boards uPAC 5xx7 s COM3 8 resides at the XW board XW5xx expansion boards The Ethernet communication of the XP 8xx7 CE6 is more efficient than WP 8xx7 and VP 2xW7 It supports up to 64 Modbus TCP IP connections The W 8x47 with driver version 4 02 or older version only supports 8 Modbus TCP IP connections while supports up to 32 Modbus TCP IP connections since the version 4 03 If the controller is W 8347 8747 two Ethernet ports its OS image must update to the version released on July 1 2008 to ensure the network communications is correct Please refer to www icpdas com gt FAQ gt Software gt ISaGRAF gt 095 for more informat
80. 87046W I 87051W I 87052W 1 87053W I 87053PW I 87053W A5 I 87053W AC1 I 87053W E5 I 87054W I 87055W I 87057W I 87057PW I 87058W I 87059W I 87061W I 87063W I 87064W I 87065W I 87066W I 87068W I 87069W I 87069PW inane I 87017W I 87017W AS I 87017RW I 87017RCW I 87017DW I 87017ZW I 87019PW I 87019RW I 87019ZW Analog Output 1 87024W I 87024DW I 87024RW I 87028CW V mA Multifunction __ I 87026W Temperature input I 87005 W I 87013W I 87015W I 87015PW I 87018W I 87018RW I 87018PW I 87018ZW I 87019RW I 87019ZW Counter Frequency I 87082W I 87084W I 87088W PWM PWM HART Master I 87H17W only support XP 8xx7 CE6 XP 8xx7 Atom CE6 WP 8xx7 VP 25W7 and VP 23W7 Please refer to http www icpdas com faq isagraf htm gt FAQ 136 Vibrating Wire Input I 87089W Please refer to http www icpdas com faq isagraf htm gt FAQ 091 Important The I O boards are divided into low profile and high profile I O and the name with W is high profile version For example the I 87057 is low profile I O the I 87057W is high profile I O The iP 8xx7 WP 8xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 VP 2117 and VP 25W7 23W7 only support high profile I O plug in the slot 0 7 If using low profile I O in these PAC it may cause communication error retain variables exception or incorrect I O behavior I 8K parallel I O boards can be plug in PAC s slot O through slot 7 and slot 1 through slot 7 of XP 8xx7
81. A file inside the SRAM has a current available area Head Tail Head is the starting position of the file Tail is the ending position Head can be larger less than or equal to Tail For example a file resides at Begin End 1 20000 1 If Head Tail 1001 5100 it means the available data of the file is starting from byte No of 1001 to 5100 The available file contains 4100 bytes 2 If Head Tail 10001 5000 it means the available data of the file is starting from byte No of 10001 to 20000 and then continued with 1 to 5000 The available file contains 15000 bytes User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 9 3 If Head Tail 5001 5000 it means the available data of the file is starting from byte No of 5001 to 20000 and then continued with 1 to 5000 The available file contains 20000 bytes 4 If Head Tail 5000 5000 it means the available data of the file is empty O byte 5 If Head Tail 1 1 it means the available data of the file is empty O byte To upload the data stored in the SRAM please make sure you have installed the ICPDAS UDloader on your PC To upload data stored in the SRAM of the ISaGRAF controller to PC please run UDloader exe then click on Link Setup to set proper communication parameters then click on Upload 1 to upload it Example Please download demo_41 to one I 8417 8817 8437 8837 Then push button 1 or 2 or 3 or 4 severa
82. Aa MBA mMm xed QQ F F3 0 Fa Fs fh FG fH FH Fei F E ISaGRAF SFC_EXAM MAIN SFC programi et m Es File Edit Tools Options Help Da xoa m xd QAF 4 APE OUT1 R R OUT2 RI OUTI R OUT2 R Using the same method as described above double click on each transition and step and add the code for each item as shown below User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 62 p OUT ACR OUT2Ry CONGRATULATIONS You have now successfully programmed the Main section of the example SFC program and the most time consuming The last portion of creating the example SFC program requires the creation and editing of the two CHILD programs You program the CHILD programs using the exact same method as required for creating the MAIN program When you are finished creating and editing the CHILD programs your two windows should look like the examples below SFC Child Program Model SFC Child Program Mode2 Final Details Remember that you must follow the same procedure for Connecting I O s and Compiling The Project as detailed in Section 2 1 2 and Section 2 1 3 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 63 2 5 3 Simulating The SFC Program After you have successfully compiled the SFC program you can now run the example SFC program in Simulate mode to observe how the two CHILD programs work within the MAIN SFC program When K1 is on Model is tr
83. CE6 VP 25W7 and VP 23W7 controller system is from to FFF in hexadecimal 1 8191 Network address 10 001 to 19 216 is for word and integer arrays please refer to Section 4 5 There are two ways to assign a Modbus network address No to a variable One is as below figure To assign many Modbus Network address No to the Variable Array please refer to Chapter 2 6 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 1 Open an ISaGRAF Programs windows and click on the Dictionary icon then double click on the variable to assign a network address number SaGRAF ST_INTER Programs loj x Fie Make Project Tools Debug Options Help ai Nei Do0 Xb mk ADR Begin SADLMNLGS ST Example Using internal Variables ISaGRAF ST_INTER Global booleans lO xj File Edt Tools Options Help a oDe txd g Note Booleans integers Reats Timers Messages FB instances Defined words The value displayed here is always in hexadecimal As above figure When you click on the Store button you will see that SaGRAF Global Variables window will now be updated with the new network address for the variable ISaGRAF ST_INTER Global booleans File Edit Tools Options Help O xed Xs Booleans integersiReals Timers Messages FB instances Defined words Name IB Ad Comment Se Rae input yee 0000 WW Real Input 2 input Real Input 3 at Real Output
84. CH1_MODE to CH8_MODE is for Ch 1 to Ch 8 of 8 Ch Up Counter and 8 Ch Frequency If setting as 4 Ch DIR Pulse Counter or 4 Ch Up Down Counter mode CHI MODE and CH2 MODE must set as the same value It is for Chl CH3 MODE and CH4 MODE must set as the same value It is for Ch2 CHS MODE and CH6_ MODE must set as the same value It is for Ch3 CH7 MODE and CH8 MODE must set as the same value It is for Ch4 For example 1 if setting CH1_MODE as 0 Dir Pulse 4 Ch then CH2_MODE should be also set as 0 2 1f setting CH1_MODE as 3 Up Count 8 Ch then CH2_ MODE can be set as 83 2 6 A 82 86 or 8A Below value is for Counter input type 0 Dir Pulse 4 Ch 1 Up Down 4 Ch 3 Up Count 8 Ch 80 Dir Pulse 4 Ch Inverse input signal 81 Up Down 4 Ch Inverse input signal 83 Up Count 8 Ch Inverse input signal Below valus is for Frequency input type 2 Frequency apply the AutoTT setting 6 Frequency apply the LowTT setting A Frequency apply the HighTT setting 82 Frequency apply the AutoTT setting Inverse input signal 86 Frequency apply the LowTT setting Inverse input signal SA Frequency apply the HighTT setting Inverse input signal Note 1 DIR Pulse mode and Up Down Counter mode are similar as Encorder Input The Counter value Should be controlled in between 2 147 483 648 to 2 147 483 647
85. COM2 to connect the Mosbus Slave device that its Net ID is 1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 QO Ladder Program Blinking D O Ch 9to 127 MFO4500_04 WMFOdsboO 10 MFOds5o0 14 MFO4S00 12 Pyrite 16 bits to Slaves M FOO0 Address 2 starting Modbus ADDR _ Mo is 0 this block automatically uses code 15 MBWS VB comm _ ok Q p I O connection _ Oo x File Edit Toolk Optons Help amp P gt Beml rl HR amp o E mj ref 107 cme port no 3 t baud 9600 mmn char 4 L4 mn parity 0 sme stop bit 1 e m timeout 250 ie 9 m mbus B com_port nh 10 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 9 Example 42 Connecting 1 M 7053D to get D I counter value This example is Wdemo 42 Remember to do the initial setting for the M 7053D modules in the section 21 1 steps 1 5 Variables Communication state of the related M 7053D Set as True to reset Chl D I counter value to 0 Set as True to reset Ch2 D I counter value to O CNT 01 Ch1 D I counter value CNT 02 Ch2 D I counter value Project One Function block program one Ladder program _ISaGRAF WDEMO 42 Frograms s iol x Fie Make Project Tools Debug Optons Help a BOD Abo xe mw aaa Begin FBD Begin LD1 Ladder Diagram Function block program Using Code 4 to request l 7000 Lal counter value starting from Modbus ADDR Mo 0 MUM
86. CW CCW counting mode 20 pulse direction counting mode Input Channel CH1 encorder value of X axis CH2 encorder value of Y axis CH3 encorder value of Z axis CH1 to CH3 are signed 32 bit integer format User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 13 Setting commands M_regist Register one I 8091 In order to distinguish more than one I 8091 card in I 8417 8817 8437 8837 m_regist platform the I 8091 cards should be registrated before using it This command will assign a card number card_NO_ to I 8091 card at that address_ If there is no I 8091 at the given address this command will return FALSE addre card Note If using I_8091A rather than I_8091 on the I O connection window user don t need to call m_regist amp m_s_nc they are ignored The card_NO of I 8091A is equal to its slot No I 8xx7 0 7 W 8xx7 1 7 Parameters card NO_ integer valid is O 19 address_ integer the plugged slot address of the 18091 card slot 0 16 80 slot 1 16 A0 slot 2 16 C0 slot 3 16 E0 slot 4 16 140 slot 5 16 160 slot 6 16 180 slot 7 16 1A0 Return Q_ boolean TRUE Ok FALSE Fail Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 declaration INIT as boolean lt internal gt and has initial value of TRUE TMP as boolean lt internal gt cardNO as integer lt internal
87. Controller status input in i 8054 Ebus __ bagi Ethernet cross cable 1 8437 80 1 8837 80 slot 0 1 8054 Redundant Slave COMS3 RS485 Pin 1 D Pin 9 D Operations Principle 1 When the system is powered up the control of Bus7000b belong to Redundant Master 2 If Redundant Master is damaged or Power off Redundant Slave takes the control of Bus7000b 3 If Redundant Master is alive from damaged or power up again it takes the control of Bus7000b again 4 Control data is exchanging via Ebus if using a cross cable no need any ethernet switch User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 15 The 17000 en can be used to Enable Disable the control right of Bus7000 The system s default status is Enable 7000 Parameter l en EN_7000__ integer True Enable False Disable EN 70 G Return Q_ Boolean Always return True User can use the COM_MRTU function to disable the I 8437 80 s COM1 port if it is NOT redundant active then its COM1 will never answer any question to the PC HMI SCADA And also enable its COMI by COM_MRTU function if it is redundancy active Then at any time only the redundancy active controller will reply to the PC HMI SCADA as below configuration Please refer to demo_49a amp demo_49b For the use of I 7188EX MTCP Modbus TCP IP to Modbus RTU gateway please refer to Chapter 20 5 or www icpdas com
88. DAS 7 19 Chapter 8 Linking The Modbus RTU ASCII Devices Note ICP DAS ISaGRAF controllers support Modbus Master ports in different port No as below table To use COMS to COM 14 of the WP 8xx7 VP 25W7 23W7 and WinCon please refer to Appendix E of the Getting Started Manual or visit below web site to download it http www icpdas com products PAC 1 8000 getting _started_manual htm The Ethernet port of the WP 8xx7 WP 5xx7 VP 25W7 VP 23W7 XP 8xx7 Atom CE6 and XP 8xx7 CE6 can support Modbus TCP Master please refer to http www icpdas com fag isagraf htm gt FAQ 113 If you can t connect the Modbus device properly please refer to http www icpdas com fag isagraf htm gt FAQ 075 for troubleshooting or specify the Delat_Time uPAC 7186EG Pi aai WP 8xx7 XP 8xx7 CE6 I 7188EG XG 1 8437 8837 80 VP 25W7 23W7 XP 8xx7 Atom CE6 Max Modbus COM2 COM3 COM2 COM33 COMS COM14 Table 1 3 in XSxx or 5 in 5S 14 in 6 33 in expansion board I 81421W 81441W I 81421W 81441W I 81421W 81441W expansion board expansion board expansion board User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 8 1 8 1 Configuring The Controller To Be A Modbus Master To begin configuring an ISaGRAF controller system to interface with a Modbus device you must first configure the IsaGRAF program by linking the Mbus or Mbus_asc function to the ISaGRAF project Mbus
89. Ebus network If the package _1_32 is set to a value of A this will only enable the number 2 and number 4 Boolean packages to be written to or read from across the Ebus network The more packages that are enabled on a Ebus network the slower the communication efficiency will be With this in mind always remember to enable only the required number of packages that you need for your application so you will have greater communication efficiency across the Ebus network ww IsaGRAF EBOS M 10 connection File Edit Tools Options Help 2 PBeam tly s m ref 111 m package_1_32 aN ous package 33 64 0 ma package _65_96 0 Only Package No to 128 ous package Jf 126 0 is available sous package 129 160 0 smn package 161 192 0 ao m eECEEELEN JLO Board parameter m ebus_m Group tL Parameter pz kage 1 32 B boo_pack ne ana_pack n e Value Cancel g Ho 32 No l 1 enable Value of Package 1 32 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 18 The parameter package_xxx_xxx at Ebus_m ana_pack indicates the integer package number which will be written to and read from on the Ebus network The Ebus_m ana_pack is used to read and write 32 bit integer values across the Ebus network Each of the parameter values is expressed as 32 bit integer values in hexadecimal and the same configuration rules apply as those for the Boolean package om leats
90. Ene SL nanie MIT variable Slit End end_init Structured Text When you click on the Simulate icon three windows will appear The windows are the ISaGRAF Debugger the SaGRAF Debug Programs and the I O Simulator windows If the I O variable names you have created DO NOT appear in the I O simulator window just click on the Options and Variable Names selection and the variable names you have created will now appear next to each of the I O s in the simulator window In the ISaGRAF Debug Program window double click on the LD1 where the cursor below is positioned This will open up the ISaGRAF Quick LD Program window and you can see the LD program you have created SsGRAF SIMPLELD Debugger OF x File Contol Tools Options Help gt roo S AO Close the Debugger window will exit the simulation 2 simpleld saGRAF SIMPLELD Debug programs File Project Tools Options Help mi ome Hexadecimal values in fae FP Example LD Program Erid end init handle INIT variable Always on top Begin LO1 Ladder Diagram ay User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 29 Running The Simulation Program When you double click on LD1 in the SaGRAF Debug Programs window the follow window should appear Bi Sa RAF SIMPLELD LDI Quick LD Program File Edit Option Help ttt ttt ttt
91. FR_OUTO4 FR_OUTOS FR_OUTOB FR_OUTO FROITOS FR_OUTOS FROITO FR_OUT11 OLTI OUT 2 OUT S_ OUT 4 OUTS OUTE OTF OUTS OUTS OUTTO_ OUTT 1 Please assign Dump_di to non using FRNET D I channels and assign Dump_do to FROOUTI2Z40UT12_ non using FRNET D O channels Pree DO NOT assign False or FR OUTI4 aN TRUE to the non using D I and D O channels User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 23 6 Example 2 FR 2054 8 IN and 8 OUT Note The 2 pin screw termial of the FR 2054 is the IMIT l Mee FRnet communication signal A B However the FR 2053 and FR 2057 s 2 pin screw is the I O IMIT Power input Please DO connect correctly or it will damage the system FR_1600 FR_1601 G G For uPAC 7186EG FX 016 please set Slot and Port as 0 FR_INO1 FR_OUTOS OUT FR_INO FR_OUTOSOUTS_ FR_IMOS FR_OUTO4H OUTS FR_IMO4 FR_OUTOSq OUTS FR_IMOS FR_OUTOB OUTE_ FR_IMO6 FR_OUTOF OUTS FR_IMO FR_OUTOSA OUTS FR_INOs OUTS OWT TO OLIT1 1 OWT 12 If the connected module is the FR 2054 8 IN and 8 OUT its output code is a little different Please connect the same variable names of the Ist through 8th position to the 9th through 16th position of the FR 16DO function block The FR 2054 s Dip switch ADDR setting is to set the DO module address its DI module address will be auto configured as DO A
92. Fie Edit Project Tools Options Help 4 Archive 2S Widemo 2 m wdemo 45 BS O19R set as TIC K type input MBRTU E S080 MBRTU format baud 9600 tP demo www icpdass com F At fe wdemo 46 mm wdemo 48 Se e T CU m ciie er ne Ee A SaGRAF Libraries O x Author es File Edit Tools Optone Help Date of ci Version n het Asa s Descripti Flo configurations Jo complex equipments Analog Input signal from 4 20 m to User s ring Yalue Real format Function blocka pC functions aa 2 aC function blacks K ple Ci Archive C functions x i onyerzion functiona or to be Workbench Archive 1SaGRAF Libraries aj 201 to sdi Backup File Edit Tools Options Help anap se amay m So C function a fi rs estas va ary fow am rei Ss Close ary a L nput sp am_str E ie PRe 29 0 Hep ptandard note format ICP DAS WIN 22 integration ar Ww Wy bed For example Convert l bin2eng 100 psi or to become C bit wd l ctzample i N I Compress Archive location CACHUN Wess CD ROM SISAGRAP ARE Browse Pi To send email correctly please set proper Gateway IP in the controller s Ethernet port setting Please type command ipconfig in a PC s command prompt window at the same local network to get the Gateway IP setting as below Here is 10 0 0 254 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3
93. Filel F_wopen File_namel Enable read write mode if Filel 0 then If failed to open file No actions Msg1 Save File File namel Error STEP1 0 Tstop T1 stop T1 timer return leave the ST program T1 T Os end_if ere eee oe eee ok eee ce ae E ESE EE ETE E EE E EE stri Init strl as empty string for li 0 to NUM CH 1 do Convert the 18017H s analog input value to voltage value Volti ii Real 18017H ii 0 000305176 10 0 32768 0 000305176 str1 str1 Rea_Str2 Volt1 ii 3 09 The separator is lt TAB gt end_for stri stri 0D 0A add lt CR gt lt LF gt at the end of each row TMP F_end Filel Move to the end of the file to write TMP F_writ_s Filel str1 To write stings TMP F_close Filel Close file after complete the operation record_cntl record_cntl 1 5 Current record count plus 1 Check if record numbers reach the end if record_cntl gt total_ recordi then STEP1 2 Set STEP1 as 2 Recond Finished Msg1 Record is finished You may download the record file to your PC now Tstop T1 Stop T1 timer T1 T Os end_if end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 52 11 3 7 Demo_71 Recording I 8017H s Ch 1 to Ch 4 voltage input in S 256 512 in I 8437 80 or I 88
94. For windows NT 2000 amp XP users For Windows95 98 users Please skip to next three page If you are going to connect the Modem station controller check Modem station otherwise check Other IP Other IP means the target controller is not connect to a modem however connect to the Modem station controller via an ethernet cable the IP address has to be assigned He Modem_Link setup Dialog STATION NAME No Staton Connected PHONE NUMBER No Station Connected Then click on debug Select the correct COM port of your PC which will dial the modem And then click on Add Station to add a station if you have none IbaGkAF TESTI Programs File Make Project Tool Debug Options Help A HSE Oe tm S Mie mH Begin my TPE GLGLY MS ICP DAS Modem Link ICP DAS CO LTD fed Controller Station List Begir Connect to Station EXIT Help Then you will see the below window Given a name for this new station and the target phone No If you add a character inside the phone No It will wait one second and then dial the rest No For ex Given User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 13 4 No as 9 22570001 will dial 9 first then wait 2 seconds and then dial 22570001 The password must set to the same password of the modem station controller ICP DAs ADD STATION ICP DAs CO LTD PHONE NUMBER 2570001 PASSYYO
95. However it is very important please always declare the proper number you want The larger Dim number the larger memory is consumed Such as the I 7188EG XG I 8xx7 memory constrained controller x Targets ae aang a gt SIMULATE Workbench Simulator Gelert comers S TIC code for Motorok gt ISASBM TIC code for Intel i Unselect Unt C o Conversion CCB6M C source code V3 04 Attributes Format V Use embedded SFC engine Upload C Internal Integer I OHRRIZET Real Cancel Next Input M Run No optimizer passes F F C Output Evaluake constant expressions Default C Constant Suppress unused labels Previous Retain T Suppress unused code Optimize arithmetic operations Optinj e boolean operations Buig binary decision diagrams BDD s Cancel Extended e EME If using Variable Array in the program please DO NOT check the 2nd 7th 8th and 9 th Optimizer options or the value of the Variable array will be incorrect Recommend to check only the Ist Run two optimizer passes option The index of the variable array is always starting from 0 For example if you declare an integer CNT with Dim 10 the varable array will be CNT 0 9 that is the item can be used is CNT O CNT 1 CNT 9 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 65 x How to program variable array For example the below ST code
96. I 8172 in the related slot in the IO connection windows if using uPAC 7186EG FX 016 please connect frnet86 WinPAC 8xx7 s slot No is from 0 to 7 max 8 pcs iPAC 8447 8847 s slot No is from Slot 0 to 7 max 3 pcs The uPAC 7186EG can connect frnet86 on slot 0 aw SaGRAF WDEMO 39 I O connecthon _ oO x File Edit Tools Optons Help P gt Bem tril amp o mj ref 1F2A am i 8 amp l7 ma Reserved 0 B Portd_DI m mnj Reserved 0 gt Port DI ns LITLI The 8 Ch mean the comm state of FRnet D I modues of addr 8 15 E nuun nun _ _ Step 2 Declaring ISaGRAF variable FR_IN16 FR_OUT16 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 23 5 Step 3 writing LD program to map ISaGRAF boolean variable as FRnet I O INIT should be declared with an initial value of TRUE The below code can only run once in the first PLC scan cycle please don t use Fr_16di and Fr_16do in other PLC scan cycles The Fr_16DI and Fr_16DO do not support array vareable but you can use FR_B_A in the section 23 3 Example1l FR 2053 16 IN and FR 2057 16 OUT a a The Q_ output of the Fr_16di and Fr_16do is always TRUE so many IMIT Fr_16d1 and Fr_16do can be used in the same LD rung FR_1600 FR_16D 2 I er 14 slot 04 Port 44 Addr FROTO FR_OUTO FR_OUTOS
97. ICP DAS 12 3 gt Documents and Settings Admin istratorX ipconfig indows IP Configuration thernet adapter mEn Connection specific DNS Suffix banchiao icpdas com IP Address Subnet Mask Default Gateway Documents and Settings Administrator Then please fill in this Gateway IP address to your controller s Ethernet port setting If controller model is W 8347 8747 you can enable two Ethernet ports then you need to fill in both with the same Gateway IP WinCon 8xx7 8xx6 SACK DM9000 Fast Ethernet Adapter Settings IP Address Warne Servers An IP address can be O Obtain an IP address via DHCP automaticaly assigned to this computer If your network does not automatically assign l Eo IF addresses ask your network IP Address Mos D e de administrator for an address Subnet Mask 2a ass een 0 and then type it in the space provided Default Gateway 10 0 0 254 Then run WinCon Utility Save and Reboot to store the IP setting It will automatically re boot once WinCon Utility 1 for W 8X4x Ver 2 1 3 0 It will take several seconds to save your settings to registry and settings you changed will take effect after system reboot Change all settings to factory derault settings Resolution 640 x 420 240 x 400 Recover to Factory Settings Bon 1A Ine p User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 12 4 IPAC 8447 8847 amp pPAC 7186EG amp pPAC 5xx7
98. ICP DAS 18 21 M_nsppmv Normal speed pulse move Normal speed move a specified pulse Parameters card NO_ integer the card No has been set by M_regist valid is 0 19 AXIS _ integer 1 X axis 2 Y axis Pulse _ integer number of pulse to move if gt 0 move toward CW FW dir if lt 0 move toward CCW BW dir SPEED _ integer Speed low speed lt SPEED_ lt high speed Return Q_ boolean always return TRUE Normal speed HpnaleelT Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 M_Ispmv Low speed move Low speed move toward the direction specified It can be stop by M_stpx or M_stpy or M_stpall command Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 DIR_ integer direction 0 CW 1 CCW AXIS _ integer 1 X axis 2 Y axis Return Q_ boolean always return TRUE Low speed S e Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 22 M_hspmv High speed move High speed move toward the direction specified It can be stop by M_stpx or M_stpy or M_stpall command Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 DIR_ integer direction 0 CW 1 CCW AXIS _ integer 1 X axis 2 Y axis Return Q_ boolean always return TRUE high speed Ex
99. ICP DAS 9 11 Renaming An ISaGRAF Program To rename an ISaGRAF program open the ISaGRAF Project Management window click on the name of the ISaGRAF program you want to rename then select File from the menu bar and then click on Rename When you click on Rename the Rename Project window will open and now you can enter the new name for the ISaGRAF program 3 1SaGRAF Project Management lol x File Edit Project Tools Options Help Open Ctrl O Select project grou pm mn seats 3 ISaGRAF Project Management oj xi New Ctri N File Edit Project Tools Options Help 5 EB Me BS DemoPgn i Delete st_ exam Example ST Project a e i eam Example IL Project p Upload project sfc exam Example SFC Project Exit simpleld A Simple LD Program Version number 1 1Sa A Simple LD Program Description SimplelUyen urd a8 4 x one 1SaGRAF Project Management ps iol x im D Program File Edit Project Tools Options Help gt Ae Dem MS t 2B Bovemram 9 st_exam Example ST Project m il_exam Example IL Project anal sfc_exam Example SFC Project simpleld A Simple LD Program amp Simple LD Program Reference Simple LD Project od Author ICP DAS USA Inc a Date of creation 12 15 2001 Yersion number 1 ISaGRAF 3 41 Description Simple Example Of An LD Program eC The former program named scott has now been changed to gonzo but it still has all the files from the simpleld program
100. ID 1 name trend1 js TMP S_FL_INI 1 trend1 js File_begin1 File_end1 TMP S_FL_AVL 1 1 1 5 Init file content as No data at the beginning end_if if ava_num_S8256 0 then S256 S512 is not installed in I 8xx7 return return end_if If stop command is gived if Stopl then Stop1 False STEP1 0 0 no action TStop T1 stop T1 T1 T Os Msg1 User stop recording To_Blink FALSE Set as FALSE not to blink the display value end_if Get file status in S256 or S512 1 PC hasn t loaded the file yet others the end byte No that PC has load the file TMP_V S_FL_STS if TMP V lt gt 1 then PC has load the file TMP S_FL_RST Q reset status to 1 PC hasn t load the file yet end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 58 If start command is gived if Gol then Gol False STEPI O no action 1 recording 2 recond finished if STEP1 1 then Msg1 It is still recording now else Check interval valid or not we assume 25 to 10000 ms is valid in this example If your average PLC scan time is larger for example near 20 ms Please use Interval larger than 25 ms Or the record time won t be correct if Intervall lt 25 or Intervall gt 10000 then Msg1 Wrong Interval value it should be in 25 to 10000 milli second Che
101. ID the controller system will communicate with the I 7000 I 87xxx module The com_baud parameter defines the baud rate that the controller will communicate with the I 7000 I 87xxx module The possible values are 2400 4800 9600 19200 38400 57600 and 115200 In order to have a smooth communication you must make sure that the controller system and the I 7000 I 87xxx modules are all set to the same com_baud value The host_watchdog parameter defines to enables or disables the watchdog function for the I 7000 and I 87xxx module Setting the host_watchdog parameter to 1 will enable the host_watchdog feature set it to 0 will disable this feature The watchdog_timer parameter defines the amount of time before a host_watchdog will occur The value for the Watchdog_timer is defined in a hexadecimal value with the units defined in 0 1 second increments For example if the watchdog_timer is set to a value of 1E the watchdog_timer is set for 3 seconds If the watchdog_timer value is set to 2A the watchdog_timer is set for 4 2 seconds If the host watchdog feature is active and the watchdog timer is exceeded on the controller system it means the connection is break between the controller and I 7000 I 87xxx modules the I 7000 I 87xxx modules will go to a safe predetermined value by DCON utility Normally for Digital Output channel the safe state is D O False There is an analog input channel
102. Internal Index of another for loops User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 17 ST program if RE LOAD then Read file once if RE LOAD is TRUE RE LOAD FALSE Filel f_wopen File_namel Open file in Read amp Write mode if Filel 0 then 0 open file fail Msg1 Can not Open file File_namel return Cannot open file just exit this ST program end_if for ii 0 to 3 do total 4 rows if f_eof Filel TRUE then test if reaches the End Of File Msg1 There should be at least 4 rows in File_namel Exit exit this for loops end_if strl fm_read Filel read one row as string from file Convert string to become serval REAL values and store them into No Float array NUMI Msg _F str1 1 If the amount of the converted REAL values is not 5 it lacks of data 1 means format error if NUMI lt gt 5 then Msg1 The Msg ii 1 th row data format is not correct or data number is not 5 Exit exit this for loops end_if for jj 0 to 4 do Get 5 REAL values from No 1 Float array s addr 1 to 5 and store them to F_VAL O 19 F_VAL 5 ii jj ARY_F_R 1 jj 1 end_for end_for TMP f_close Filel always close File after its operation If ii 4 then All data is succefully read and converted 4 rows Msg1 Read File_namel OK
103. LD aare O E ted en aecuneiaine 2 4 ZAC Onmec Une LNG Dy seisus a Sada dat ade ieee ted A aadew lad dedaananmareenentwdeneecuaelss 2 26 Arae Compiline The Example LD Proyece vscccasies coins aeleureeaneus aa iacduptiacs taded ate neiled Peace wlndidal cael 2 28 AG CS LAPIN Neale EO e CU scctset alate atau cctnnisdstuct Min bddaios N E sista abate bel cattin Sua ine Sipe cuag ne sieantane micseandsas 2 29 2 1 5 Download amp Debugging The Example LD Project ceecesesssseeeceeeeeeeeeeeeaaaeeesseeeeeeeeeeeseeeeeeaaaaaeaeenees 2 31 2 2 A SIMPLE STRUCTURED TEXT ST PROGRAM onien a nay wives bash a a aae 2 35 2 3 A SIMPLE FUNCTION BLOCK DIAGRAM FBD PROGRAM ccccccceccceecceccescccueccececscceseceeeceeucsueseeceuscseseceeseesess 2 43 220 Programming The Example FBD Prostam ct sereeusitaceveeraresceotnssis r a 2 43 22 O MUAS ene EB D Prora Mee E E A iuseinesdh 2 48 DAG A SIMPLE INSTRUCTION PST M PROGRAM a a I T 2 50 2 5 A SIMPLE SEQUENTIAL FUNCTION CHART SFC PROGRAM c cccccccccsecccseccceccceucsecscseuscseeneseessseeesseeeeseeeseuseseues 2 53 Zou Programming The Example SPE Programi an A O cuentas 2 55 Dod Pians The SEC Prora ea A O saan 2 58 2o Sato ne SC Progr enans a S 2 64 207 USING VARIABLE ARRAY miror i a a a A 2 65 2 6 1 Assign Network Address No To Variable Array ccccccccccccsssssssssseeeecececcceeeceeacaaeessnsseeeeeeceseeeseseeaaaaggeeesses 2 68 26 2 Setting Vanable Array As Retained Variable Sioro rinereer
104. Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 6 Example 41 Connecting 1 M 7053D 16 Ch D D 2 M 07045D 16 Ch D O This example is Wdemo 41 Please follow former section s step 1 5 to do the initial setting for the M 7053 module and step 1 4 for the M 7045D module Variables comm_okl Communication state of the related M 7053D comm_ok2 Communication state of the related M 7045D M7053DL 01 to Bool wem Total 16 boolean internal variables M7053D1_16 nal D TCh 1 to 16 of M 7053D M7045DO_01 to Bool Int Total 16 boolean internal variables M7045DO_ 16 oe mema D O Ch 1 to 16 of M 7045D Project One function block program one Ladder program SaG RAF WDEMO 41 Programs iol x File Make Project Tools Debug Options Help SP HSM Oem xr mk zee Begin Begin FRO Function Block Diagrami User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 7 Function block program Request 16 bits from Slave 1 M000 Address 1 Using code starting Modbus ADDR No is 0 If CODE 1 or 2 each returned N1 ta N12 contains one word for 16 bits MfO53DI_01 M05301 02 MfO33DI_ 03 MFO33DI_ 04 MFO33DI_05 MFO33DI_06 MyO33DI_ 07 MyO33DI_ 08 M05301 09 MyO53DI_ 10 MyO33DL 14 MfO33DL_ 12 MyO33D_ 13 MOSA 14 MyO33DL 15 MOSA 16 If the SLAVE be set as 3002 means using COMS3 to connect the Mosbus Slave device that its Net ID is 2 Set it as 2001 means using
105. Mapping Digital Input Txxx Watchdog Timer sec Cat Clase 00 00 01 01 02 02 WOT will reset after the S000E receving commands 03 03 So ifthe S00QE unit does not receive any commands during the a timer interval the analogdigital output module will set the channels O6 06 by sale value i l OF 07 At the same time the Le led will flash nf ina an User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 22 7 User may enable the 87K DI Counter if you have plugged I 87K D I module in the I 3KE4 8 MTCP Every Digital Input channel of the I 87K module have a D I Counter value The max rate can be accepted is 100 Hz The DI Counter value is a 16 bits value 0 to 32767 and then from 32768 to 1 Hex is from 0000 0001 to 7FFF 8000 8001 to FFFF then back to 0000 The DI Counter value is a A I value with a Modbus address HJ Modbus Utility Fer 168 0 x File Windows Clenttools Setting Help i w Cel A B l Load DIVE Monitor Log cale I 8KE4 NetiD 1 87K DI Counter OOO 1 Connect M Cho For 87K series modules the Ol channels can hawe both Online Mode Ethernet Disconnect 1 DI Ch 2 Low speed counter l Ch3 lt 1 00Hz Write ta DO can clear the Ch counter value M ChS Ch l Ch DI Mapping DO Mapping Al Mapping AQ Mapping Analog Input Sxxxx rBddress Module Slot Trame Value Comment O Note Every I 8KE4 8 MTCP
106. Micro_SD save 3 values to 1 file every minute change file name every day Send UDP String to PC when alarm happens slot0 using variable array Time_Gap is 1 sec I 87055W wpdmo_11 wpdmo_ 14 wpdmo_16 wpdmo19 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 9 Chapter 19 2 of the ISaGRAF User s Manual Send UDP String to PC 3 sec later Time_Gap is 250ms slot0 Chapter 19 2 of the ISaGRAF User s Manual I 87055W Send UDP Str to PC 3 sec later wpdmo19a is better Time_Gap is 250 ms wpdmo19a wpdmo19b See I 87055W Chapter 19 2 of the ISaGRAF User s Manual wpdmo_20 receive String coming from remote PC or controller via UDP IP 4 wpdmo_21 using com_MRTU to disable enable Modbus RTU slave port PWM I O demo Pulse Width Modulation minimum scale is 2ms slot 0 for WinPAC I 8055W Send Time String to COM3 RS 232 every second by using COMOPEN COMSTR_W FAQ 059 slot Q wpdmo_24 Send string to COM3 when alarm to 8 happens 1 87055W Slot 1 I 8091W wpdmo_22 wpdmo_23 To move some pulse at x axis of I 8091W of slot 1 in WP 8xx7 mpeg ze Chapter 18 of the ISaGRAF User s Manual slot 1 Motion x I 8091W Chapter 18 of the ISaGRAF User s Manual slot 2 I 8090W slot 1 Motion x y I 8091 W Chapter 18 of the ISaGRAF User s Manual slot 2 I 8090W wpdmo_27 wpdmo_28 Moving to he Abs position when CMD is given MESO ee
107. O http www icpdas com products Remote_JO frnet frnet_list htm uPAC 7186EG FX 016 x board Please contact your local agent or service icpdas com FX 016 doesn t support RoHS yet ISaGRAF driver http www icpdas com products PAC 1 8000 Asagrat link htm ISaGRAF PAC http www icpdas com products PAC 8000 isagraf htm For the information to control the FRNET A I and A O modules please refer to http www icpdas com faq isagraf htm gt FAQ 154 It is better to set the Terminating resistor switch to ON position only for the first and last modules in the bus to have better i8172W communication quality Port 0 amp Port 1 WP 8xx7 or Port 0 Max distance 400M VP 2xW or iP 8xx7 or W 8xx7 Pont iiin or XP 8xx7 CE6 or T DRD lt i UNIT FR 2053 FR 2057 Ppa FR32R Max distance 400M uPAC 7186EG Porn0 only FR 2053 FR 2057 FR 32P FR 32R User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 23 1 Pin assignment of the uPAC 7186EG FX 016 Please plug the FX 016 x board into the uPAC 7186EG s slot 0 Remove the front shell of the uPAC 7186EG you will find where the slot 0 is FX 016 supports only one FRnet port The signal is A and B There is no A2 B2 for FX 016 yausayyy _ A User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 23 2 23 1 Introduction of the FRnet I O Important 2 For FRnet I O board WP 8xx7 VP 25W7 23W7 i
108. OF addH dab od Jerene VO V1 are the bit fields of number of bytes nbb using the following format VO V1 bit nbi we lo lotofol Bit corresponds to the Boolean value of the variables with the Modbus address addH addL Bit nbi corresponds to the Boolean value of the variable with the Modbus address addH addL nbi 1 Writing a to a bit will set the value of the corresponding Boolean variable to True and writing a 0 to a bit will set the corresponding Boolean variable to False Function 16 Write N Words Function 16 writes a number of words nbw to the integer variables starting from the Modbus address addH AddL to addH addL nbw 1 The number of bytes nbb is the total amount of bytes occupied by number of words nbw that is nbb 2 nbw Request siv 10 eaan eaat o0 nbw opa ok je answer iv 10 adah adar 00 abw orelifereb User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 5 4 Examples Of Modbus Function Formats Function 1 Read 15 bits starting from Modbus address 0x1020 The NET ID address 1s 1 Request ov Jor 10 20 00 OF 79 oF answer oi ono oo 3A In this example function 1 returns 2 bytes the value is OxO012 This means variables with a network address of 0x102A and 0x102D are True Modbus address is 0x1029 and Ox102C the rest of the variables are set to False Function 5 Write 1 bit to the Boolean variable with the Modbus address
109. Or it will be overflow 2 The input value of Up Counter mode is a 32 bit integer It starts at 0 then increasing by the signal input 1 2 to max value of 2 147 483 647 then if one more signal input the value will suddenly drop to 2 147 483 648 Then increasing to 2 1 0 1 2 to 2 147 483 647 The ISaGRAF integer value is a signed 32 bit integer it can not get a positive value larger than 2 147 483 647 If user apply SCADA software which can handle unsigned 32 bit integer then the value displayed in the SCADA software can be 0 1 2147483647 2147483648 2147483649 4294967295 then back to 0 1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 16 3 2 6 Using the I 87015W and I 87015PW If the position of RTD sensor is far away from the I 87015W board purchasing I 87015PW is a better choice The I 87K I O board like I 87015W I 87015PW can plug in the slot O through slot 7 of the ISaGRAF controller It can also be used as RS 485 remote I O module That is plugged in the RS 485 I 87K4 5 8 9 or RU 87P4 8 expansion unit Please refer to Chapter 6 Please refer to http www icpdas com products PAC 1 8000 8000_IO modules htm gt I 87015W I 87015 s Sample Rate is about 12 7 1 7 Hz that means 1 7 samples per second on all 7 channels The below figure is using the I 87015 in slot 1 The I 87015W 87015PW has 7 channel of RTD temperature input Please connect i_870
110. PAC Sep 2012 Rev 6 3 ICP DAS 22 1 Configure2 W 8x47 8x46 Dual Ethernet connecting Modbus TCP IP I O in both two ports PC HMI SCADA Advantage If one cable LAN1 or LAN2 is break The other one still works W 8x47 8x46 Two Ethernet version Bere NS 208 A 4 Model I 8KE4 MTCP G i 25 Iil t 5 m z Model l 8KE4 MTCP G Model l 8KE4 MTCP G Model l 3KE8 MTCP G One Wincon can connect up to 24 nodes of i SKE4 MTCP or i8KE8 MTCP User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 22 2 Configure3 W 8x37 8x36 One Ethernet version connecting Modbus TCP IP I O This configure doesn t have the advantage of configure 2 And if the NS 208 is connected to public network then it doesn t have the advantage of configure 1 PC HMI SCADA e W 8x37 8x36 One Ethernet version WS Ns 208 a Model I 8KE4 MTCP G 25 i Model I SKE4 MTCP G Model I 8KE4 MT CP G Model SKE8 MTCP G 4 4 One Wincon can connect up to 24 nodes of i 8KE4 MTCP or iBKE8 MTCP User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 22 3 22 2 Programming to Control the I 8SKE8 MTCP I O Step 1 The first step is to assign an unique IP address to all of the I 3KE4 MTCP and I 8KE8 MTCP Please power off the I 3KE4 8 MTCP short its INIT to INIT COM and then power it up Then connect a RS 232 cable from your PC
111. Sep 2012 Rev 6 3 ICP DAS 2 4 2 1 1 1 Creating An ISaGRAF User s Group Click on the Select Project Group and then click on New Group then type in the name for the new user s group you wish to create and last click on OK A ISaGRAF Project Management File Edit Project Tools Options Help Aa deg wgl to blinkseq same implementation with varf 5 4 EEEE bottlef Flow Chart Simulation of bottle production demo demo with Quick LD programming runstop First Project From Manual Ho DemoPrg simple Ladder Program rfarray demonstatres array management functions rfbars demonstrates graphic bra graphs rfbool demonstrates SFC boolean actions rfchart Flow Chart Sample application zj Reference Demo rA 2 Author ICP DAS l Date of creation 10 27 Select Version number 1 1S EEES AEEA Description Simple New project group l J x Close Name C DemoPom gt E Location Conce Sub dir Browse Path c isawin D emoPgm Note that the name that you give the New Project Group also creates a new sub directory corresponding to the project group name in the c isawin sub directory To get into the new project group either double click on the new group name or click on the new group name the name will be highlighted to select the new project group and click on the Select button User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 5 2 1 1 2 Creating A New ISaGRAF Proje
112. Si rigs ref 10 Lai C7 a OUTOIETARUE 2 2 gt OUTO2 TRUE Cal Ca OUTOS TRUE La Ls La La Lo m pushdkey ne ERR cm showsled EEN zl Die SAG EAF SIMFEFLELDO LOIL Qinek LD Program File Edit Options Help Ey ee SS a IIT OLITOA4 co i isi lt lt x 5 Though there are numerous steps involved in creating and downloading an ISaGRAF program each step is quick and easy to accomplish and the end result is a powerful and flexible control development environment for the ISaGRAF controller systems PRACTICE PRACTICE PRACTICE Now that you have successfully created and ran your first IsSaGRAF program with the ISaGRAF controller system you should practice creating more elaborate and powerful programs Like any other computer development environment practice and experimentation is the key to understanding and success GOOD LUCK User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 34 2 2 A Simple Structured Text ST Program A Structured Text program is a high level program language that is designed for automation process control applications The Structured Text henceforth referred to as ST is primarily used to implement complex procedures that cannot be easily expressed by a graphical language such as LD or FBD An ST program is comprised by a list of ST Statements and each ST Statement MUST end with a semi colon All characters inside between
113. Special range is supported since driver version of I 8xx7 3 11 W 8xx7 3 24 The 1P 8xx7 WP 8xx7 VP 25W7 23W7 XP 8xx7 CE6 XP 8xx7 Atom CE6 are also support right now Format TTRR Hex Value TT 10 Convert to Degree Celsius TT 20 Convert to Degree Fahrenheit TT 00 Default value 32768 to 32767 this is standard setting RR original range setting 9 For example setting I 87013 s range as A 1020 TT 10 RR 20 the input value will be Degree Celsius unit is 0 01 degree range 20 Platinum 100 a 0 00385 degree Celsius That results input value of 2356 23 56 Degree Celsius 489 4 89 Degree Celsius 999990 sensor broken line B 202A TT 20 RR 2A the input value will be Degree Fahrenheit unit is 0 01 degree range 2A Platinum 1000 a 0 00385 degree Celsius That results input value of 4512 45 12 Degree Fahrenheit 500 5 00 Degree Fahrenheit 999990 sensor broken line C 21 TT 00 RR 21 the input value will be Default value standard range setting 32768 to 32767 range 21 Platinum 100 a 0 00385 degree Celsius User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 10 3 2 3 Using the I 87017ZW I 87017ZW is a voltage and current measuring board in industrial application it can be set as a 10 input channels Differential Mode or 20 input channels Single ended Mode by the jumper on the board It must be set as 10 input ch
114. The I O scan rate is about 30 to 40 msec for 3000 to 6000 I O channels Q How to setup WinCon 8xx7 as TCP IP Client to communicate to PC or other TCP IP Server device Or WinCon automatically report data to PC via TCP IP 4 i 46 Q How to Write 16 bits to Modbus RTU devices by Mobus function call No 6 a 1s Q Setting a special CODE parameter of MBUS R amp MBUS_ R1 to get a clear Degree Celsius or Degree Fahrenheit input value of M 7000 temperature module 36 37 38 nae N P UO ENN O For ex 3012 means 30 12 degree 50 Q How to connect an ISaGRAF controller to M 7000 Remote I O 51 Q VB net 2005 Demo program using Modbus TCP IP protocol to control ISaGRAF PACs User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 79 Q VB 6 0 Demo program using Modbus TCP IP protocol to control ISaGRAF PACs Q Performance Comparison Table of IsSaGRAF PACs Q iPAC 8xx7 and uPAC 7186EG support Data Logger function Q How to connect I 7018z to get 6 channels of 4 to 20 mA Input and 4 channles of English ISaGRAF Ver 3 FAQ No 52 53 54 N N Thermo couple temperature Input And also display the value on PC by VB 6 0 program 56 Q How to do periodic operation in ISaGRAF PACs Q How to record I 8017H s Ch 1 to Ch 4 voltage Input in a user allocated RAM memory in the WinCon 8xx7 The sampling time is one record every 0 01 second The record period is
115. UDP aes cocci cerca sce cans A cba oti a les E Sen tidedac w ba owe ales E 19 3 19 3 TO SEND RECEIVE AUTO REPORT DATA VIA TCP IP ccc cece eccececcsceccsceccececcececeececscscescsctseecesescecescesescesesccacs 19 5 CHAPTER 20 REDUNDANCY SOLU TIONS vetsccececcaseiricenceeceei aces ciecencecenceeaescexcecnaceaeinceaces eee 20 1 20 1 XP 8XXxX7 CE6 REDUNDANT SYSTEM iciscdssiusiwiacvasdeevaveuscenspabdacesvar bacoacaiacsatehtnadadentenv seakiwhcahesdeanaveaesesegaveadesbetbeatuades 20 1 20 2 WP 8XX7 REDUNDANT S YSTEM si0icsacaceniacvavatbalesvooteanaveibeccdcentaowayat bedesveuseauavebbeadacensaciayetbaimaveseauavebbeadaentacsayesuiseias 20 5 CHAPTER 21 CONNECTING M 7000 SERIES I O MODULES ccccccccccccccccccccccccccccccccccccccccccceccs 21 1 21 1 USING DCON UTILITY TO DO INITIAL SETTING FOR M 7000 ccceceececcecececcsceccscecescuccsceceececscscscscesescesescesecs 21 2 21 2 WRITTING PROGRAM TO CONNECT TO I 7000 MODULES sccsceccececcececcececescscescscucescecescecescecescscscsctsescesescesescs 21 6 CHAPTER 22 CONNECTING MODBUS TCP IP I O esesesesssscseseseseseseseseseososcsososesesesesesesesesecsososesesesesesesesesese 22 1 22 1 INDUCTION OF THE L S5SKES MTCP O hives sccctnnsacs suse barselocnad a a sensed E E E EN E ariani 22 1 22 2 PROGRAMMING TO CONTROL THE I 8KE8 MTCP I O 000 e cece cece eee cececcsceccecscscscscsceccscucescecescssescscesescesescusesceseecs 22 4 CHAPTER 23 CONNECT
116. WORD mask bit crc mem for mask 0 mask lt 0x 100 mask crc mask for bit 0 bit lt 8 bit mem crc amp Ox0001 crc 2 if mem 0 crc POLY_CRC16 TABLE2 mask cre amp Ox ff TABLE1 mask crc gt gt 8 void crc_make WORD size BYTE buff BYTE hi BYTE lo calculate cre BYTE car 1 BYTE crc 2 crc O Ox ff crc 1 Oxff forG 0 1 lt s1ze 1 car buff 1 car crc O crc O crc 1 TABLE2 car crc 1 TABLE1 car hi crc O lo crc 1 j User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 5 7 Chapter 6 Linking I 7000 amp I 37K Remote I O Modules Note 1 The I 87017R and I 87017RC is better than I 87017 and I 87017C in industrial application 2 The I 87018Z is better than I 87018 in industrial application I 87018Z has 10 channels The precision is better than I 87018 I 87018R and I 87019R And each channel can configure to be different Input type For example using Ch 1 to 4 to measure 4 to 20 mA using Ch 5 to 8 as Thermo Couple K Type using Ch 9 to measure 2 5 V and using Ch 10 as Thermo Couple R Type The I 7018Z is better than I 7018 The reason is the same as I 87018Z I 7018z http www icpdas com products Remote_IO i 7000 A 7018z htm I 87018z http www icpdas com products Remote_IO 1 87k A 87018z htm For more description about using I 7018Z please refer to Chapter 11 3 9 09 6 1 Configuring The I 7000 amp I 87xxx Mo
117. alarm message to COM2 if CNT ii 0 then send 1st alarm when CNTT is from 3 2 1 gt 0 CNT ii 03 re start from 0 and then count to 30 second to send alarm send one message to COM2 msgl Alarm MSG ii 1 0A 0D TMP comstr_w PORT msg end_if Aad er ete ee oe te ee ee A te At ne le SE e EA EE E EAA AE E A EE E a A EE pn el a AE E INPUT event happens and every 30 second past send one alarm message If CNT ii 30 then send one alarm when CNT is from 0 1 2 30 CNT ii 0 re start from 0 and then count to 30 second to send alarm send one message to COM2 msgl Alarm MSG ii 1 30sec past 0A 0D TMP comstr_w PORT msg1 end_if end_if if CNT gt 7 then end_if if Tickl then Update OLD_IN OLD_IN ii IN ii end_for User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 39 11 3 6 Whmi_12 Recording I 8017H s Ch 1 to Ch 4 voltage input in a RAM memory in the WinCon 8xx7 The sampling rate is one record every 0 05 second The record period is 1 to 10 minutes Then PC can download this record and display it as a trend curve diagram by M S Excel Note If using WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 and VP 25W7 VP 23W7 the features described in this section can be applied but you need to use the different contents and files in individual PAC CD The
118. an integer value to the EEPROM Its format is as the below Function name W_EEP Description Save an integer to the EEPROM when its value changed Input parameters ADDR_ integer the address of the EEPROM to write V1_ nteger New value V2_ integer Old value Return parameter W_EEP integer return the new value Note The parameter names been used will become reserved names That s why we use ADDR_ V1l_ V2_ rather than ADDR V1 amp V2 15 1 Creating functions inside one project Functions created inside one project can be only called by other programs written in the same project A Click on Create new program inside the project Given Name as W_EEP Language as ST Style as Function TSaGRAF T8063 Programe is o x File Make Project Toole Debug Options Help Vet Mie OMe ABs Ey al 120 Begin EEN pee ee New Program me x We EER B im a Functi Se ee Comment Save an integer to the EEPROM _ Style User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 15 1 B Double click on the function to get into it Then click on Sub program parameters to define input and output parameters saGRAF Tau Fro prams e O xj Fie Make Project Toole Debug Options Help BP HSE DEt amp Mie mk 2s Begin m demo Functions FE Save an integer to the EEFROM Functions EEPET AE E 5 x File Edit T
119. as different user User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 1 3 1 1 3 Important Notice For Window NT Users If your computer is using the Windows NT operating system you will need to add one line to the isa ini file in the ISaGRAF Workbench EXE subdirectory C isawin exe isa ini You can use any ASCII based text editor such as Notepad or UltraEdit32 to open the isa ini file Locate the WS001 header in the isa ini initialization file it should be at the top of the file Anywhere within the WS001 header portion of the isa ini initialization file add the entry shown below within the WS001 header WS001 NT 1 Isa C ISAWIN IsaExe C ISAWIN EXE Group Samples IsaApl c isawin smp IsaTmp C ISAWIN TMP 1 1 4 Important Notice for Windows Vista or Windows 7 32 bit Users Before installing the ISaGRAF if your operating system is Windows Vista or Windows 7 32 bit please change the User Account Control settings to avoid some of the setup restrictions How to disable UAC User Account Control AN The UAC User Account Control setting requires administrator level permission 1 From the Start menu choose Control Panel gt User Accounts and Family Safety gt User Accounts then click Change User Account Control settings or Turn User Account Control on or off D H User Accounts and Family Safety User Accounts X Control Panel Home Make
120. as toward outside from motor and the CCW BW direction is defined as toward inside to motor The M_s_dir card_NO_ defdirX_ defdirY_ command provides parameters 0 NORMAL_DIR and 1 REVERSE_DIR to define the rotating direction of motor User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 7 Turn Servo ON OFF Hold ON OFF To turn servo motor into servo ON OFF state or turn stepping motor into hold ON OFF state the command M_s_serv card_NO_ sonX_ sonY_ provide parameters 1 ON and 0 OFF to turn ON or OFF Automatic protection The I 8091 card has a automatic protected system a If X aixs command is executing and moving toward CW FW direction X axis will immediately stop when LS 14 is touched To release this protection as long as X axis move toward CCW BW direction b If X aixs command is executing and moving toward CCW BW direction X axis will immediately stop when LS11 is touched To release this protection as long as X axis move toward CW FW direction c If Y aixs command is executing and moving toward CW FW direction Y axis will immediately stop when LS24 is touched To release this protection as long as Y axis move toward CCW BW direction d If Y aixs command is executing and moving toward CCW BW direction Y axis will immediately stop when LS21 is touched To release this protection as long as Y axis move toward CW FW direction e If the signal of the emergency limit switch EMG was found in CPU firmwar
121. at the first scan cycle since it is declared with the initial value TRUE INIT FALSE User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 22 11 3 3 Demo_29 Store 1200 Short Int Every 75 sec amp Send To PC Via Com3 This demo program is to save the 8 analog input value 8 samples of the I 87017 to the short integer array every 500ms Then when the number of samples reach 1200 these samples will be divided in 10 frames each frame contain 120 samples and sent to one PC via COM3 RS 232 RS 485 Project architecture sats RAF DEMO 29 Programs File Make Project Toole Debug Options Help S HS Oem es Mil om araa Begin Z St_init Do some init must be in the upper position AO Pulse generate pulse each 500 ms must be in the 2nd position Sampling Sampling data for each M pulse must be in the 3rd positic No of sample 1 1200 that is processing init value 1 position position in current short integer array 1 256 No current short integer array No which is processing User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 23 ST program st init if INIT TRUE then First scan cycle Do some init at first scan cycle COUNT 1 init count to 1 FRAME NO 0 init to 0 M2 False init M2 to false TMP comopen 3 9600 8 0 1 Open Com3 as baud 9600 char size 8 end_if no parity amp stop bit 1 LD program Pulse Generate
122. be disconnected If there is new message requested to send the TCP IP connection will be connected again The this_ip setting is only necessary if your WinCon is W 8x47 W 8x46 Please enter the IP address of the ethernet port in this controller For W 8x37 8x36 has only one Ethernet port One IP address only you don t need to specify it The port specify the remote PC or device s TCP IP server s port number The to_ip setting default is N A which means Not Avaliable If setting an IP address to it the related TCP IP client will be setting up The Send_Time_Gap setting is the minimum Time Gap in milli second to send out each TCP IP message one by one For example if setting as 250 the 2nd message will not be sent out if the Time Gap since the first message sent out is less than 250 ms The value can be 10 to 5000 ms depends on the remote device or PC s TCP IP server property After the TCP_clie is well setup Use may call Tcp_ send to send message out To receive response from remote TCP IP server please call Tep recv User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 19 6 Tep_send TCP Client send message to remote PCs or device s TCP IP server via ethernet x Target WinCon 8xx6 8xx7 since driver version of 3 36 Note The sending buffer for WinCon is 4096 bytes That means max 4096 bytes in one PLC scan can be sent to remote IP
123. be read by function 3 A word in the modbus protocol is a 16 bit value signed short integer and an ISaGRAF integer variable is a 32 bit value so only the lower 16 bits of the integer variable are returned If users would like to read a 32 bit integer signed long integer of I 8xx7 controller the proper network address of the variable should be set as described in section 4 2 Function 4 Read N Words Function 4 has the same exact format as function 3 Function 5 Write 1 Bit Function 5 writes one 1 bit to the Boolean variable with the Modbus address addH addL Request sv 05 oana v 0 oe ook Et CC e Writing a OxFF value to the byte value V will set the Boolean variable to True Writing a zero to the byte value V is set the Boolean variable to False Function 6 Write 1 Word Function 6 writes one 1 word 16 bits to the integer variable with the Modbus address addH addL Request alv 06 aaan aaa va vl eroded answer alv 06 add alah vi wb ore ore User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 5 3 Function 15 Write N Bits Function 15 writes a number of bits nbi to the Boolean variables starting from the Modbus address addH addL to addH addL nbi 1 The total number of bytes nbb is the total amount of bytes occupied by nbi bits that means nbb nbi 7 8 For ex nbi 1 8 nbb 1 nbi 9 16 nbb 2 Request stv or aaan eaat oojnb abb vo vi ee Answer siv
124. below _ISaGRAF SFC_EXAM Programs f xi File Make Project Tools Debug Options Help BP ASR am s vr ome 2a FERRER EERE EEE EERE EERE E EEE E EERE EERE SEES EEEE REESE SESE SEEESESESESESESESES ESSE EESESESEEESSSEEEESEEEESEEEEESEREEESEEEEEEEEEEEEEEEE EEE EEE SESE EERE EEE EEE EEE EEE EEE EEE ESEE SESE ESSERE EES Create new program x C semode SY Comment Ladder Portion OF SFC Program Lanquage lt Quick LD Ladder Diagram Style Begin Main program x IMPORTANT NOTE The example SFC program uses a function block that has not been used throughout the manual We will be adding the 1 Gain function block to our LD program User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 55 any type any type Description assignment of one variable into another one This block is very useful to directly link a diagram input and a diagram output It can also be used with a boolean negation line to invert the state of a line connected to a diagram output Even though the EN input and ENO output arguments are not shown in the above example they will be added when you place the 1 Gain function block in the program 15 x File Edit Tools Options Help BS XRAM KBs SM QR Ss a ae nn nn ee Mm pe aan a nn ne no we on nn en ne ne ne ee pos 4 2 Mode 1 Mode1 2 Mode2 li f You will need to change the K1 and K2 contacts type to P The P contact
125. can start to run at every reboot because all value of retain variables includes the Check1 have been well setup k B1 B2 is declared as internal Boolean variable Do not check Retain N1 N2 is declared as internal Integer variable Do not check Retain F1 F2 is declared as internal Real variable Do not check Retain T1 T2 is declared as internal Timer variable Do not check Retain if To_Retain then To set retained variables when controller is start running To_Retain False Only do it once Tmp Retain_N Check 1 This variable used as a Tag Tmp Retain_B B1 1 Tmp Retain_B B2 2 Tmp Retain_N N1 11 Tmp Retain_N N2 12 Tmp Retain_F F1 1 Tmp Retain_F F2 2 Tmp Retain_T T1 1 Tmp Retain_T T2 2 end_if To read the status of two batteries in the back plane of the 1P 8xx7 VP 25W7 23W7 WP 8xx7 and XP 8xx7 CE6 battery_statel and battery_state2 are declared as an internal integer battery_statel R_MB_ADR 1 9992 Status of batteryl return 0 Low power 99 Power ok battery_state2 R_MB_ADR 1 9993 Status of battery2 return 0 Low power 99 Power ok After then B1 B2 N1 N2 Fl F2 T1 T2 will be automatically retained in the program Then you can judge whether the Check1 value is correct and then start to do some actions in the Ladder or ST program The aim is to set proper retain value at leas
126. communications parity setting will be Setting the parity parameter to a value of 0 sets the parity to none a value of 1 sets the parity to even and a value of 2 sets the parity to odd stop_bit It defines the number of stop bits will be used in the Modbus communications If the stop_bit parameter is set to 1 this equals 1 stop bit and a value of 2 equals 2 stop bits timeout It defines the allowed time to wait for response from remote device unit is 0 001s The parameter is very important The default value is 500 which means the Modbus device must reply within 0 5 second If the response time of the connected Modbus RTU device is slowly please set a larger timeout value Set it as large value it can communicate with the device which has a slower response time But when communication fails the controller will wait a long time to send the next Modbus Master command Recommend to set this value between 200 to 4000 aw L8aGRAF TESTI 14O connechon ol x File Edit Tools Options Help B a gt SPrn t FRASE o E JEL J baud 19200 wj char 4 mn parity 0 stop bit 1 6 timeout 500 9 em mbus B com_port n x Note When setting COM1 of the I 8xx7 I 7188EG uPA C 7186EG iP 8xx7 to be a Modbus master port please refer to each Getting Started Manual to Setting COM1 As None Modbus Port to disable COM1 Modbus RTU port User s Manual Of ISaGRAF PAC Sep 2
127. controller sends commands for how data is to be exchanged across the same Ebus Group_No network If you configure more than one controller as a master or configure none of the controllers as a master NO DATA CAN BE EXCHANGED across the Ebus Group_No network User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 16 7 5 2 Configuring the ISaGRAF PAC To Be A Ebus Master Or Slave To begin configuring the controller system as either a Ebus master or a slave first open up the TSaGRAF I O Connections window and double click on a slot number higher than 7 The Select Board Equipments window will now open click on Equipments and then double click on the Ebus_s selection to configure an Ebus slave or double click on Ebus_m to configure an Ebus master Remember ONLY ONE controller system can be the Ebus master and you CANNOT configure an controller to be both a master and a slave If you config a controller as an Ebus slave only one parameter needs to be set the Group No The valid value is ranging from to 10 Set to other value will become a default value 1 am eaGRAF EBUS M_ IO connection File Edit Toole Option Help S gt BSem LIFA amp a mj ref 113 Group No 1 Li iA TW Board parameter Parameter Group_No Value Cancel Aelelelelelet 10 m ebus_ 5s B Group n l If you config a controller as an Ebus master the parameter Group No should be set t
128. demo_17 amp Wdemo_10 For those data which are frequently changed are not suitable to be stored in the EEPROM User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 7 10 3 Battery Backup SRAM Note The WP 8xx7 VP 25W7 XP 8xx7 CE6 XP 8xx7 Atom CE6 PAC support new retain variable refer to Section 10 1 but not support S_X_X function listed in this section to read write battery backup SRAM Read floating point value from S 256 512 amp X607 608 may cause controller fault if no floating point value saved inside Please refer to Section 10 6 Controller Fault Detection The I 8xx7 controllers can integrate with a S256 or 512 battery backup SRAM to store data alarm and information while X607 amp X608 for the I 7188EG XG controller The data stored in these SRAM is always retained unless their battery running out of energy Their memory size is as below The upper 12K is reserved while 64 KB is reserved by W 8337 8737 8336 8736 I 8417 8817 8437 8837 I 8437 80 I 8837 80 I 7188EG XG pPAC 7186EG S256 244K bytes 256 12 244 X607 116K bytes 128 12 116 5512 500K bytes 512 12 500 X608 500K bytes 512 12 500 W 8337 8737 8336 8736 256 192K bytes 256 64 192 512 448K bytes 512 64 448 If battery backup SRAM is found in the controller the maxinum number of retained variables for new retain function Retain X Retain_A Retain B Retain N Retain F amp Retain T
129. e U User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 34 pwm_ON Set parallel D O to TRUE immediately Parameters SLOT_ integer Which slot 0 7 CH_ integer Which channel 1 32 Return Q_ boolean TRUE Ok FALSE wrong input parameters too many PWM outputs been enabled or the associate output channel is not found Example I 8xx7 1P 8xx7 demo_63 W 8xx7 Wdemo_22 pwm_OFF Set parallel D O to FALSE immediately Parameters SLOT_ integer Which slot I 8xx7 0 7 I 7188EG XG 0 W 8xx7 1 7 CH_ integer Which channel 1 32 Return Q_ boolean TRUE Ok FALSE wrong input parameters too many PWM outputs been enabled or the associate output channel is not found Example I 8xx7 1P 8xx7 demo_63 W 8xx7 Wdemo_22 Note 1 Max 8 output channels can call PWM_en PWM_en2 pwm_ON pwm_OFF at one controller 2 pwm_ON will set the associate parallel D O to TRUE immediately 3 pwm_OFF will set the associate parallel D O to FALSE immediately 4 If users wish to enable one D O as PWM output by PWM_en or PWM_en2 after pwm_ON amp pwm_OFF has been called please disable it first by PWM_dis then call PWM_en or PWM_en2 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 35 PWM sts Get PWM status Parameters SLOT_ integer Which slot 0 7 CH_ integer Which channel 32 Return Q_ boolean TRUE this channel has been enabled and still in an operation FALSE disable for pwm_
130. exist in ISaGRAF in your PC please visit http www icpdas com products PAC 1 8000 sagraf htm to download the ICP DAS utilities For ISaGRAF Then run setup exe inside it to re install all new ISaGRAF c function amp I O boards definition to your ISaGRAF workbench User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 68 How to test this demo The following steps is only for using Web HMI as Human Machine Interface If you are using VB 6 0 Demo_5 as HMI please run it in your PC and only do procedure listed in step 1 not necessary to enable Web HMI step 3 and step 6 1 Please plug one I 8024 in W 8xx7 s Slot 2 one I 8017H in Slot 3 Then connect Ch1 to Ch 4 voltage output of I 8024 to Chl to Ch 4 of I 8017H Then power up WinCon Check Enable Web HMI option as below For demo purpose please don t check Enable Account Security OGN F 7f 7 meres Priority Low Setting Web about i ta a User Name Options V Enable Web HMI BR Disable FTP Serveice Priority Middle V Disable Telnet Serveice User Name Password pear Edit R Password To set up advanced security 4 ERFA Priority High User Name Password mA 10 15am 2 2 Copy all files of Web HMI s Demo_13 to WinCon s CompactFlash Temp HTTP WebHMI folder by ftp utility For example run ftp 10 0 0 103 in Internet Explorer Web HMI codes resides at W 8xx7 CD ROM napdos i
131. for loops i Integer Internal Index of for loops The User Data variable Here we have 17 variables in the demo program User can declare them to different Datal Data5 And REAL Internal variable name If name is modified the G _ data and Data06 Data17 the S_data program should be modified also User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 24 ST program ST1 if RE LOAD then if RE_LOAD is TRUE get retained data from file RE LOAD FALSE Set RE_LOAD as FALSE caculate number of rows and data number of the last row num_rowl SIZE1 10 last_numl1 SIZE1 10 num_rowl if last numl lt gt 0 then num_rowl num_rowl 1 if last_row has data num_row1 must plus 1 else last_numl 10 end_if Get retained value from file when controller is powered up TMP read_F1 if TMP FALSE then Read file error or file not exist for ii 0 to SIZE1 1 do F_ VALI ii 0 0 setall F_VALI s value as 0 0 end_for Data_Ok1 FALSE set data is not Ok Msgl1 File File namel not exist or data error or File is open now else Read data Ok Data_Ok1 TRUE set datais Ok Msg1 Get Retained data from file Ok end_if Update Old_F_VALI for ii 0 to SIZE1 1 do Old_F_VALI1 ii F VALI ii end_for Get user data from F_VALI1 when cont
132. iets Mena sued ian a added Blan tied taenna ied elas ey 16 1 16 2 CREATE BACKGROUND PICTURE OF THE MINIICON iisetycncansisacwitehuceianadabavesetecnsa aid n e adena A O NaS 16 2 16 37 WRITING CONTROL PROGRAM oroni a a E A E A E N 16 2 CHAPTER 17 SMS SHORT MESSAGE SERVICE ssrannraro a A A A 17 1 Vile HARDWARE INSTALLA TION reige e ERE A E ua ivin taut dactanlecttaawtivsaana ses 17 1 I2 ASMSDEMOEXAMPEE aitean aine a N E A A E 17 2 CHAPTER 18 MOTION ira e a E E E E 18 1 15 1 TINS PATE MIO TION DRIVER catene a E A A AN a 18 1 1S 2 INIRODUC TION ciero ea a a eemaatel eb bxald wecbusesncaetawenienaa siete atoe 18 3 LS Dl System Blok Diaa rA Naara a aa aa aaa a a 18 3 1522 DDA TECMNOlO o Vea aa a a a a a aa aa a aa aaceaiant 18 3 15 3 HARDWARE urane a a a a a a ar a A 18 5 1S E8000 Hardware addres Sarau a a aaa ar e a aia 18 5 1S2 CEDIN bers a aaeeene cr eer grein a a a a a a a a a OTe a 18 6 tSo Hardware Conteur one a i 18 6 18 343 Pin assionimient Of CONMECLOR CN 2 ria E A clacton 18 9 DEES SOFTWARE n a tase etal ahh lata dh ssl A A la anhas anata Win satmaeesyab aa tiats 18 13 I O connection 18 13 SELES COMMIANIOS araa a a tenia aSaautou dean a cuttan Vinaals hoa anstle ala ahaauadel i 18 14 M_regist Resi Sten Orie TOO a sass ta lta a Alen heuleh ala isd coarse abel aaa delta 18 14 M_r_sys Reset alset tine 26cranc ices a A ee alauoure maine alas eeiiauee 18 15 M_s_var SEL MONON system parameters v ie ctasvasasonvaensdewWarwehneeiiea atone e EE
133. input value for example value of 2312 means 23 12 Degree Celsius Then please set ADR_ to a special value defined as below Important Special ADR_ setting is supported since driver version of I 8xx7 3 11 I 7188EG 2 09 I 7188XG 2 07 uwPAC 7186EG 1 01 uwPAC 5xx7 1 01 1P 8xx7 1 01 WP 8xx7 1 01 WP 5xx7 1 01 XP 8xx7 Atom CE6 1 01 XP 8xx7 CE6 1 01 VP 25W7 23W7 1 01 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 13 Format TTRRAA Hex TT 10 Convert to Degree Celsius Unit is 0 01 degrees TT 20 Convert to Degree Fahrenheit Unit is 0 01 degrees TT 00 standard setting 32768 to 32767 RR should be set as 00 if TT 00 RR type code setting of the related temperature input module The Initial value is configured by DCON Utility AA address of the related temperature input module 01 FF For example setting ADR_ as A 16 102011 TT 10 RR 20 AA 11 Hex the input value will be Degree Celsius unit is 0 01 degree range 20 Platinum 100 a 0 00385 degree Celsius address 17 Dec That results input value of 2356 23 56 Degree Celsius 489 4 89 Degree Celsius 999990 sensor broken line B 16 202A03 TT 20 RR 2A AA 03 Hex the input value will be Degree Fahrenheit unit is 0 01 degree range 2A Platinum 1000 a 0 00385 degree Celsius address 3 Dec That results input value of 4512 45 12 Degree Fahrenheit 500 5 00 Degree Fahre
134. it Below example will send a string QUESTION to device via COMS3 then waiting device to reply the related answer And then 2 seconds later send next same question to device SFC program Port_OK amp TMP is Boolean Internal NUM1 is Integer Internal Open COM3 as 9600 8 N 1 Action P Port_Ok COMOPEN 3 9600 8 0 1 End_ Action Port_Ok If succeed go next step Send request to COM3 Here using QUESTION as a demo Action P TMP COMSTR_W 3 QUESTION End_ Action Here should wait some time to let all replied bytes to be completely received by ISaGRAF controller The time value should be wait is GS2 T gt T 250ms dependent to the device and communication baud rate If it is too short the COMARY_R function in the next step may miss some bytes Action P NUMI COMARY R 3 1 IF NUM1 10 THEN Receive all bytes to No 1 Byte array Then do proper operations code here is only for demo K K a E 7 lt _If the format is correct do proper operations sak IF Here for a demo we skip the code of proper operations End_Action P De 2 secons later go back to step 2 to send next request User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 24 2 24 2 Controller just wait data from the remote device This kind of application is very common in the store Like the device of Bar code reader when it
135. m blinkseq Same impleme Language refere m bottlef Flow Chart Ldbrary demo demo with Gi SaGAAF Workbench Version 3 55 Copyright 71990 2007 ICS Triples SaGQRAF Ine Configuration If it still displays Maximum number of IO variables 32 the driver may not be installed well Please do the following steps Dongle Protection Please execute the ISaGRAF CD_ROM Sentinel5382 setup exe for ISaGRAF 80 or Sentinel setup exe for other ISaGRAF version and then reset the PC again USB Key Pro Protection 1 To make your PC recognize the ISaGRAF USB protection key please un plug the USB protection key from your USB port first then run Sentinel SSD5411 32bit exe in the IsaGRAF 3 55 CD ROM or later version after you have installed the ISaGRAF Then please reset your PC 2 To run ISaGRAF Ver 3 5x please always plug the USB protection key in the PC s USB port User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 1 2 1 1 2 Important Notice For Windows 2000 users When closing my ISaGRAF window on windows 2000 it holds Why This problem usually happens on the windows 2000 When you close some ISaGRAF windows by clicking on the X it holds about 20 to 40 seconds No response This hold behavior is caused by the CTFMON EXE process We still don t know the reason E3 Windows LIFES E Ioj xi yet You may stop this process WERD A RAO EAH by click on the Ctrl
136. modify the analog board Range parameter click on the word Range in the ISaGRAF I O Connection window and the I O Board Parameter window will open User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 7 Enter in the correct Range parameter for your particular analog board application 1 0 Board parameter _ x Parameter range OK Value FER The below table provides information on several of the possible options for the Range parameter Note that the default value is set to 8 which means you can interface to a 10v to 10v signal with a range value of 32768 to 32767 Changing the value of Range parameter to 9 means you can interface to a Sv to 5v signal with a range value of 32768 to 32767 Note that if you set the Range parameter to A you will be interface to a 1v to 1v signal with a range value of 32768 to 32767 This range value can be very helpful in analog applications that require a great deal of resolution over a very small range typically temperature control 10 OV gt 10 32768 gt O gt 32 67 modbus val 6000 gt 0000 gt 7 FFF 3 5 gt OV gt 5 32768 gt 0 gt 32767 modbus val 8000 gt 0000 gt FFF A 1 gt OV gt 1 32768 gt 0 gt 32767 Please refer to Appendix D Table of The Analog IO Value for more information for several different types of analog boards and their
137. n elele Beee g A simple LD program to show the VALI to 7 segment LED VALIOLED RUN The WP 8xx7 XP 8xx7 CE6 VP 25W7 doesn t support this function block so without adding it After you finish this project compile and download it to the IsaGRAF controller User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 14 4 4 2 Program the Touch 500 The EasyBuilder 500 software can be used to designe many useful pictures for Touch 500 series This section illustrates a simple example to program a Touch 510T For more information about programming on the Touch series please refer to the user manual which 1s provided with the Touch series hardware Click on the Windows Start button then click on the Program button then click on the EasyBuilder EasyBuilder 500 button The following window will be displayed Select the proper model for your application EFasyBuilder Welcome to EasyBuilder 500 gE B T Please select your model Click File New to create a new project EasyBuilder EBFril Window 10 Initial Screen Gpen Close Save Ctrl s Save As 1 testepy 2 EBPril epy 3 CAEBSOO T Projectitest ep 4 CAEBSOO TiProjectitest2 ep m I D taea O N Ei User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 15 Click Edit System Parameters to set the communication parameter between the T
138. need to declare a Boolean Internal variable named ZZ for both the SB and SC controllers so they can exchange the ZZ value with the SA controller system You must declare the ZZ variable as an internal variable for the SB and SC controllers because there is only one real input variable from the SA controller that 1s being exchanged and either the SB or SC has a real input variable named ZZ An additional requirement for this example is that an internal integer value named WW that comes from the SB controller system needs to be shared with the SC controller system To accomplish this declare an Internal integer variable named WW on both the SB and SC controller systems Example Prerequisites The SA controller system is the Fbus master controller and the SB and SC controllers are Fbus slave controllers Each of the controllers has their baud rates set to 19200 D Master Boolean package number 1 WW Integer package Ab number 1 Boolean package _ User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 10 Setting The SB and SC Controllers As Fbus Slaves You should use the SaGRAF I O Connections window to declare the SB and SC controller systems as Fbus slaves ISaGRAF TEST 1 0 connection cs Me S ERRETA i cassie Setting The SA Controllers As Fbus Master Use the SaGRAF I O Connections window to declare the SA controller system as the Fbus master controller ISaGRAF TEST 1 0 connection Us
139. o ir 17d16 8701 70W 16CH Single Ended 4 B1 Azi 0 Poe ZV OCH Differential Asl C Boards iB 7220 e701 zv 20CH Single Ended All Equipments mbus asc Modbus ASCH master Note If the current input sensor is 4 to 20 mA user may better set I 87017ZW s range type to D 20 mA or 1A 0 20 mA set as 7 4 to 20 mA is not good The reason is If setting I 87017ZW s range type as 7 4 to 20 mA analog Input value of 0 or close to 0 could mean the Sensor input is 4 mA and also possible the Sensor is broken line So it is not easy to distinguish these two situations by software Howevr if setting I 87017ZW s range type as D 20 mA or LA 0 20 mA analog input value of 0 or close to 0 only means the Sensor is broken line If the Sensor input is 4 to 20mA the analog value should be 6553 to 32767 not close to 0 If you want to distinguish whether the current sensor 4 to 20 mA is normal It s better to set the range type as D 20 mA or 1A 0 20 mA So when the input values Al A2 are less than 5000 or 4000 in your program you can determine the sensor is broken line or abnormal If the range type is set as 7 4 20 mA you can t judge the sensor is 4 mA or abnormal User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 13 3 2 4 Using the I 8017HW I 8017HW is an I 8K parallel analog input board and provides 8 Ch Differenti
140. of 32 bit float 114 EEP_F R Float error 115 EBUS_F_R_ Float error 116 FBUS_F_R_ Float error 117 F_REAF_F Float error Only in WinCon 8xx7 118 Can not find I 87K I O board in slot 0 to 7 119 ARY_F_R Float error 121 ANAC operation error For ex ANA 1 23E20 ANA 2 0e25 122 TMR operation error For ex TMR 1 23E20 TMR 100 123 Floatng point calculation error For ex pow 1 23E20 3 0 expt 5 0 10000000 124 PID_ALC floating point calculation error exceeds valid range of 32 bit float 125 REAL Variable array float error It may be the array index out of the declared range User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 32 When Local fault happens the project is still running the ISaGRAF project can use R_MB_ADR 1 9999 to get controller_state R_MB_ADR 1 9998 to get fault_type To clear the value in Network address 9999 amp 9998 please use W_MB_ADR 1 9999 0 and W_MB_ADR 1 9998 0 Please refer to below example Example When controller Local Fault happens the IsaGRAF program can detect it and then program can do the right action is_fault amp fault_type are declared as internal integer tmp is declared as internal boolean PC HMI can request controller fault state amp type by Modbus protocol at No 9999 amp 9998 to get controller state is_ fault R MB_ADR 1 9999 0 Ok 1 controller fault happens To get con
141. profile generation and protection is executed by the CPU on I 8091 card the limit switches must configure as following diagram The motion command just can work properly CCW BW CW FW lt gt Motor ae ET TE a LSI ORG 1 LSJ 4 LS11 ORG1 LS14 EXT_GND_ i EMG a X axis Emergency Fig 5 Limit switch configuration of X axis User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 6 CCW BW CW FW lt gt 5 P IIL I I com Oooo Motor LS21 ORG2 LS24 OF O Q O O7 O LS21 ORG2 LS24 EXT GND a 7 Y axis Fig 6 Limit switch configuration of Y axis Output pulse mode configuration I 8091 card provide two kind output method a CW CCW mode b Pulse Direction mode The command M_s_mode card_NO_ modeX_ modeY_ provide parameters 0 CW_CCW and 1 PULSE_DIR to define output pulse mode CW PEI Li Mode 0 CW_CCW CCW Pulse PLJI LI LI LI LI Ld Mode 1 PULSE_DIR Direction Fig 7 Output pulse mode Direction configuration Sometimes the output direction of X axis Y axis is not in the desired direction due to the motor s connection or gear train It is recommended to unify the output direction as shown in Figure 5 6 The CW FW direction is defined
142. program to exchange data across an Fbus network Fbus_b_r read one boolean package Fbus_b_w write one boolean package Fbus_n_r read one integer package Fbus_n_w write one integer package Fbus_f_r read one REAL package Fbus_f_w write one REAL package The Integer package and REAL package use the same memory Please DO NOT use the same package No as Integer package and also as REAL package at the same time Or the local fault No 116 may happen Please refer to Chapter 10 6 The below block is to get the communication ststus of each Boolean amp Integer Package Fbus_sts Get ststus of each Package Fbus Function 1 Fbus_b_r The Fbus_b_r function reads one Boolean package from the Fbus network In the example below the Fbus_b_r function has a Boolean package ID address of 1 The A1 output contains the value of the first Boolean of the package No of 1 the A2 output contains the value of the second Boolean of the package No of 1 and the A3 output contains the value of the third Boolean of the package No of 1 The other outputs follow the same format to where the A8 output contains the value of the eighth Boolean of the package No of 1 Please do not add any a ey y condition on the left of the p Fbus_xxx block PACK NOL Fe Package No should be a constant value not a variable value A ag User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 7 Fbus Function 2 Fbus_b_w The Fbus_
143. project name is Demo_72 It can run in the I 7188EG hwPAC 7186EG uwPAC 5xx7 If user want to run in I 8xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 or WinCon 8xx7 please set the com_port parameter of Bus7000b in the IO connection window to COM3 and then re compile the project If using WP 8xx7 WP 5xx7 VP 25W7 23W7 set the com_port parameter of Bus7000b to COM2 demo 72 pia resides at I 8000 CD ROM napdos isagraf 8000 demo or ftp ftp icpdas com pub cd 8000cd napdos isagraf 8000 demo _ or VB 6 0 project Demo_4 resides at 1 8000 CD napdos isagraf vb_demo demo_4 or http www icpdas com faq isagraf htm FAQ 055 I 7188EG s COM2 RS 485 can connect I 7000 or I 87K 4 5 8 9 expansion base plus I 87xxx I O boards in it One J 7188EG can connect max 64 pcs of I 7000 modules or I 87xxx I O boards the total amount of I 7000 I 87xxx is up to 64 pcs To use I 8xx7 s COM3 RS 485 to connect I 7000 I 87xxx is the same as I 7188EG the total amount is also 64 pcs While max 255 pcs for using W 8xx7 s COM3 RS 485 to connect I 7000 I 87xxx The more RS 485 I O modules connected the more I O scan time will be For example if setting baud rate as 9600 bps Bit Per Second one RS 485 D I amp D O module will consume about 20 to 40 milli second to scan its I O channels If connecting RS 485 A I amp A O module one will consume about 40 to 60 ms The I O scan time of the remote RS 485 I O m
144. reads bar code on the product it will send the related data to the controller via RS 232 422 485 The controller just receive it not necessary to send any byte to device Please visit www icpdas com FAQ Software_ISaGRAF 066 for demo program and more information Device ISaGRAF controller 1 When event happens send data to 2 If receive correct data do proper action controller 3 Then wait next data ST program Variable declaration INIT is Boolean Internal init as TRUE IF INIT THEN Port _ Ok amp TMP is Boolean Internal INIT FALSE T1 is Timer Internal Port_Ok COMOPEN 3 9600 8 0 1 STEP amp NUM1 is Integer Internal T1 T 0s STEP 0 END_IF Open COM3 as 9600 8 N 1 IF Port_Ok False THEN Return If open fail just quit this ST program END IF j 2 CASE STEP OF STEP 0 means waiting state it should check if any byte 0 IF COMREADY 3 THEN come in If COMREADY returns TRUE it means there is at STEP 1 least one byte come in Then set STEP to 1 and start timer T1 T Os T1 to tick Tstart T1 END IF STEP 1 means data is coming when T1 tick to the specified waiting time call COMARY_R to receive all bytes to No 1 byte array this will make sure all bytes from the device all well received This waiting time is dependent with the Device and the communication baud rate
145. respective ranges Note Analog conversion functions The below functions are useful if user want to convert analog I O value to application engineering value For example to convert 4 to 20 mA to become 0 to 1000 Psi user can use function A4_20_ To to do it Please refer Appendix A 4 for more description 1 A4 20 To to convert 4 to 20 mA analog value to become engineering value 32 bit Real 2 V0_10_ To to convert 0 to 10 V analog value to become engineering value 32 bit Real 3 To_A4_ 20 to convert engineering to become 4 to 20 mA analog output Value Integer 4 To_V0_10 to convert engineering to become 0 to 10 V analog output Value Integer 5 BINZENG to convert Analog value Integr value should be in 32768 to 32767 to become engineering value Integer value should be in 32767 to 32768 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 8 3 2 2 Setting special range parameter of temperature input board to get clear Degree Celsius or Degree Fahrenheit input value ICP DAS provides many temperature input modules as below The I 7000 series I O is only for RS 485 remote I O CAN T be use in slot 0 7 With broken line detection or called wire opening detection Thermocouple type I 87018RW 87018PW 87018ZW 87019RW 87019PW 87019ZW I 7018R 7O18BL 7019 7019R 7018Z RTD type I 87013W 87015W 87015PW I 7013 7015 7033 Thermister type I 87005W I 70
146. run it again fRIICPDAS UDiosder Upload SRAM MODU er File ID fs 2 E 4 Ey 6 7 9 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 F D Cama z ol E E m mm oe cS Can a z ee 2 2 9 o g ol Target Slave Numbet Communication pe Control Retries RS232 Baudrate Parity ByteSize StopBits ETHERNET Internet address Port number Time out seconds Upload Upload 1 Upload 2 Upload 3 Upload 4 Upload 5 Upload 6 Upload 7 Upload 8 Upload All ICP DAS 11 54 5 If the controller is well connected you will see a File Name displayed on the below window Value of Head and Tail is the current size of the record file in the S 256 S 512 The below example shows 67 200 bytes Note S 256 S 512 has size limitation please refer to Chapter 10 3 you may modify the file upload location path by click on Browse Then please click on Upload 1 to upload this record file to your PC bed ICPDAS UDloader Upload SRAM MODULE 512 FileID File Name trend 1 001 js 2 NotUsed E Uplsad 2 NotUsed PE Upload s NotUsed FL 5 e lt u Upload 4 as FE ln S Mobs FEF pl Rasa FE ER A a fotUsed FER pss 8 Upload AD Destination Folder C Documents and Settings administrator EU Dloader set Load File Download
147. s COMI to the I 3KE4 8 MTCP s COM1 Then please run 7188xw exe on PC 7188xw exe is burned in I 83000 CD ROM or can be download at ftp ftp 1cpdas com pub cd 8000cd napdos minios 7 utility If your computer has no COM1 COM2 or you use other COM like COMS to link the I 3KE4 8 MTCP you can change the C number in the first line of 7188xw in1 file EX Using computer s COMS to link to I 83KE4 8 MTCP 3115200 PO D8 S1 C5 B115200 PO D8 S1 Xautoexec bat X1sa7188e exe w25 Xautoexec bat X1sa7188e exe w25 6Ge 99 Press some lt Enter gt in the 7188xw exe windows and then type ip to view the current IP setting Then type in for example ip 192 168 2 70 to set an IP address to it To set mask address please type in for example mask 255 255 255 0 PLEASE make sure to remove the connection between the INIT and the INIT COM pin on the I 8KE4 8 MTCP s front panel after setting successfully And then re cycle its power Recommend to use the NS 205 NS 208 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 22 4 Step 2 The second step is to configure all of the connecting I 3KE4 8 MTCP by running Modbus utility The Modbus utility is burned in the I 3000 CD ROM or can be download at http www icpdas com products PAC 1 8000 modbus_web_download htm ila Modbus Utility I Linking a 7158 fe IaGRAF 35 O MERTU ICP DAS U
148. should now look like the below example ICP DAS 2 60 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 loxi 4 1SaGRAF SFC_EXAM MAIN File Edit Tools Options Help a xpa m xod eA FE FED Fe p Fs fh Fehi FaH Fet File Edit Tools Options Help G2 m xda Fo Fo C0 Fe p Fs fh F H F7 H ere E 1SaGRAF SFC_EXAM MAIN SFC progran a Ed Fie Edit Tools Options Help Dal xoa m xid aai Feja tH aR convergence Grtnenaseterennnenes ze Tesseseesesesseeeel Now click on the Jump To Step F5 icon this will open the Jump Destination window Double click on the GS1 label in the Jump Destination window User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 61 fi 11SaGRAF SFC_EXAM MAIN SFC File Edit Tools Options Help Dal Xaa mMm xed ae FD FC Fe Fs F644 FH oF ete tF Jump to step Jump destination x Destination Cancel Potten eee teereeeeens 4 pos 4 6 We have now finished programming the Main portion of the example SFC program The next detail is to add the code for each of the steps and transitions Double click on step 1 initial step and the TSaGRAF SFC Program window will open Type the displayed text into the area shown below This will associate the typed in code with the step 1 REMEMBER to type a semi colon at the end of each line of code 1SaGRAF SFC_EXAM MAIN SPE File Edit Tools Options Help
149. the XP 8xx7 CE6 XP 8xx7 Atom CE6 use the path System_Disk Temp HTTP WebHMI Please refer to the following website to get more details WP 8xx7 setup _web_hmi_demo pdf ftp ftp icpdas com pub cd winpac 8xx7 napdos isagraf wp 8xx7 wp_webhmi_demo VP 25W7 VP 23W7 setup web hmi demo pdf ftp ftp icpdas com pub cd vp 25w7 23w7 napdos isagraf vp 25w7 23w7 vp webhmi demo AJ XP 8xx7 CE6 xpce6 setup web hmi demo pdf ftp ftp icpdas com pub cd xp 8xx7 ce6 napdos isagraf x p 8xx7 ce6 xpce6 webhmi demo N The Whmi_13 pia can run in WinCon 8xx7 8xx6 with driver version of 3 36 or later version New drive http www icpdas com products PAC 1 8000 sagraf link htm whmi_13 pia resides at W 8xx7 CD ROM napdos isagraf wincon demo or ftp ftp icpdas com pub cd wincon_isagrat napdos isagrat wincon demo VB6 Demo_5 code at W 8xx7 CD ROM napdos isagraf wincon vb6_demo_pc or ftp ftp icpdas com pub cd wincon_isagraf napdos isagraf wincon vb6_demo_pc If using Web HMI in this demo the Web HMI codes resides at below location Please refer to Chapter 3 4 and 5 in the WinCon ISaGRAF Getting Started manual or W 8xx7 CD ROM napdos isagraf wincon english_manu getting started w8337 pdf W 8xx7 CD ROM napdos isagraf wincon WebHMI_Demo whmil3 or ftp ftp icpdas com pub cd wincon_isagraf napdos isagrat wincon webhmi_demo If new c function of Msg_F Msg_ N ARY_F_R and AFY_F_W doesn t
150. the controller system You may have to either change the serial port communication settings for the development PC or change the Serial Link Parameters in the ISaGRAF program If there is a project already loaded in ISaGRAF SIMPLELD Debugger _ O x the controller system you will need to File Control Tools Options Help stop that project before you can gt gt pl bb re mh download the example project Click NoManolication on the STOP icon as illustrated 23 Stop application fication stopped above to halt any applications that may be running O x 1SaGRAF SIMPLELD Debugger r ools Options Help STARTING THE DOWNLOADING PROCESS NE ownioad i From the ISaGRAF Debugger window Bi ida a click on the Download icon then click Download on ISA86M TIC Code For Intel from ISA86M TIC code for Intel the Download window as shown below Application symbols Cancel User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 32 The example project will now start downloading to the ISaGRAF controller system A progress bar will appear in the ISaGRAF Debugger window showing the project downloading progress ISaGRAF SIMPLELD Debugger File Control Tools Options Help QOpim rA AL 23 39 37 0 application stopped When the example project has successfully completed the downloading process to the controller system the following two windows will a
151. the hardware and the RS 232 cable which is delivered with the MMICON packaging can connect to the COM4 of the I 8417 8817 8437 8837 and CN3 of the MMICON Pin assignment I 8417 8817 8437 8837 COM3 amp COM4 can be used WinCon 8xx7 COM2 I 8xx7 COM4 MMICON CN3 I 8xx7 COM3 MMICON CN3 W 8xx7 COM2 RS232 RS232 RS232 2 RXD 2 TXD 3 RXD 2 TXD 3 TXD 3 RXD 2TXD 3RXD 5GND 5GND 5GND 5GND I 7188EG XG COM3 can be used COMS3 is added on X503 X51x board I 7188EG XG MMICON CN3 RS232 RS232 RXD 2 TxD TXD 3 RXD GND 5 GND 2 Please set Jumper J2 of MMICON to position INIT I 8417 8817 8437 8837 I 7188EG XG amp W 8xx7 only support COM parameter 9600 8 N 1 and address 0 to talk to the MMICON Note If using W 8xx7 s COM2 to connect to MMICON please refer to W 8xx7 s Getting Started Manual to disable its Modbus RTU function User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 16 1 16 2 Create Background Picture Of the MMICON Please refer to the MMIDOS Software User Manual which is delivered with the hardware for more software details The number of the background pictures depends on the ROM memory on the MMICON It can up to 256 pages for EPROM like 27040 and 128 pages for 27020 and 64 pages for 27010 Note ROM EPROM EEPROM FLASH are all validate Please Install the MMICON
152. to Section 2 6 2 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 1 Please refer to below ST examples to read the status of two batteries in the back plane of the iP 8xx7 VP 25W7 23W7 WP 8xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 controller battery_statel and battery_state2 are declared as an internal integer battery_statel R_LMB_ADR 1 9992 Status of battery1 return 0 Low power 99 Power ok battery_state2 R_ MB_ADR 1 9993 Status of battery2 return 0 Low power 99 Power ok The advantage for new retain variable 1 The retain value will keep alive always whatever controller s power is off or re compiling amp download a new ISaGRAF project unless the S 256 512 X607 608 has run out of battery Old Retain Method the value will be cleared to O when re download a ISaGRAF project 2 The amount of new retain variable can be stored is greater than old retain variable Important 1 To use new retain function please do not check Retain on the ISaGRAF dictionary window 2 If your controller isuPAC 7186EG or I 7188EG XG please connect IO complex equipment X607_ 608 in the IO connection windows Integer Real Variable ee x Hame wp Network Address fs Attributes Format To use new retain function Real please do not check Retain intemal Integer i Input C Dutput on the IsaGRAF dictionary window IC Constant Initial vakte OOO Retain
153. ttt IMT OLUTO RIJN JUTO OJITOS D ampled Fie Tools Options Help m naa uuu ues J pushgkey 7 stra cx 2 You can see outputs OUTO1 thru OUT03 will blink in the first 15 seconds And the pulse No continuously plus one every second You can adjust the T1 variable while the program is running To accomplish this click on the Dictionary icon which will open the ISaGRAF Global Variables window as shown in the first two pictures below Click on Timer tab and then double click on T1 to change the timer value to T 500ms this means 0 5 second Then click on Write TmaltR4k SIMPLELD Debug programs File Project Tools Options Heln File Edit Tools Options Help amp 2 O Begin LOI Ladder Diagrami o000 Write timer variable vYanable T Enter new value E Nyo Start Stop Cancel User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 30 2 1 5 Download amp Debugging The Example LD Project Lastly you can download the example LD program into the ISaGRAF PAC to do some operations Before downloading you must establish communication between the controller and the PC To begin this process click on the Link Setup icon in the SaGRAF Programs window When you click on the Link Setup icon the following window will appear sa RAF SOMPLELD Programs File Make Project Toole Debug Option
154. used Please refer to Chapter 6 to use DCON Utility to set the appropriate address baud rate then connect Bus7000 on the I O connection window ow SaGRAF TS7051C 140 connection loj x Fie Edit Tools Options Help B pBemnl tol RR S gt us ref 9 se COM port 3 cae com baud 9600 cous host watchdog 0 sous watchdog timer 1E EH 4 a bus OO0 E remot mu h REEE ee Hekel Then using I_DiCnt block to get the D I Counter value in the LD program Each I_DiCnt can get 4 counters DICNT 21 Pr Address of ADR GNIL the D I ST_CN_ CN2_ module The Counter value Integer returned Starting from which channel If the boolean value rising from FALSE to TRUE reset the associated counter value to 0 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 30 3 6 Auto Scan I O Before you can use Auto scan I O utility please refer to section 1 2 to make sure the ICP DAS Utilities For ISaGRAF has been installed Note Not all the I O boards are support Auto scan What is Auto scan I O It s a tool for ISaGRAF to easily configure your I O connection and automatically declare variables for each I O channel in ISaGRAF controllers How to use A Open your ISaGRAF program B Click on Tools ICP DAS Auto scan I O to run Auto scan ee E EE TsaGRAF T063 Programs 10 x File Make Project Tools Debug Option Hel
155. when Alarm 1 to 8 Demo_70 happens Controller link one RS 485 remote I 7018z and also PC can run VB 6 0 program to become an HMI screen please I 7018z Record alarm text in X607 X608 then PC can download Demo_41 this record by ICPDAS UDloader Demo_72 refer to Chapter 11 3 9 TETTEN NOTE Demo_18 uses PID_AL which is provided by CJ International for evaluation Please refer to fttp ftp 1cpdas com pub cd 8000cd napdos isagraf 8000 english_ manu PID_AL ComplexPIDalgorithm implementation htm User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 5 IP 8xx7 I 8417 8817 8437 8837 example program iP 8xx7 I 8000 CD ROM napdos isagraf ip8000 demo or ftp ftp 1cpdas com pub cd 8000cd napdos isagraf ip8000 demo I 8417 8817 8437 8837 I 8000 CD ROM napdos isagraf 8000 demo or ftp ftp 1cpdas com pub cd 8000cd napdos isagraf 8000 demo Project Description name iP 8xx7 I 8xx7 used a Show3Led EAEE Show3Led l Push4Key Demo 02 Start Stop and Reset a Time Timer tStart tStop Read Write Date amp Time SYSDAT_R SYSDAT_W SYSTIM_R SYSTIME_W Demo 03 To output at a time interval Like Moday 09 00 18 00 Sunday 10 00 Demo_04 Calculate empy cycle time NONE Push4Key Demo_06 Change output mode Show3Led Demo_07 Display a value to S MMI VALIOLED tStart tSt eee emo isplay a value to Start Stop Show3Led Push4Key Demo_08 Inp
156. xO fd P aae gf FO 4E F3 JHE Fa GH FS H Fe HE F734 Fe W Fa tare File Edit Tools Optone Help Aa X22 Bs xO 4d P Qagah ge FO 4E F346 Fd GA FS H 7 F HE F7 JH Fe GT ooe IMIT TS OUTO4 tI es ET QOUTO2 T 155 OUTOS User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 22 The procedure to create the forth amp the last LD rung is similar as former steps Please do it by yourself The final LD program should look like the below VALIOLED is only for I 8xx7 T188EGD amp 7188XGD Not available for Wincon 8xx7 Save this LD program and quit Bie eaGtRAF SIMPLELD LD1 Quick LD Program OF x File Edit Tools Options Help SB XGA ge xed Pre Qaak Fa E save F4 GH FS lt H Fe HE F7 3H Fe Gl Fo tF 9c Hulse Moin qGtoulse No a pos 9 1 fs User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 23 2 1 1 6 Create The ST end_init Program In this project we need an extra ST program to handle the INIT variable Click on Create new program in the Programs window to add a ST program Given the Name as end init Comment as Handle INIT variable Language as ST Structured Text amp Style as End Main program Then click on OR TsaltRAF SIMPLELD Programe File Make Project Tools Debug Opton Help A He Am e Mie oe Aes Begin fee 11 Trsne E ograrn E Create ne
157. 0 D to get counter value This example is Wdemo_ 46 Variables Communication state of M 7080D COUNTERI1 Ist Counter or frequency value of M 7080D COUNTER2 Ist Counter or frequency value of M 7080D Project One function block program one Ladder program ioj xi File Make Project Tools Debug Options Help A HSE Oat xr mk Aas Begin Begin LOI Ladder Diagram Function block program Request 4 words using Modbus code 4 from Slave 1 WE FOO0 s Address 1 The starting Modbus ADDR Na is 0 Then convert 2 words to become one long integer comm okl COUNTER COUNTER2 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 20 Ladder program Write value True to modbus boolean addr 132 of M 7080 to reset counter1 as0 MELISS AVY J yasetRo amp R amp S to False atthe end k51 we ISaGR AF CREATION 140 connechon loj xj I O connection Fie Edit Tools Options Help amp gt Beam ELl FALE o l manj ref 107 ma port_no 3 m baud 9600 imj char amp a man parity 0 son stop bit 1 e mun timeout 250 4 3 m mbus B com_port n User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 21 Chapter 22 Connecting Modbus TCP IP I O W 8x47 8x46 supports I SKE4 MTCP amp I 83KE8 MTCP ethernet I O since its ISaGRAF driver version 3 32B The WP 8xx7 WP 5xx7 VP 25W7 23W7 XP 8xx7 CE6 XP 8xx7 Atom CE6 also support Ethne
158. 0 minute else User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 50 The value is corrent and then create a new file Filel F_creat File_namel if Filel 0 then If failed to create a new file No actions Msg1 Create File File_nam1 Error else If successful to create a new file start actions TMP F_close Filel Close file after completing the actions total_record1 Period1 60000 Intervall Calculate total record number record_cntl 0 Reset current record count as 0 STEP 1 Set STEPI as 1 recording Msg1 Recording now Start ticking T1 from 0 second T1 T 0s T1_Interval TMR Intervall T1_next T1 T1_Interval TStart T1 end_if end_if end_if end_if if STEP1 1 then 1 Recording if T1 gt T1_next then Start to prepare one record when T1 is reach to the next record time T1_next T1_next T1_Interval Re calculate next T1 The timing range is 23 hours 59 minutes 59 seconds so we reset it as O in advance just over 20 hours The content below is used for user s reference the timer limit is only 10 minutes in this example If the WinCon s RAM Disk only run the ISaGRAF it can support up to 16MB file record if T1 gt T 20h then T1 T 0s T1_next T1 T1_Interval end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 51
159. 00 module Step 1 Power off M 7000 Connect one RS 232 cable from PC s COM1 or other COM port to one RS 232 485 converter for example I 7520R at http www icpdas com products Industrial communication_module communication_list htm then connect this converter to the M 7000 module Please short INIT to GND This means to make the M 7000 to be in initial state Address will be 0 baudrate 9600 Some M 7000 module provide a Init Normal dip switch on its back to replace the INIT pin PC 9 Pin Dsub l 7520R M 7000 RS 232 RS232 485 conveter RS 485 port RS 232 RS 485 2 RAD E 2 DATA H DATA S TXD r 3 5 GND WY 5 DATA W DATA Step 2 Power on M 7000 Run Dcon utility click COM Port menu to select proper COM port baudrate check on DCON amp Modbus RTU Then click start Search to search M 7000 FI DCON Utility Yer 4 4 7 File COM Port search Run Terminal Help The Found Out I 7OO00000 module _ elal i E EE Baudrate Checksum User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 2 Step 3 The only one connected M 7000 should be found at Address O because it is in initial state Click Stop to stop searching when found it Please set protocol as Modbus proper Address Slave no Baudrate And if the M 7000 is Analog I O please set proper type amp range then click on Setting FI DCON Utili
160. 00001 200002 300003 404 505 606 7007 8008 9009 10 Variables Get return of Msg NC 1 means format error File ID Index of for loops Index of another for loops User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 19 ST program if RE_ LOAD then Read file once if RE LOAD is TRUE RE LOAD FALSE Filel f_wopen File_namel Open file in Read amp Write mode if Filel 0 then 0 open file fail Msg1 Can not Open file File_namel return Cannot open file just exit this ST program end_if for ii 0 to 1 do total 2 rows if f_eof Filel TRUE then test if reaches the End Of File Msg1 There should be at least 2 rows in File namel Exit exit this for loops end_if stri fm_read Filel read one row as string from file Convert string to become serval Integer values and store them into No 2 Integer array NUMI Msg N str1 2 If the amount of the converted Integer values is not 10 it lacks of data 1 means format error if NUM1 lt gt 10 then Msg1 The Msg ii 1 th row data format is not correct or data number is not 10 Exit exit this for loops end_if for jj 0 to 9 do Get 10 Integer values from No 2 Integer array s addr 1 to 10 and store them to N_VAL 0 19 N_VAL 10 ti jj ARY_N_R 2 jj 1 end_for end_for
161. 012 Rev 6 3 ICP DAS 10 13 10 5 Reading amp Writing File Note 1 If the data type in the related file position is not REAL type 32 bit float format using F READ F function to read this data may generate a local controller fault No 117 please refer to Chapter 10 6 2 Only WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 VP 25W7 23W7 support file operating functions Not for I 8xx7 I 7188EG XG uPAC 7186EG wPAC 5xx7 iP 8xx7 and VP 2117 3 If the file path is inside the System_Disk or Micro_SDY for WP 8xx7 WP 5xx7 VP 25w 7 and VP 23W7 or System_disk2 for XP 8xx7 Atom Ce6 and XP 8xx7 CE6 folder for example Micro_SD datal txt the file will continue exist even the controller s power is switched Off However it consums lots of CPU time to Read Write files in the above listed directories 4 If the file location belongs to RAM for example Temp data2 txt it will be stored in the RAM memory The file saved in controller s RAM will be lost when power is switched OFF The advantage of RAM memory is that the file read write speed is much faster WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 VP 25W7 23W7 support below ISaGRAF standard functions F_ROPEN Open file in Binary format for read operation file should exist already F_WOPEN Open file in Binary format for read and write operation file should exist F_CLOSE Close a file F_EOF Test 1f reach the End Of File position
162. 012 Rev 6 3 ICP DAS 8 3 8 2 Programming A Modbus RTU Master Before access the data from the Modbus device you must link the Mbus or Mbus_asc function Please refer to Section 8 1 for this procedure Then you can acess the data between the ISaGRAF PAC and other Modbus devices via Modbus protocol The following function blocks can be used to pass data through the Modbus protocol in an LD or FBD program NOTE Only the WP 8xx7 WP 5xx7 VP 25W7 23W7 XP 8xx7 Atom CE6 XP 8xx7 CE6 supprt the Mbus24R Mbus24R1 Mbus_XR Mbus_XRI1 Refer to http www icpdas com fag isagraf htm gt FAQ 101 Mbus_R Mbus24R Mbus_R1 Mbus24R1 Mbus_ XR Mbus_XR1 Mbus_N_R Mbus_NRI MBUS BR MBUS BRI Mbus12W MBUS_N_W When the CODE_ is Modbus function 3 or 4 Read max 12 word value Mbus24R means 24 word and the value of each word is 32768 32767 Read max six 32 bit integer value Mbus24R means 12 32 bit integer 2 147 483 648 2 147 483 647 using WD_LONG to convert two word to one 32 bit integer Read max 6 REAL value 32 bit float using WD_LONG to convert two word to one 32 bit integer then use INT_REAL to convert it as 32 bit floating point value Mbus24R means twelve 32 bit floating point value if the CODE_ is Modbus function 1 or 2 Read max 192 Boolean Bit value using WD_Bit to convert one word to 16 Boolean value Mbus24R means 384 Boolean Same as Mbus_R b
163. 024 to Chl to Ch 4 of I 8017H Then power up WinCon Check Enable Web HMI option as below For demo purpose please don t check Enable Account Security Setting Web about Options V Enable Web HMI Disable FTP Serveice V Disable Telnet Serveice To set up advanced security Settings 7 99 99 Security Settings Account Modbus List IP Setting NO Priority Low eae User Name Password Priority Middle User Name arel p Edit Password Priority High User Name Password A gt 1015 am 3 2 Copy all files of Web HMI s Demo_12 to WinCon s CompactFlash Temp HTTP WebHM folder by ftp utility For example run ftp 10 0 0 103 in Internet Explorer Web HMI codes resides at W 8xx7 CD ROM napdos isagraf wincon WebHMI_Demo whmi_12 folder or ftp ftp 1cpdas com pub cd wincon_isagraf napdos isagraf wincon webhm1_demo Ther are 7 Files plus 2 folder should be copied to WinCon s CompactFlash Temp HTTP WebHMI Main htm menu htm index htm login htm main dll login dll whmi_filter dll img amp msg folder User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 41 3 Download ISaGRAF project whmi_12 to W 8xx7 If using Web HMI as HMI please finish procedure listed in step 2 first then do step 3 The Whmi_12 pia can only run in WinCon 8xx7 8xx6 not in I 8xx7 It resides at W 8xx7 CD ROM napdos isagraf winc
164. 05 Without broken line detection Thermocouple type I 87018 7018 7018P The range parameter of temperature IO board can be standard setting or special setting For example I 87013 4 channels RTD input module Its range can be 20 Platinum 100 a 0 00385 100 100 degree Celsius 2F Platinum 100 a 0 003916 200 200 degree Celsius ow SaGRAF T2 I O connection Ioj x File Edit Tools Options Help B p gt Srern tl FAS Lo aj ows ref 87013 ED i_87013 ru Fat range 20 ia Range 20 TT 00 RR 20 standard setting Input La value is normally from 32768 to 32767 6 If range 1020 TT 10 RR 20 the input value will be a clear Degree Celsius value For ex 2312 means temperature 1s 23 12 degree celsius If seting range as 20 or 21 to 2F then it is standard setting The temperature input value is 2 s complement value from 32768 to 32767 depends on the range value For example setting range as 20 value of 32767 means temperature is about 100 Degree 32766 is about 100 Degree Value of 16383 means 50 Degree Note Normally value of 32768 or 32767 means wire broken line If user want to get a clear temperature input value for example value of 2312 means 23 12 Degree Celsius Then please set range to a special value defined as below User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 9 Important
165. 1 to 10 minutes Then PC can download this record and display it as a trend curve diagram by M S Excel Q How to record I 8017H s Ch 1 to Ch 4 voltage input in 256 512 in I 8437 80 or I 8837 80 The sampling time is one record every 0 05 second The record period is 1 to 10 minutes Then PC can download this record and display it as a trend curve diagram by M S Excel 59 Q Some skill to operate RS 232 422 485 serial COM Port by COM functions Q How to read write file data in WinCon Q How to connect RS 485 Remote I 7000 and I 87K I O modules in I 8xx7 I 7188EG XG and WinCon 8xx7 PAC How to program RS 485 remote I 7017RC I 87017RC and I 7018Z Q How to setup a redundant system with Ethernet I O Q Why my RS 485 remote I 7000 and I 87K Output module s host watchdog function doesn t work to reset its output channels to safe output value while the RS 485 communication cable is broken Q ICP DAS release Stable and Cost effective Data Acquisition Auto Report System VC 6 0 VB 6 0 and ISaGRAF demo program are available Q How to process the Integer or Real value coming from the RS 232 RS 485 device Like the device of Bar Code reader or RS 232 weight meter Q How to send email with one attached file by WinCon 8xx7 or iPAC 8447 8847 or uPAC 7186EG Nn 8 ON N 09 N ON 8xx7 or I 7188EG XG always reset How to fix it Q Why my PC can not run ftp to connect W 8347 or
166. 10 Data is only exchangable with controllers that are assigned with the same Group No For example there are 5 controllers located at the same local ethernet area named Al A2 A3 A4 and AS respectively Al A2 amp A3 are assigned with Ebus Group_No 1 while A4 amp A5 are assigned with Ebus Group_No 2 Therefore Al can access data from A2 amp A3 however can not access data from A4 amp AS User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 15 RULE 2 Each Boolean package in the same Ebus Group_No must have an attached identification number ranging from to 128 This means that there is a maximum of 128 Boolean packages that can be exchanged across an Ebus Group_No connection Each Boolean package contains 8 Boolean values and these Boolean values can only have the value of either True or False The Boolean values in the Boolean package can be assigned and exchanged with either Internal Input or Output Boolean variables or Boolean constants RULE 3 Each integer package in the same Ebus Group_No must have an attached identification number ranging from 1 to 128 This means that there is a maximum of 128 Integer packages that can be exchanged across an Ebus Group_No connection Each integer package contains eight 32 bit integer values The integer values can range from 2147483648 to 2147483647 The integer values in the integer package can be assigned and exchanged with either In
167. 1000 O f 6s OUT1 FALSE t sis i 1000 s fF 2000 O OUT2 TRUE User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 48 To further test the example FBD program click on the Dictionary icon in the SaGRAF Debug Programs window to open the Global Dictionary window and click on the Integer Real tab Click on the highlighted A1 and the Write Integer Real Variable will open ISaGRAF FBD_EXAM Global integers reals oj x File Edit Tools Options Help Booleans Integers Reals Timers Messages FB instances Defined words Name str Addr Value Somment internal integer 0000 1000 Simulate Temper Sa Write integer jreal variable variable Al 1 Simulat 20000 intern Enter new value Lock Unlock Cancel Type in 6000 in the Enter New Value field and click on the Write button Now the following changes will be observed ii ISaGRAF FBD_EXAM MAIN FBD LD Program File Options Help DMH AQA 5 x EE ox 2126000 File Tools Options Help OUT1 TRUE 21 6000 OUT2 F ALSE You can now download the example FBD program to the ISaGRAF controller system Follow the same procedure as outlined in Section 2 1 5 for downloading the program to the I 8xx7 controller system User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 49 2 4 A Simple Instruction List IL Program Instruction List IL programming is a l
168. 12 Rev 6 3 ICP DAS 21 11 Example 43 Connecting 1 M 7017R amp 2 M 7024 This example is Wdemo_ 43 Please set M 7017R s Input range amp Type to 10V M 7024 s Output range amp Type to 10V User may refer to the attatched manual in the product box or visit http www icpdas com products Remote_IO m 7000 m 7000_list htm to get each M 7000 Module s Manual to find their Analog Input Type and Data Format Table Type code setting We use the variable array in this example please refer to Section 2 6 for the details on it Variables Communication state of the related M 7053D Communication state of the related M 7045D M_7017R 0 7 Integer Internal Variable Array Dim 8 M 7017R s Analog Input value 32768 to 32767 means 10 to 10 V M_7024 0 3 Integer Internal Variable Array Dim 4 M 7024 s Analog Output value 16384 to 16383 means 10 to 10 V In_Val 0 7 Integer Internal Variable Array Dim 8 Engineering value converted from M_7017R 0 7 32768 to 32767 converter to 10000 to 10000 Out_Val 0 3 Integer Internal Variable Array Dim 4 Engineering value to be converted to M_7024 0 3 1000 to 1000 converter to 16384 to 16383 Project One Ladder program one ST program SaG RAF WDEMO 43 Programs Ioj x Fie Make Project Tools Debug Options Help SP S Dem Ss Mi om Aes Begin TALEE Connecting M 7o00 EE S71 Scaling Alto En
169. 143 to setup the wireless devices New released ISaGRAF driver http www icpdas com products PAC 8000 isagraf link htm Demo program www icpdas com FAQ Software ISaGRAF 067 071 072 076 and 077 or Wdemo_62 Wdemo_63 Wdmo_63a Wdmo_65a Wdmo_65b demo_74a and demo_75a or http www icpdas com fag isagraf htm Controller can send email without or with one attach file Gateway server Wincon 8xx7 or iPAC 8477 8777 uPAC 7186EG 187K N User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 12 1 Features 1 The sending Email can contain one attached file or without any attached file The attached file format can be text or binary or any file format The approximate max file size is listed as the following WP 8xx7 WP 5xx7 VP 25W 7 2 MB XP 8xx7 CE6 XP 8xx7 Atom CE6 2 MB WinCon 8xx 7 2 MB 1PAC 8447 8847 488KB uPAC 7186EG X607 112KB uPAC 7186EG X608 488KB 2 Email Title can be max 128 bytes Email content can be max 510 bytes Local language word can be used English Chinese any language character which computer can use 3 One email can send to 10 receivers at one sending 4 Each email can be assigned as High Low or Normal priority 5 Please assign at least one Mail server IP in the ISaGRAF program Or for safety assign two Mail servers IP Then if one Mail server is out of service the controller will send this email by the other Mail server 6 If controller mode
170. 15F in the ISaGRAF I O connection window if using I 87015W I O board Each channel can have different Range setting Please refer to the On Line Help as below for more information If users want to convert to degree Celsius or Degree Fahrenheit please refer to Chapter 3 2 2 to set proper Range value om SaGRAF TESTI f0 connection i Ioj x File Edit Tool Options Help B PBAO TLFA Ss Each channel of the 1 87015W o tim ref 7015F can have different range value ED i_87015f ru h a CHI range 20 SH range 20 amos CHATE Please connect i_87015f in sus CHA range the ISaGRAF I O connection cot CH5 range 20 window if using I 87015W sss CHG range 20 I O board sos CH range 20 2 A On Line Help x parameters range 0 Platinum 100 a 0 00365 degree Celsius temperature 100 gt 0 gt 100 val 32768 gt O gt 32767 dec S000 gt OOOO gt FFFF hex Platinum 100 a 0 00385 degree Celsius temperature 0 gt 100 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 17 3 2 7 Using the I 87019ZW I 87019ZW is a 10 channel of Thermo Couple temperature input board for industrial use or can be set as normal analog input board like 10V or 20mA Each channel can have different range type setting Please refer to http www icpdas com products PAC 8000 8000_IO modules htm
171. 16 74 Tort TMP ComWrite 3 16 54 T TMP ComStr_w 3 MSG ANA T1 Timer value TMP ComWrite 3 16 0D lt CR gt end_case else STEP 0 not valid data reset STEP to 0 TSTOP tout stop ticking tout tout T 0s reset tout NUM 03 reset NUM ne STEP 10 check 3 and other byte 10 when command is Mx or Txxxx If byt 16 0D then received lt CR gt STEP 21 complete command is received case CMD of Receive valid Mx command 16 4D 16 6D M orm chang Mode value and reply Mode Array_r 2 2 16 30 Change Mode OK to PC send answer to Com3 TMP ComStr_w 3 OK TMP ComWrite 3 16 0D lt CR gt Receive valid T command reply Txxxx x 0 9 16 54 16 74 Tort Receive valid Txxx command get Period change T1 value and reply OK to TMP_val 0 PC for ii 1 to NUM 1 do TMP val 10 TMP_val Array_r 2 1 ii 16 30 end_for if TMP val gt 50 and TMP_val lt 10000 then must be in 50 9999 ms T1 TMR TMP_val Change T1 send answer to Com3 TMP ComStr_w 3 OK TMP ComWrite 3 16 0D lt CR gt User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 31 end_if end_case elsif byt gt 16 30 and byt lt 16 39 then 0 9
172. 2 Set I O module to initial state If the module is a new one factory have set a default settings for user s convenient If you don t know the configuration of the module please set the I O module to initial state x To set I 7000 module to initial state is to wire connect the INIT to GND and Power on the module Then the module will become initial state Some new designed I 7000 modules have a Dip switch at its back Please switch it to the INIT position then power up the module x Most of I 87xxxW module has an internal Jumper you can set it as Normal or INIT state x For old designed I 87K module s initial state is set by I 87K4 5 8 9 s dip switch For example setting dip 2 to ON and then re cycle the power it means the second slot is in initial state If using I 87KS5 and I 87K9 please do not plug I 87xxx board in its left most slot for initial configuration Please plug at 2nd to 9th slot for initial configuration The dip 1 is for 2nd slot of I 87KS5 and I 87K9 dip 4 is for 5th slot Dip 8 is for 9th slot of I 87K9 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 2 Some new designed I 87K High Profile I O modules like I 87019w have Jumper built in Their INIT Normal state is controlled by its own Jimper not by the dip switch of I 87K4 5 8 9 After completed the setting please remember to set it as Normal state The default state from factory I O Mod
173. 2 Y axis Return Q_ boolean always return TRUE SLOW_STOP Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 24 Interpolation commands M_intp Move a short distance on X Y plane This command will move a short distance interpolation short line on X Y plane This command provided a method for user to generate an arbitrary curve on X Y plane Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 Xpulse_ integer 2047 lt Xpulse_ lt 2047 Ypulse_ integer 2047 lt Ypulse_ lt 2047 Return Q_ boolean always return TRUE Y Y a SADUESEeADUESS 9 ri a a d a 4B y OA 6 7 Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 NOTE For a lot of M_intp call set at the same time please check 1f the FIFO is not full Call it if FIFO is not full FIFO indicator is a Digital Input resides at CH3 of I 8091 I 8091 D I channel on ISaGRAF I O connection window CH1 EMG emergency stop CH2 FFEF FIFO is empty or not TRUE empty CH3 FFFF FIFO is full or not TRUE full CH4 LS11 Left limit swtch of X axis CH5 LS14 Right limit swtch of X axis CH6 ORGI Original position swtch of X axis CH7 XSTOP Stop or not of X axis TRUE stop CH8 LS21 Left limit swtch of Y axis C
174. 2012 Rev 6 3 ICP DAS 3 28 3 5 D I Counters Built in The I 87xxx amp I 7000 D I Modules 87051 W 87052W 87053 W 87054W 87055W 87058W 87063W amp I 7050 7052 7053 7041 7044 7060 7063 7065 have built in low speed D I counters associated with each D I channel The max counter speed of these modules is 100 Hz The counter value is ranging from 0 to 65535 and can be reset to 0 To use these I 87xxx D I counters on slot 0 7 of the controller connect these I O modules with a last character C in the I O connection window For ex 1_87052C ow SaGRAF CREATION VO connection m x File Edit Tools Optons Help a aBem tol hK L select boardieguipment E x 8017A 8 CH Analog Input with Alarm A04 Isolated 16 CH DI amp 16 CH DO 8054 lzolated 5 CH DI amp 8 CH DO l Cancel Heeei Note Library i 87053 RTE CH Ol amp Crit Max 100Hz2 LOfUS4 IsWated 6 CH DI amp 8 CH DO Boards ie 2 a aw SaGRAF CREATION O connection File Edit Tools Options Help eB PBAam tL FAIS o zj m ref 87052CB d a em of 052C oe DIB n Click on here to B CNTS TE see the on line RESET ns z help e 4 ES z a 6 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 29 If the I 87xxx D I Module 1s plugged in the 87K4 87K5 87K8 amp 87K9 extension base module or the I 7000 D I module is
175. 3 16 3 end_if ST program end_init Outline INIT FALSE User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 36 Process Operation Actions LD Program LDI Catch the rising edge status when pushbutton K1 is just pushed and save it into an internal boolean variable M1 Catch the rising edge status when pushbutton K2 is just pushed and save it into an internal boolean variable M2 ST Program ST1 Open Com3 of the I 8xx7 controller with 9600 baud rate 8 char size no parity and 1 stop bit at the first scan cycle Plus COUNT value by 1 every time when pushbutton K1 is pushed Plus COUNT value by 10 every time when pushbutton K2 is pushed Send Count value to a PC via Com3 of the I 8xx7 controller in the below frame format Value of COUNT 2 lower byte 3 lower byte Highest byte STX Start of frame byte value 2 ETX End of frame byte value 3 ST Program end init Set boolean variable INIT to FALSE at the end of the PLC scan cycle So that INIT will be TRUE only at the first scan cycle Function description P contact Contact with P type means the right status will be set to a pulse TRUE when the contact is just rising from FALSE to TRUE Contact EJE e a a Right status Comopen PORT BAUD CHAR PARI STOP To open a Com port of the I 8xx7 controller Parameter PORT Integer 3 COM3 4 COM4
176. 3 ICP DAS 9 4 A 1SaGRAF Project Management File Edit Project Tools Options Help Open Ctrl 0 Select project group New Ctrl N Rename Copy Ctrl C Delete C Project Connections For 6xx a m_e Referen i Author Ensure that communication parameters Run Date of match to the connected target Then press Run to start upload Version Cancel Descripi Help Communication settings Slave 1 Port COM2 19200 M 5 1 Time out 6s PC PLC link parameters es Target Slave Number Communication port Control Time out seconds ms Retties Once you have made sure that the communication settings are properly configured click on the RUN button in the Upload Project windows Upload project i xt Ensure that communication parameters match to the connected target Then press Run to start upload oF Cancel Help Run Communication settings Slave 1 Port COM2 19200 N 5 1 Time out 6s User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 5 9 3 Setting An ISaGRAF Password An ISaGRAF Workbench project can be password protected by configuring a user defined password To configure an ISaGRAF password open the ISaGRAF Project Window select Project from the menu bar and then click on Set Password The Data Protection window will open and then select on of the passwords from OO to 15 to configure a password
177. 37 80 The sampling time is one record every 0 05 second The record period is 1 to 10 minutes Then PC can download this record and display it as a trend curve diagram by MLS Excel This demo is the Demo_71 can run in I 8437 80 or in I 8837 80 8OMHz The controller driver should be version of 3 19 or later version New drive http www icpdas com products PAC 1 8000 sagraf link htm demo_71 pia resides at 1 8000 CD ROM napdos isagraf 8000 demo or ftp ftp icpdas com pub cd 8000cd napdos isagrat 8000 demo or Note If using iP 8xx7 you must instead use the I 8017HW and I 8024W I O modules I 8437 80 and I 8837 80 controller s CPU is running at 830MHz The speed is about 2 to 4 time faster than I 8437 and I 8837 40MHz CPU So it can record minimum to 25 milli second sampling data While using I 8437 and I 8837 40MHz it can record only 100 ms or above sampling data This minimum sampling time depends on your ISaGRAF program s PLC scan time If the PLC scan time is large like 200 ms then you can do sampling only larger than 200 ms How to test this demo You may run VB 6 0 Demo_ 6 in your PC to on line control this I 8837 80 via ethernet refer to section 11 2 Or just push the pushbutton on the front panel of the I 8437 80 8837 80 to start stop it 1 Please plug one I 8024 in I 8437 80 s Slot 2 one I 8017H in Slot 3 Note the left most I O slot No of the I 8xx7 is 0 not 1 Then connect C
178. 4 OTF RG 5 OTP RO 6 FOUFPROE User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 16 One ST program Please configure this M 7017RC as 20 mA range type code D We will convert 4 20 mA to become 0 0 1000 0 Psi Real format for ii 0 to 7 do IN_Val ii A4_20_To M7017RC ii 16 D 1000 0 0 0 end_for or you may use Bin2Eng to convert 4 to 20mA to become 0 to 10000 as below unit is 0 1 psi x Please declare Val 0 7 as Integer format for ii 0 to 7 do Vallii Bin2Eng M7017RCl ii 32767 6553 10000 0 end_for You can do something if the sensor is broken or communication is break if comm_okl and M7017RC ii lt 5000 then You may do someting if 4 20 mA sensor is broken elsif comm_okl False then You may do someting if communication between controller amp M 7017RC is break end_if I O connection on 8aGRAF WDOEMO 44 40 connection O x File Edit Tools Optons Help al pBem LI FRA S bus ref 107 m port no 3 cout baud 9600 m char 6 mn parity 0 sn Stop bit 1 mun timeout 250 SEES EIMICIE E com port ns LI 11 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 17 Example 45 Connecting 1 M 7019R to get temperature val This example is Wdemo 45 Please use DCON utility to configure M 7019R s range amp type to Thermocouple K Type Type cod
179. 6 XP 8xx7 Atom CE6 VP 25W7 23W7 can be defined by users please refer to Section 4 1 2 Modbus address in the physical transmission format is equal to Network address minus one please refer to Chapter 5 So the valid Modbus address for word amp integer arrays is from 5000 to 8071 for I 8xx7 1P 8xx7 etc and 10000 to 19215 for WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 and VP 25W7 23W7 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 35 Chapter 5 Modbus Protocol The Modbus protocol is a powerful and flexible communications protocol that allows numerous software programs and hardware devices to communicate with each other Any ISaGRAF controller variable that will be used to communicate through the Modbus protocol MUST have a unique network address before it can communicate through a Modbus link please refer to section 4 1 5 1 Modbus Protocol Format RTU Serial PC software programs and HMI hardware devices can access data from the variables in the ISaGRAF controller system ONLY after that variable is assigned a unique network address please refer to Chapter 4 For more information regarding connecting a PC to an ISaGRAF controller system please refer to Getting started Manual of each controller for details on how to properly connect these devices User require programing the Modbus communication program or using commercially available SCADA software to communicate with I 8xx7 I 7188EG XG uPAC 7186
180. 7 VP 25W7 23W7 XP 8xx7 Atom CE6 and XP 8xx7 CE6 support the Windows CE Interface The VP 25W7 has a Touch screen WP 8xx6 WP 5xx6 VP 25W6 23W6 XP 8xx6 Atom CE6 and XP 8xx6 CE6 support the ISaGRAF and InduSoft software The VP 25W6 has a Touch screen Modbus RTU Slave ports WP 8xx7 WP 5xx7 VP 25W7 VP 23W7 can support max 5 Modbus RTU slave ports Please refer to Appendix G E and A 2 of its Getting Started Manual in the product box XP 8xx6 Atom CE6 XP 8xx7 CE6 can support max 9 Modbus RTU slave ports I 7188EG XG uPAC 7186EG uPAC 5xx7 1P 8xx7 I 8xx7 and VP 2117 can support max 2 Modbus RTU slave ports Please refer to its Getting Started Manual in the product box User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 15 Chapter 1 Software amp Hardware Installation NOTE The I 8xx7 is the abbreviation for the I 8417 I 8437 80 I 8817 and I 8837 80 controllers The WP 8xx7 is the abbreviation for the WP 8147 8447 8847 and WP 8137 8437 8837 controllers The WP 5xx7 is the abbreviation for the WP 5147 5147 OD controllers The XP 8xx7 CE6 is the abbreviation for the XP 8047 CE6 XP 8347 CE6 XP 8747 CE6 controllers The XP 8xx7 Atom CE6 is the abbreviation for the XP 8147 Atom CE6 XP 8347 Atom CE6 XP 8747 Atom CE6 controllers The 1P 8xx7 is the abbreviation for the 1P 8447 1P 8847 controllers 1 1 Installing The ISaGRAF Workbench Software Program For the I 8xx7 I 7188EG XG uPAC 7186EG uPAC 5
181. 7 WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 and VP 25W7 23W7 support Ebus To obtain the new released driver and update the I O library from http www icpdas com products PAC 8000 isagraf link htm Please refer to Section 1 2 for the software installation Important Note 1 The max boolean amp integer package No of Fbus amp Ebus reduce from 256 to 128 since the driver version as below 8xx7 2 42 I 7188EG 1 32 I 7188XG 1 29 iP 8xx7 1 01 uPAC 7186EG 1 01 uPAC 5xx7 1 01 VP 2117 1 01 2 If the controller is W 8x47 8x46 WP 8xx7 WP 5xx7 X P 8xx7 Atom CE6 XP 8xx7 CE6 Dual network port please conntect Ebus at their LAN2 port 3 All Ebus Controllers s IP should be set in the same domain and their mask IP should be 255 255 255 0 For example 192 168 1 3 192 168 1 5 192 168 1 20 7 5 1 Basic Ebus Rules The Ebus driver first creates a packet of eight Boolean values to form a Boolean package and then creates a packet of eight 32 bit integers to form an Integer package Both of the Boolean packages and integer packages can be distributed on the Ebus to allow the data to be exchanged from one controller to another controller You can exchanged the real data with Int_Real amp Real_Int function please refer to appendix A 4 The basic Ebus rules are similiar as Fbus refer to 7 1 as below RULE 1 Each Ebus network is identified with a Group No ranging from 1 to
182. 8 10 84 LINKING THE EKAN MODVEW LED DISPLAY nporotionnoie n a S E ees 8 10 CHAPTER 9 COMMONLY USED ISAGRAF UTILITIES wisissascscccsssnsccecetnsscedessecesbasassstscusecsesscesseesessecsssscassoeuacs 9 1 9 12 CREATING AN ISAGRAF PROJECT GROUPS wasascisieccensusslaachoadsaanmesedeadsiveduneeeocelaadevaruaeanactcacdauedenedenstildadevadeceanmetiandanededs 9 2 92 UPLOADING AN ISAGRAP PROJECT uiine a ee a E e e E EE 9 3 03 gt SETTING AN ISAGRAF PASS W ORD weicio sitesinde cencundeuantedandeecivnsianaadeadnequndauantedandeecuveaianaadeadaequn G 9 6 JA CREATING AN TISAGRAF PROGRAM DIARY n cuncussanaistud es tenacnoehite sud giuancan a a ee tesauvadhincudeataneandenane 9 8 9 3 BACKING UP amp RESTORING AN ISAGRAP PROJECT Ti sos tsscsvnceasandgs cancun danas tedgstesauvacstecadss asaup a 9 9 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 9 6 COPYING amp RENAMING AN ISAGRAP PROJECT cccccccsccvcccsesscvcsiecssuccssoasscceadssvecwecasswstecccsccnocteveucedacecsvevaccedeasssvecescdaes 9 11 0 7 SETTING COMMENT TEXT FOR AN ISAGRAF PROJECT oireeni tiiri deg ver ear biarewdaenvaewas shite a a aisa 9 13 9 8 SETTING THE SLAVE ID FOR AN ISAGRAF CONTROLLER ccccceeccsecceecccuscceccescecuscuseseeucsensceseseeeceenssuseseeseeness 9 14 9 9 OPTIMIZING LHE ISAGRAE CODE COMPILER carrar E Ganiacbe ches eansahea ca gen O E N TOA 9 15 9 10 USING THE TSAGRAE CONVERSION TABLE rasani a theciaciersiadebustntes A cape E TOA 9 16 9 11 EXPORT
183. 8 bytes include extra message end 1 byte That means max 2048 bytes in one ISaGRAF PLC scan can be sent to remote IP While for 1P 8x47 I 7188EG uPAC 7186EG uPAC 5xx7 VP 2117 and I 8x37 80 is 1024 bytes 2 Please do not send lots of bytes in one PLC scan cycle too frequently The controller driver will actually send only one message out each PLC scan when there is message in the sending buffer For example if there is 100 messages in the sending buffer the controller will send over these 100 message in 100 PLC scan cycles Example Please refer to WinCon CD ROM napdos isagraf wincon demo wdemo_19 amp Wdemo_20 or ftp ftp icpdas com pub cd wincon_isagraf napdos isagraf wincon demo 99 66 If you can not find udp ip udp recv and udp send in your ISaGRAF please visit http www icpdas com products PAC 8000 isagraf htm to download ICP DAS Utilities For ISaGRAF zip Then run the Setup exe to restore it to your ISaGRAF installed in PC Test Utility there is a useful utility udp exe can be used on PC to receive message coming from UDP IP Please run it in command shell W 8xx7 CD ROM napdos isagraf some_utility udp_test udp exe or ftp ftp icpdas com pub cd wincon_isagraf napdos isagraf some_utility udp_test User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 19 4 19 3 To Send Receive Auto Report data via TCP IP The WinCon 8xx7 8xx6 supports TCP IP Client since its driver vers
184. 8xx 7 english_manu WP 5xx7 CD napdos isagraf wp 5xx7 english_manu XP 8xx7 CE6 CD napdos isagraf xp 8xx7 ce6 english_manu VP 2xW7 CD napdos isagraf vp 25w7 23w 7 english_manu HAC ISaGRAF shee AF File Name chinese_user_manual_1_8xx7 pdt iP 8xx7 I 8000 amp uPAC 7186 I 7188 CD napdos isagraf 8000 chinese_manu WP 8xx7 CD napdos isagraf wp 8xx7 chinese_manu WP 5xx7 CD napdos isagraf wp 5xx7 chinese_manu XP 8xx7 CE6 CD napdos isagraf xp 8xx7 ce6 chinese_manu VP 2xW7 CD napdos isagraf vp 25w7 23w7 chinese_manu Soft GRAF HMI The XP 8xx7 Atom CE6 XP 8xx7 CE6 WP 8xx7 VP 25W7 VP 23W7 and WP 5xx7 support the Soft GRAF software to create a colorful HMI application Please refer to http www icpdas com faq isagraf htm gt FAQ 146 and http www icpdas com products Software Soft GRAF soft graf htmm All ISaGRAF Getting Started Manual User Manual http www icpdas com products PAC 1 8000 sagraf htm click Manual icon Resource on the Internet Newly updated ISaGRAF IO libraries drivers and manuals can be found at http www icpdas com products PAC 1 8000 sagraf htm click Driver or Manual icon Technical Service Please contact local agent or email problem report to service icpdas com New information can be found at www icpdas com FAQ Please visit www icpdas com FAQ Software ISaGRAF for Frequently Asked Question or visit http www icpdas com products PAC 8000 is
185. 8xx7 Atom CE6 and XP 8xx7 CE6 WP 8xx7 WP 5xx7 VP 25W7 can configure one of its COM2 RS 232 and COM3 RS 485 to become a Modbus RTU slave port In addiction it can expand max four Modbus RTU slave ports via plug I 81121W 81141 W 81421 W 8144W serial communication board COM5 to COM8 Then please refer to Appendix E and G of the W 8xx7 Getting Started Manual to setup COMS to other COM No first Please connect RTU_Slav at slot 8 or larger slot No as below om ISaGRAF T5 I O connection l O x File Edit Tools Optons Help B PRmweil FA e aj ue ret imon Rtu_slave_Port Please click on to get the m Baud Port 19200 On Line Help to check the bottom if the smut Delay_timed 0 release date of this rtu_slav is dated at m Atu_Slave_Ports3 0 Feb 15 2007 or later date m Baud Port3 19200 The older RTU_Slav doesn t support soe Delay_time3 0 Delay_time2 to Delay_timS setting eae Atu Slave _Port4 0 please refer to Chapter 1 2 to download am rtu_slav oa Baud Port4 19200 and re install it to your ISaGRAF a remot n sas Delay timed U cae Atul Slave_Ports 0 sat Baud Ports 19200 cae Delay timeS 0 sma reserved 0 smn reserved 0 im reserved 0 a a a 144 _ i _L k lt L Rtu_Slave_Port2 to Rtu_Slave_Port5 setting can be 0 5 6 7 or 8 Setting as 0 means not enable the Modbus RTU Slave port
186. A 3 21 3 3 2 Using io state to test the operation State or real VO DOardS sosiees ht he cose teh vos Selec cera E 3 22 3 3 3 Using echo tim to delay some milli seconds before the Modbus RTU Slave port to replying 3 23 3 3 4 Using RTU Slav to expand more Modbus RTU Slave ports in WP 8xx7 WP 5xx7 VP 25W7 XP 8xx Atom CH6 and XP 8xx CE Onnar aa a a aaa unk a aA 3 24 3 3 5 Using dis_stop to disable enable the ISaGRAF Download function nnnnnnneeseeeeeeeeseeseseseeeeserreseeee 3 25 IAA DIRECTLY REPRESENTED VARIABLES 3 cnces cathe tateatetnab saul e a a a a 3 26 3 5 D I COUNTERS BUILT IN THE I 87XXX amp I 7000 DA MODULES 00 0 cccccccccsssssseseeeeeeeceeeeeeeseeaaaaeessnseeeeeeeeeeeeeeenaaas 3 29 DOs AUTOSCAN VO neei esata aa aeons nti Aaah tana bantu ahaa ceases 3 31 Dido WV NOT PUD pn atats sieec e ile baat antag A 3 33 320 COUNTERS BUILTIN PARALLEL D L BOARDS anei sass in cntautaenad hie ah tania a 3 37 CHAPTER 4 LINKING CONTROLLERS TO AN HMI PROGRAM sssseececcccccocsssssssscececcccosoossssssssscececesssso 4 1 4 1 DECLARING VARIABLE ADDRESSES FOR NETWORK ACCESS ssssssceccccceesssseccccesaaessesececceseeseseeceeeeesaenseseceseeeagenes 4 4 2 READ WRITE WORD LONG WORD amp FLOAT THROUGH MODBUG cccccccsssesseceecceeeesseecceceeeaeeeeeeeeeeeesaaeeeeeeseeeaaeees 4 6 4 3 USING I 8xx7 AS A MODBUS I O OR A MODBUS TCPYIP VO 0 0 eeccccccccssssssseecccceneeesseeccccesa
187. AC Sep 2012 Rev 6 3 ICP DAS 2 15 Now we are going to assign the associated variable amp constant to each item Double click on the first contact a Select variable screen appeared First select the Scope to Global and the proper type to Boolean Then double click on INIT or you may use the keyboard to type INIT fae BaGRAP SIMPLELD LOI Quick LDP File Edit Toole Option Help Ae BA Eg Ed e lAa g F2 4JHE F3 JHE Fa GH FS 4H Fe HE F7 J40 Fe IG Fo Fan Integer Real Timer Message Program C function ba File Edit Tools Option Help Ae GA wes xB d h aaj FQ 4B F3 JHE F4 Gel FS H F HE F7 JO Fe If Fa Foi File Edit Tools Options Help Aa MOA HSl xB E P QageE gg Fo 4H F334 Fd GH FS 4H F Hi F734 Fe El Fo tF Sie w User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 16 Now move your cursor to the left of the parameter PT of the TOF block Double click on it type T 1 5s it means 15 second then press ORK HF IsaGRAF SIMPLELD LD1 Quick LD Program File Edit Toole Optone Help Balxan Eg Ed e gaja F2 4HE F3 JHE Fd GH FS CH F HE F7 In Fe Gl FQ gt F9 ae dii Os File Edit Tools Option Help Pa XE2 ms xd Br QQgaz FO JE FE Fa Gel FS 40H F TH Fae Fe GT FS P 9 4 C function User s Ma
188. AQ 067 71 72 76 77 WP8xx7 Same as wdmo_65a but add time synchronization and state report to PC FAQ 067 71 72 76 77 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS Slot 2 I 87018z slot 2 I 87018z 11 11 wpdmo_66 Wpdmo_70 Wpdmo_76 wpdmo7la wpdmo71b wpdmo7 Ic wpdmo7 1d wpdmo7 le wpdmo72a wpdmo72b wpdmo72c wpdmo74a wpdmo74b wpdmo75 wpdmo75b wpdmo77a wpdmo77b wpdmo78 wpdmo79a wpdmo79b wpdmo79c Record 1 to 4 Ch 18017HW voltage per 20ms then send this record file by Email FRnet WP 8xx7 or 1P 8447 slot1 I 8172W PortO FR 2057 adr 4 FR 2053 adr 8 SMS WP 8447 COM4 GTM 201 RS232 WP 8xx7 COM4 connects I 7530 CANopen ID 1 device 8DI 8DO 4A0 8AT FAQ 086 Similiar as wdmo_71A but connecting two I 7530 One is at COMS one is at COM6 WP8xx7 COM4 7530 CAN device to get string with float or integer data inside Similiar as wdmo_7 1c but connecting two I 7530 One is at COMS one is at COM6 WP 8xx7 COMS I 7530 CANopen device COM6 I 7530 CAN device New WP 8xx7 redundant system with RU 87P4 I 87K I O Without Touch HMI FAQ 093 Same as wpdmo72a but setup COM1 as Modbus RTU slave port to connect one RS 232 Touch HMI FAQ 093 New WP 8xx7 redundant system with I 3KE8 MTCP I O Without Touch HMI get average value of one REAL value FAQ 099 get average value of one Integer value FAQ 099 Using the I 8088W 8 ch
189. An ISaGRAF Project The ISaGRAF Workbench program has the capability of copying and renaming an ISaGRAF project or program This is useful if you want to maintain a copy of an ISaGRAF project or program in a secondary directory Copying An ISaGRAF Program To copy an ISaGRAF program open the ISaGRAF Project Management window first click on the name of the ISaGRAF program you want to copy then select File from the menu bar and then click on Copy When you click on Copy the Copy Project window will open and now you can enter the name of the program you have selected to where you want to copy the program If the new program name does not already exist IsaGRAF will create the project name for you A 1SaGRAF Project Management File Edit Project Tools Options Help Open Ctrl O Select project group New Ctrl N Rename Delete A To Cancel File Edit Project Tools Options Help Pe OHM ES t 2 B bmm il exam Example IL Project a Exam Example SFC Project rl 1 simplelc A Simple LD Program T A Simple LD Program f Example I O Connections For 8xx7 Reference Ne Author Date of creation Version number gt 2 2 Description Simple Example Of An LD Program Note in the bottom screen that ISaGRAF has created a new program named Scott and placed a copy of all the files from simpleld into the Scott program group User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3
190. BSR Aa sve oH aaga Begin mA SelMode Ladder Portion Of SFC Program Sequential Main Model R Sequential Mode2 Sequential Function Chart 2 5 2 Editing The SFC Program To begin editing the example SFC program double click on Main in the sequential portion of the TSaGRAF Programs window and the ISaGRAF SFC Program window will appear f 1SaGRAF SFC_EXAM MAIN SFC program File Edit Tools Options Help Da xoz m xod QQ Se F2 FO Ft FS 4 F FH Fe F7 Fe FS 15 x You will note an additional box to the right of the initial step box This box will contain the code for each of the steps and transitions in the example SFC program The code box is not required during the initial programming so you can to get rid of it temporarily by clicking on the black dot in the gray box area below the initial step and resize the window to approximately the size of the initial step box User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 58 E SaGRAF SFC_EXAM MAIN SFC program File Edit Tools Options Help a xoa m xad Qai a Fo F3 C Fa Fs fh F ys H Feth hH Fe B FS tse OR divergence commons File Edit Tools Options Help Dal xoa wm xB ds Qao sa The gray box will move down automatically when you click on the OR Divergence icon The next step is to click on the Transition icon to create Transition 1 and then the Step icon to create Step 2 as shown b
191. CAN converter to connect to other CAN CANopen devices Only the XP 8xx7 CE6 WP 8x47 WP 8x37 VP 25W7 23W7 and W 8x47 supports new redundant system the W 8x37 doesn t support it User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 13 How to select ISaGRAF PAC Memory considerations 1 The I 8417 I 8817 I 8437 80 I 8837 80 I 7188EG u PAC 7186EG I 7188XG u PAC 5xx7 VP 2117and 1P 8447 1P 8847 has memory limitation The IsSaGRAF code size can not exceeds 64K bytes size of the appli x8m file 2 WP 8147 WP 8447 WP 8847 WP 5147 WP 5147 OD and VP 25W7 VP 23W7 has code size limitation of 1M bytes The size is 16 times of the size of I 8xx7 1PAC 8447 8847 u PAC 5xx7 UuPAC 7186EG amp I 7188EG XG XP 8xx7 CE6 XP 8xx7 Atom CE6 2M byte CPU speed considerations The CPU of I 8417 8817 I 7188EG and I 7188XG is 80188 40MHz or compatible It is a 16 bit CPU It is not good at doing floating point value calculation If your application will do lots of floating point value calculation it is better to use WP 8xx7 WP 5xx7 or VP 25W7 VP 23W7 or XP 8xx7 CE6 or XP 8xx7 Atom CE6 or future advanced ISaGRAF controllers The CPU is 32 bit and its speed is about 10 to 20 times compared with the I 8xx7 amp I 7188EG XG especially for floating point value calculation The speed of I 8437 80 I 8837 80 1PAC 8447 8847 uPAC 5xx7 and uPAC 7186EG are about 4 times of the I 8xx7 amp I 7188EG XG Redundancy consi
192. CE6 controller The I 87K4 I 87K5 I 87K8 I 87K9 RU 87P4 and RU 87P8 expansion unit supports only I 87K serial I O moduls better to use high profile modules They don t support I 8K parallel I O modules Please refer to Getting Started Manual of I 7188EG XG or uPAC 7186EG for information about X xxx board or http www icpdas com products PAC 1 8000 getting_started_manual htm http www icpdas com products PAC 1 o_expansion x_list htm Please visit below Web site to get more information about I 8K and I 87K I O boards http www icpdas com products PAC 8000 8000_IO modules htm User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 2 3 1 Linking I O Boards To An ISaGRAF Project To begin connecting I O boards to an ISaGRAF project you must first link the I O boards to the ISaGRAF program The numbers on the left of the I O Connections window indicate the slot number Slots O through 7 are used ONLY for real ISaGRAF PAC series I O boards Note Slot 1 through 7 for XP 8xx7 CE6 XP 8xx7 Atom CE6 W 8xx7 Slots 8 and above can be used for virtual I O boards such as the Push4Key and Show3Led functions For I 7188EG XG uPAC 7186EG slot 0 is for X xxx serial I O boards such as X 107 slot 1 amp above are for others In this example I O connection we are using the I 8417 controller system that has the following boards installed Slot 0 I 8055 Board 8 digital inputs amp 8 digital outputs Slot 1 I 87055 Board
193. COM3 XP 8047 CE6 Ail mi l 837K8 base 87xxxW cards RS 485 Station 2 Ravina ii Station 1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS The fourth configuration is using two XP 8xx7 Atom CE6 XP 8xx7 CE6 PAC to connect some Modbus RTU device or Modbus ASCII devices Both PAC s COM3 RS 485 should connect to each other in this configuration Can use only one NS 208 or RSM 208 or two in each station Station 2 PC HMIL SCADA NS 208 or RSM408 NS 208 or RSM408 I FR COMS5 RS 232 nu 258 i Backup PAC XP 8047 CE6 b XP 8047 CE6 3 Rsaas 17520 _ RS 232 to 485 Conveter COMS link to COMS RS 485 Modbus Modbus a Device Device RS 485 Modbus Modbus Device Device Station 1 i 7520 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 20 4 20 2 WP 8xx7 Redundant System Please visit http www icpdas com fag isagraf htm gt FAQ 093 for more information Advantage more than the WP 8xx7 redundant system the PC HMI SCADA just need to connect to one IP address the active_IP1 address of the XP 8xx7 CE6 redundant system The Active_IP1 address will auto switch to the active XP 8xx7 CE6 s LAN1 or LAN2 port On the other hand the PC HMI SCADA need to connect to two IP address of the WP 8xx7 redundant system and they will auto switch to the second IP Active _IP2 if the first IP is disconnected For m
194. COUNTS8 next sampling end_if If the number of stored samples hasn t reached 1200 yet pulse COUNT by 8 for next sampling User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 25 ST program SendCom SSS ST gt If M1 False then Return This will make the following statement only be end_if processed when M1 pulse is generated User defined frame format Each contains 120 short integers STX DLE FRAME NO DATA ETX number of bytes 1 l l 120x2 l value 0x2 0x10 1 10 0x03 When FRAME NO If FRAME_NO gt 1 and FRAME_NO lt 10 then is between 1 and 10 No FRAME_NO 1 2 1 Get the short integer array No to process Keep in mind each array strore up to 240 samples in other case FRAME NO 2 No 1 of word 2 frames 1 position 1 2 position 121 Get starting position inside the array end_case Send one frame via Com3 TMP comwrite 3 16 2 write one byte STX to Com3 TMP comwrite 3 16 10 write one byte DLE to Com3 TMP comwrite 3 FRAME NO write frame No 1 10 to Com3 write 120 short integers inside the array to Com3 TMP comay_ww 3 No 120 position TMP comwrite 3 16 3 write one byte ETX to Com3 500 ms later send next frame M1 will be turned ON after 500 M1 False ms later at LD program Pulse If FRAME NO 10 then A z FRAME _NO 0 If a
195. D ROM napdos isagraf xp 8xx7 Atom ce6 demo WP 8xx7 WP 8xx7 CD ROM napdos isagraf wp 8xx7 demo WP 5xx7 WP 5xx7 CD ROM napdos isagraf wp 5xx7 demo VP 25W7 V P 23W7 VP 2xW7 CD ROM napdos isagraf vp 25w7 23w7 demo Or you may download them from below web site UPAC 7186EG ftp ftp icpdas com pub cd 8000cd napdos isagrat 7188eg demo UPAC 5xx7 ftp ftp 1cpdas com pub cd 8000cd napdos isagraf up5000 demo iP 8xx7 tp ftp icpdas com pub cd 8000cd napdos isagrat 1P 8000 VP 2117 ftp ftp icpdas com pub cd 8000cd napdos isagrat vp2k demo XP 8xx7 CE6 ftp ftp icpdas com pub cd xp 8xx7 ce6 napdos isagraf xp 8xx 7 ce6 demo WP 8xx7 ftp ftp 1cpdas com pub cd winpac 8xx7 napdos isagraf wp8xx7 demo VP 25W7 V P 23W7 ftp ftp 1cpdas com pub cd vp 25w7 23w7 napdos isagrat vp 25w 23w7 demo A 1SaGRAF Project Management Oj x File Edit Project Tools Options Help DO ADAMS to Risom 2 a a Project groups a x nctions Defaut cclisawint apl Samples cisawiniismp New project group 3 x New group Pre rege iro rrr re R Ns Close amp When you install the ISaGRAF example for the controller system it is recommended that you create an ISaGRAF Project Group to install the Location C ISAWIN1 Subai Path c isawinl Demo demo program files into User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 1 To install the demo programs int
196. DDR 8 For ex setting 3 as ON Dip 1 and 2 as OFF means DO ADDR is 4 then DI ADDR will become 12 The above figure is for the FR 2054 with its ADDR setting as 0 Dip 1 2 amp 3 are all OFF soits DI ADDR will be 8 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 23 7 Step 4 Write a Ladder program to blink output of FR_OUTOI to 03 BLINK FR_OLWTO1 Lh FR_OUTO2 Ti FR_OUTOS Step 5 How to test 1 Please plug I 8172W into slot 1 of the WinPAC 8xx7 The WinPAC s left most slot is 0 2 Please connect the I 8172W s Port O in this demo to one FR 2053 16 Ch DI and one FR 2057 16 Ch DO The FR 2053 s ADDR 8 DIP Switch 4 ON other dips 1 2 3 5 6 7 8 is OFF The FR 2057 s ADDR 4 DIP Switch 3 ON other dips 1 2 4 5 6 7 8 is OFF Connecting the I 8172W s Port 0 A to the FR 2053 s termial A and then connect to the FR 2057 s termial A Connecting the I 8172W s Port 0 B to the FR 2053 s termial B and then connect to the FR 2057 s termial B FRnet DO module for example FR 2057 can only set module ADDR as 0 to 7 FRnet DI module for example FR 2053 can only set module ADDR as 8 to 15 Then after you download this ISaGRAF project into WinPAC 8xx7 or iPAC 8x47 you will see the FR 2057 s DOI to 3 is blinking in the period of 0 5 second This IsSaGRAF example program is Wdemo_070 pia which can be download at WP 8xx7 CD ROM napdos isagraf wp 8xx7 demo or ftp ftp
197. E then COUNT COUNT 1 end_if COUNT plus 10 when K2 is pushed if M2 TRUE then COUNT COUNT 10 end_if save COUNT value to the 5th Pos of No 2 integer arry TEMP ARY_N_W 2 5 COUNT write one byte 2 hex to Com3 TEMP COMWRITE 3 16 2 write 1 integer 1 long integer contains 4 bytes of Pos 5 inside No 2 array to Com3 TEMP COMAY_NW 3 2 1 5 write one byte 3 hex to Com3 TEMP COMWRITE 3 16 3 end_if IMPORTANT NOTE Each ST statement line MUST end with a semi colon as shown above After entering in the above example program remember to click on the Save icon to save the program then click on Exit User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 40 Use the similar procedure for the Connecting I O as detailed in Section 2 1 2 Ina RAF ST EXAM Programe File Make Project Tool Debug Optone Help a ee a i 4 2 Be Begin Ee OT Wo connection File SET Tools oS Help Begin ET BSB SPB emrlrk S 2 m ref 11 C a KI ak2 3 A 4 1 E gt pushdkey n Lo La e EE La 10 x Use the similar procedure for the Compilling the project as detailed in Section 2 1 3 InaGRAP 8 EXAM Programs File Make Project Tools Debug Options Help Make application Sb Ow Aes Begin ently Touch End Application mn time Options Compiler options B
198. EG uPAC 5xx7 1P 8xx7 VP 2117 WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 VP 25W 7 and VP 23W7 controllers and they support the following Modbus functions p a 2 Read N bits boolean 3 Read N words signed short integers 4 Read N words signed short integers 6 Write I word signed short integer 16 Write N words signed short integers To read boolean variables both of function or 3 may be used If using function 3 values are stored in a word field variable TRUE means OxFFFF To write boolean variables both of function 5 15 could be used If using function 5 writing bit 0 of byte vH to 1 will set the Boolean variable to TRUE For ex writing vH 1 or 3 or 255 will set Boolean variable to TRUE To read analog variables function 3 should be used To write analog variables both of function 6 16 could be used To read long words signed long integers and float function 3 should be used To write long words function 16 should be used Please refer to section 4 2 for the definition of network address of long words User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 5 1 To assist you with the naming conventions used throughout the Modbus protocol addressing chapter the following table describes the notations used in this chapter IMPORTANT NOTE All of the values used in the request and answer frames are hexadecimal values Modbus address described in this chapter is equal to Network address of
199. EL N GUPL_Zh i Sjadbe7 08 TENET Demo C3 Chunese manu 9 Viral CE Pro in standard CD dcon utility ko G Dlite E Definition tst z E ETCP t fas OD fase Seal TD SHS Tab SSCA bal User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 47 ISaGRAF project architecture SaGRAF WHMI 12 Programs ol x Fie Make Project Tool Debug Optons Help D HS OS th Zxr mk Aes Peal HR Sim out Begin STi Structured Text Variables Set as True to stop addr defined as 22 Hex is 16 How many chanels in I 8017H to record We use 4 channels in this demo Ch 1 to 4 Internal File ID Recording state 0 No action 1 recording 2 finished How long to record unit is minute addr as Interval 1 How long to save a record unit is ms addr as 1 Total_record1 Integer Internal How many records in this recording action This value is calculated by the ISaGRAF program automatically addr declared as 5 Internal Current finished record count addr declared as 7 To use in Tor loops i8017H 0 7 Variable array Dim as 8 link to I 8017H s Ch 1 to 8 Volt1 0 7 REAL Internal Variable array Dim declared as 8 The voltage value converted from i8017H 0 7 Integer Variable array Dim declared as 4 link to I 8024 s Ch to 4 File_namel Message Internal File name Len is 64 init as Web_Datal curvel js Web HMI support only RAM Disk File in Web_Datal If the f
200. Edit Tools Options Help a ES gt f t p F A amp Each channel of i 8024W can ra af mnl ref 8024 have different range setting sous CH1_ rang 33 m CH rang 33 EJ i_8024 roe cme CH3 rang 33 4 coe CHA rang 33 ay E E 9 v2 ie ia cea a User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 19 3 2 9 Using the I 87018ZW I 87018ZW is a 10 channel of Thermo Couple temperature input board for industrial use or can be set as normal analog input board like 20mA 0 20 mA 4 20 mA 2 5V 1V 500mV 100mV 50mV or 15mV The thermocouple measurement for each channel of the I 87018ZW is more accurate than I 87018W and I 87018RW and each channel can configure to be different Input type and range For example using Ch 1 to 4 to measure 4 to 20 mA using Ch 5 to 8 as Thermo Couple K Type using Ch 9 to measure 2 5 V and using Ch 10 as Thermo Couple R Type Please refer to http www icpdas com products Remote_IO 87k 87018z htm gt 87018ZW The analog input value of I 87018ZW is between 32768 to 32767 refer to Appendix D When applying as temperature input please refer to Chapter 3 2 2 to get direct temperature value Please connect an external resistor of 125 ohms if using I 87018ZW to measure current input range setting is 06 20mA or 07 4 20mA or 1A 0 20m lt A I 87018ZW s Sample Rate is about 10 10 1 Hz Means sample per second on all 10 channels
201. FAQ 051 Non linear conversion like give P to find V P V relation listed in a file Read 10 REAL value from a file 10 rows each row has 1 REAL value use str_real Msg_F 18xx7 since 3 19 I 7188EG XG since 2 17 2 15 W8xx7 since 3 36 WP 8xx7 Msg_N 18xx7 since 3 19 I 7188EG XG since 2 17 2 15 W8xx7 since 3 36 WP 8xx7 Read 20 REAL values from a file 4 rows each row has 5 REAL values uses msg f FAQ 060 Read 20 Integers from a file 2 rows each row has 10 Integers uses msg _n Retain 17 REAL value in a file 2 rows Each row has 10 REAL value Retain 2 Boo 17 REAL in a file 2 rows Each row has 10 REAL value Retain 25 Integer in a file 2 rows Each row has 10 integer value Retain 2 Boo 25 Integer in a file 2 rows Each row has 10 integer value FAQ 060 Retain 17 Real 2 Boo 10 Integer in 2 file Each row has 10 value Retain more than 255 Real 255 Boo 255 Integer in 2 file up to 1024 18xx7 WP8xx7 AutoReport data to PC via UDP Controller 10 0 0 103 PC 10 0 0 91 Send email via Ethernet port To one receiver without attached file FAQ 067 71 72 76 77 For WP 8xx7 amp W 8xx7 only Send email to one receiver with one attached file FAQ 067 71 72 76 77 station 1001 Time synchronization of many controllers via Ethernet station 1002 Time synchronization of many controllers via Ethernet WP8xx7 Record temperature per minute to a file Then send it by email per day F
202. FC child program action1 see cy a L1 L2 amp L3 set to the same value True or False as SFC step 1 GT1 T gt T1 means if the time has been stay in SFC step 1 larger than Timer variable T1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 33 SFC child program action2 p he es O O SFC child program action3 Action P ActiontP Ll TRUE LZ g FALSE L3 FALSE End_action GS1 7 gt T1 F Uh TR L1 TRUE LI TRUE L2 TRUE S2 T gt T1 L3 FALSE 2 End_action Li TRUE Action P L1 TRUE L2 TRUE 3 L3 TRUE ActiontP End_action a LI FALSE L2 FALSE L3 FALSE End_action User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 34 ST program end init Set INIT to False so that INIT is only TRUE at the first scan cycle since it is declared with the initial value TRUE INIT FALSE How to test 1 Download Demo_ 33 to the controller 2 Prepare a RS 232 cable to connect Com3 of the controller to Com1 of your PC 3 You may open a Hyper Terminal with Com1 9600 N 8 1 and No flow control to type the following command to test M2 lt CR gt change to mode 2 T lt CR gt request current period time T200 lt CR gt change to 200ms T1500 lt CR gt change to 1500ms M lt CR gt request current mode lt CR gt is the r
203. FIFO CPU DDA Chip Profile Generation T Interface X axis gt Protection m ii DDA Chi p Optical Isolation Y axis Limit Switch Input Port a Connector Limit Switch T Limit Switch Signal Input Port Fig 1 block diagram of I 8091 card 18 2 2 DDA Technology The DDA chip is the heart of I 8091 card it will generate equal space pulse train corresponding to specific pulse number during a DDA period This mechanism is very useful to execute pulse generation and interpolation function The DDA period can be determined by DDA cycle Table 1 shows the relation among DDA cycle DDA period and output pulse rate When DDA cycle set to 1 the DDA period is equal to 1 1 x1 024ms 2 048ms The output pulse number can be set to 0 2047 therefore the maximum output pulse rate will be 1Mpps The minimum output pulse rate is 3 83pps when set DDA cycle 254 DDA period 254 1 x1 024ms 261 12ms DDA DDA cycle Xpuse LHS Lf L Ypuse 6 LJ LJ LI LI LI Le Z pulse 4 m m i Fig 2 DDA mechanism User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 3 Table 1 The Relation among DDA cycle DDA period and output pulse rate 3 4096ms hoo e E N 1 1 024ms 2047 DDA period 1 DDA period 254 1 261 12ms 7839pps 3 83pps The DDA cycle can be set by 18091_SET_VAR Q command which decribed in charpter 3 The selection criterion of DDA cycl
204. FRnet setup code without other codes f8BIT2wx1 i8172wx2 fi8172wx3 li8172wx4 li8172w 5 8 3 ms 4 ms 4 ms 4 ms ms 4 ms 4 ms 4 ms 8 ms 4 ms 4 ms 6 ms 9 ms 12 ms FX 016 x 1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 23 3 WP 8xx7 VP 25W7 23W7 W 8xx7 XP 8xx7 CE6 or 1PAC 8x47 plus I 8172W boards or uPAC 7186EG plus FX 016 can connect to FRnet I O modules for example FR 2053 FR 2057 FR 2054 FR 32P FR 32R listed in http www icpdas com products Remote_IO frnet frnet_list htm One I 8172W board has two FRnet ports ID is port 0 amp port 1 UPAC 7186EG FX 016 supports only port 0 Each FRnet port can connect up to 8 FRnet D O Module Address and up to 8 D I Module Address It is very important The Module Address for D O modules can only be set as 0 to 7 while D I Module Address can only be set as 8 to 15 For normal usage the Module Address settings for D O and D I must be set as different In special case it allows setting D O as the same Module Address but it just repeats the number of D O the D O channels with the same Module Address has the same output value So each FRnet port can connect more than 8 FRnet D O Module Address and up to 8 D A Module Address The D I Module Address cannot be the same The max I O channel number for one FRnet Module Address is 16 That means one I 8172W can connect max 2 ports
205. F_VAL 13 Datal5 F_VALI 14 Datalo F_VALI 15 Datal7 F VALI 16 G data TRUE function returns TRUE If any name of Datal to Datal7 is modified or value of SIZE1 is modified User must modify the below code F_VAL1 0 F_VALI 1 F_VALI 2 F_VALI 3 F_VALI 4 F_VALI 5 F_VALI 6 F_VALI 7 F_VALI 8 F_VALI 9 F_VAL1 10 F_VAL1 11 F_VAL1 12 F_VAL1 13 F_VAL1 14 F_VAL1 15 F_VALI 16 TRUE S data Datal Data2 Data3 Data4 Data5 Data06 Data07 Data08 Data09 Datal0 Datal1 Datal2 Datal13 Datal4 Datal5 Datal6 Datal7 store variable value to F_VALI1 0 16 function returns TRUE User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 27 ST functions read f1 This function read SIZE1 number of REAL value from file and store them to F_ VALI return reaf_fl as TRUE Ok FALSE Error read_f1 FALSE set as FALSE Error at the beginning Filel f_wopen File_namel Try to open file in Read amp Write mode if Filel 0 then File doesn t exists return exit this function end_if max num_rowl rows to read these SIZE1 number of REAL values Each row in the file contains 10 REAL values for 112 0 to num _rowl 1 do if f_eof Filel TRUE then test if End _Of_File reached exit Reach End Of File exit for loop end_if
206. File Edit Project Tools Options Help Beltet i ae User s gvide Language reference Technical notes E X C functions E ebus_s IO boards BBE 256 test S256 Functions Function blocks Heference t107 Auth C function blocks unor i Conversion functions Date of creation 20027 9726 hie TARA Version number 1 ISaGRAF 3 46 blake sure the motion driwer is well installed Description Please refer to Napdos lSaGRAPG000 Driverymotion pdf P Demo please refer to demo demo 26 High SPeed move and stop when ORG1 ORG2 limit switch is tour call Beside please refer to I 8091 amp J 8090 User s Manual It can be found in the package box of the I 8091 or I 8000 CD ROM napdos 8000 motion i809 manual ftp site ftp ftp icpdas com pub cd 8000cd napdos 8000 motion 1809 1 manual User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 2 18 2 Introduction 18 2 1 System Block Diagram The I 8091 stepping motor control card is a micro computer controlled 2 axis pulse generation card It includes a 2Kbytes FIFO to receive motion command from host a micro computer for profile generation and protection 2 axis DDA chip to execute DDA function when interpolation command is used 2500Vrms optical isolation inserted for industrial application 2K
207. H9 LS24 Right limit swtch of Y axis CH10 ORG2 Original position swtch of Y axis CH11 YSTOP Stop or not of Y axis TRUE stop User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 25 M_intin Move a long distance on X Y plane This command will move a long distance interpolation line on X Y plane The CPU on I 8091 card will generate a trapezoidal speed profile of X axis and Y axis and execute interpolation by way of DDA chip Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 Xpulse_ integer 524287 lt Xpulse_ lt 524287 Ypulse_ integer 524287 lt Xpulse_ lt 524287 Return Q_ boolean always return TRUE Xpulse Ypulse Pa 4 4 Ze 0 0 Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 26 M_intin2 Move a long distance on X Y plane m_intin2 This command will move a long interpolation line on X Y plane It will automatically generate a trapezoidal speed profile of X axis and Y axis by state machine type calculation method Parameters card NO_ integer the card No has been set by M_regist valid is 0 19 Xaya integer end point relate to present position speed_ integer 0 2040 acc_mode_ integer 0 enable acceleration deceleration profile 1 disable acceleration deceleration profile Return Q_ boolean always return
208. Here we use 0 25 second as a demo If setting too short than your device should have some bytes may be missing Remember to set STEP to 0 to wait next data 1 IF T1 gt T 250ms THEN Tstop T1 T1 T Os STEP 0 NUMI COMARY_R 3 1 IF NUM1 10 THEN an END_IF END _IF Do proper operation if receive correct data The code listed here is only for demo It is depend with your END_CASE application we just assume the correct data has 10 bytes here User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 24 3 24 3 Report data to remote device periodically If the ISaGRAF controller need to send data to other device or PC every a short time by using its RS 232 422 485 COM Port just like below ISaGRAF controller Device Send data to device periodically for example every 5 second Wait amp receive data If the correct data is received do proper operations User can use the similar program as below SFC program Please declare TMP amp Port_Ok as Boolean Internal Action P Open COM3 as 9600 8 N 1 Port_Ok COMOPEN 3 9600 8 0 1 End_ lt Action The data to be sent depends on your Action P application Please prepare them and call COMARY_W or COMSTR_W to Prepare all bytes in No 1 byte array send it Cece 8 TMP COMARY _W 3 1 20 End_ Action GS2 T gt T 5s Here using COMARY_W to send 20 bytes in No 1 byte ar
209. IMPORT VARIABLE DECLARATIONS VIA MICROSOFT EXCEL ccccccccescccssccseceeeccescceseceeeceussseseseseceusess 9 19 Me SPINS Ue nea g sos ecto taste cays oa I Sonne ao Sate cede gd aes EA casi A A E EA N econ EAA TE E E T 9 22 9 13 HOW TO SEARCH A VARIABLE NAME IN AN ISAGRAF PROJECT 0 cc cece ceccceeccceecceccescccsecceccescceseceeeceuscsussseeseusess 9 25 CHAPTER 10 THE RETAINED VARIABLE AND DATA BACKUDP 1 cccssccccssccccccccsccccccscccccccceccceeeees 10 1 LOL HE IRE TAIN VARTA B Ee A A Er O E E A 10 1 102 DATA BACKUP TO THE EEPROM sanea A sagtetontaueas tandeastlarndeaaeitecoasar ths AEEA 10 6 NAL HS Beal o Bal 3 aA sa lt 8 e 02 eh PB EE er Nene 10 8 OE CCC es CIN RAN Mca feecictna alice Seats sen ge a tama E A bitcteesa mae a At hdc N ics daoaans 10 9 103 22 Upload datastored ii He SRAM cerrarse ner a e E tear deans A EEEN 10 9 LO3 52 Download data to the SAM a n E ARA 10 11 10 3 4 Operation Functions for the battery backup SRAM 2 0 0 ccscccsssssseecceceeeeeeeeeeaesseseseseeeeeeeeeeeeeeeeeaaaaaaessees 10 13 10 4 USING I 8073 MULTIMEDIACARD TO STORE DATA ccccccccescccseccesccencceeceeeceeucceseceeuceeuesuseseeeceessseeseessesesuesees 10 13 LOLS READING 62 W RIMMING PIED orci is Snchecal get uisbauaiced dauikwas tacideaduaseas panei oot A A E 10 14 10 5 1 Wpdmo_51 Read 10 REAL values from a file Total 10 rows each contains one REAL value 10 15 10 5 2 Wpdmo_54 Read 20 REAL values from a fi
210. ING THE FAST FRNET REMOTE 1 OQi cececcccccccccccccccccccccccccccccceces 23 1 23 1 INTRODUCTION OF GHEE IR INE D1 Oo oxic casrosurbacievoavtensenvesseuiaacts wacivmornstsuisocidetosvietia bebe ulead roa diiureciarob acscetoavdicteabuebeuinade oe dinoniarwbubaacaioanter 23 3 232 PROG RAMMING AE F RA 619 scree cs nee vectra cece ie eens eran wert ce ive Se on ett is nC Cada abe nop 23 5 23 3 USING FR_B_A FUNCTION TO REDUCE THE PROGRAM SIZE cccececceccececcccececcscecesceceececescecescscsescesescucescesescs 23 8 CHAPTER 24 USING COM FUNCTIONS TO READ WRITE THE RS 232 422 485 PORT 24 1 24 1 CNTROLLER SEND REQUEST AND GET REPLY FROM DEVICE cccceccsccsccsscsscesccscesccsccsccscescescessescesscscescessens 24 2 24 2 CONTROLLER JUST WAIT DATA FROM THE REMOTE DEVICE cscscescecescecececccececcscucescucescecescecscscescsctsescesescesescs 24 3 24 3 REPORT DATA TO REMOTE DEVICE PERIODICALLY sccsceccsceccsceccececcecececscscscesescucescucescscescsceecscescscesescusescesescs 24 4 24 4 CONTROLLER SEND DATA WHEN EVENT HAPPENS csceccececcscccececcececcececeecscecscscscucescuceececescecescsstscscesescesescesescs 24 5 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 Reference Guide English manual File Name user_manual_1_8xx7 pdt iP 8xx7 I 8000 amp uPAC 7186 I 7188 CD napdos isagraf 8000 english_manu WP 8xx7 CD napdos isagraf wp
211. ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 1 5 1 1 5 Important Notice for Windows 7 64 bit Users If your operating system is Windows 7 64 bit Professional Enterprise or Ultimate the IsaGRAF must be installed under the XP Mode Please do the following steps to install Virtual PC and XP Mode Installing the Virtual PC and XP Mode 1 Download Windows Virtual PC and Windows XP Mode installers from the Windows Virtual PC Web site http go microsoft com fwlink LinkID 160479 2 Double click on WindowsXPMode_nn NN exe where nn NN is the locale e g en US and follow the instructions in the wizard to install Windows XP Mode 3 Double click on Windows6 1 KB958559 x64 msu to install Windows Virtual PC 4 Reboot your computer 5 After rebooting click on Star gt All Programs gt Windows Virtual PC and then click Windows XP Mode 6 Follow the instructions in the wizard to complete Windows XP Mode Setup and Configuration Record the password that is provided during the Setup because it is required to log on to your virtual machine 7 Now go back to section 2 1 to install the ISaGRAF 1 1 6 Important Setting for Using Variable Arrays Important setting for using variable arrays Please add two lines on the top of the c isawin ese isa ini file to enable the usage of variable arrays DEBUG Arrays 1 1 2 Installing The ICP DAS Utilities For ISaGRAF The ICP DAS Utilities For ISaGRAF consists of 3 major items
212. If sending buffer is full the oldest mesage will be drop to release space for new tcp_send request parameter ID_ Integer send to which connection can be to 4 The related ip address and port No is defined in tcp_clie IO complex equipment Msg_ Message The message to send return value Q_ Boolean True send OK False parameter error For ex setting ID_ as 8 or related connection is not defined in IO connection Tcp_clie Tep_recv tcp recv TCP Client receive message from remote PC or device s TCP IP server via ethernet jp Kec Target WinCon 8xx6 8xx7 since driver version of 3 36 Note The receiving buffer size is 4096 bytes If the receiving buffer is full the oldest message will be drop to release space for receiving new coming data Parameter ID_ Integer send to which Tcp_Clie connection can be 1 to 4 The related ip address and port No is defined in IO connection Tcp_clie return value Msg_ Message the received message If Msg_ empty message it means no message coming There is an useful Tcp_ Server tool can be run in PC to simulate the TCP IP server device It resides at WinCon 8xx7 CD ROM napdos isagraf some_utility or visit ftp ftp icpdas com pub cd wincon_isagraf napdos isagrat some_utility to download please copy Tcp server folder to your PC then open a command prompt and key in tcp3 lt port No gt for example tcp3 14001 This
213. M 208 and two XP 8xx7 CE6 controllers and one or more I 87K8 base with I 87xxxW I O cards PC HML SCADA NS 208 o1 RSM 408 NS 208 or RSM 408 ptherne Backup PAC b XP 8047 CE6 aii XP 8047 CE6 RS 485 a 1 a S i l 87K8 base 8 7xxxW cards Station 1 i Station 2 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 20 1 The second configuration is using two XP 8xx7 Atom CE6 XP 8xx7 CE6 PAC without I O or connects some other devices by serial ports for example using both XP 8xx7 Atom CE6 XP 8xx7 CE6 s COM4 RS 232 to link one I 7530 respectively to become CAN signal to connect other CAN CANopen devices Both PAC s COM3 RS 485 should connect to each other in this configuration Can use only one NS 208 or RSM 208 or two in each station PC HMI SCADA oaa NS 208 o1 RSM408 NS 208 or RSM 408 the Main oi Backup PN PAC COM3 b RS 485 XP 8047 CE6 XP 8047 CE6 COM3 link to COM3 Station 2 Station 1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 20 2 The third configuration is using two XP 8xx7 Atom CE6 XP 8xx7 CE6 PAC to connect one or more I 87K8 expansion bases and connect some Modbus RTU devices or Modbus ASCII devices by one or more serial ports Can use only one NS 208 or RSM 208 or two in each station PC HML SCADA NS208 o1 RSM408 NS 208 or RSM 408 P Backup i PAC a he XP 8047 CE6
214. M pulse every 500 ms M pulse is used to record the A I sample value Generate M1 pulse every 500 ms when M2 is set to TRUE M1 pulse is used to send one frame to PC User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 24 ST program Sampling This will make the following statement only be processed when M pulse is generated Get current array No and the start pos of the array which the samples TI0 IVI pulse Tete if M False then return end_if will save to Each array can store up No COUNT 1 240 1 to 240 samples Position COUNT 240 No 1 Store I 87017 8 A I value to short integer array Please keep in mind the max No of short int arry can be used is 12 TMP ary_w_w No position A01 TMP ary_w_w No position 1 AQ2 TMP ary_w_w No position 2 AQ3 TMP ary_w_w No position 3 A04 Store I 87017 8 A I value to TMP ary_w_w No position 4 A05 TMP ary_w_w No position 5 A06 TMP ary_w_w No position 6 A07 TMP ary_w_w No position 7 A08 If number of stored samples reach 1200 send to PC via Com3 in 10 frames If COUNT 7 gt 1200 then FRAME _ NO 1 set FRAME NO M1 True M2 True COUNT 1 reset COUNT to 1 set M2 True to generate M1 pulse at previouse LD program Pulse set M1 True to send first frame at next ST program SendCom else COUNT
215. MEA Ta he u i si B BF OJE RR Ee 4 31 Click on Numerical Input set Device Type to 4x Device address to 10 BIN Number of words to 1 Trigger Device Type to LB Trigger Device address to 9000 No above Dec to 7 No below Decimal to 0 Input low to 32768 Input high to 32767 And then select the prefered shape Remember to save the project EFasyBuilder EBFril Window 11 Window 011 Bile Edit View Option Draw Parts Library Tools Window Help lelx Pict 2s ee gt ajila alao Ele alae Bellies Le E e u pt ru wu Create Numeric Input Extend Object MER PAE a BIRF GEIR IKE reneral Numeric Shape Font In De ripton Read addres Device typ Device addfe EN 7 No ot wate 1 7 sah Trigser addy z Device type Device address 9000 Create Numeric Input Object A Decimal C Hex C Binary C Mask Single float C Double float Faw data display C Do conversion General Numeric Sh E Display Numeric No above Dec f Mo below Der 0 aput low 32768 32767 Input high User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 32 Click Tools Compile to compile this project FasyBuilder EBFril Window 11 Window 011 EB File Edit View ption Draw Parts Library Tools Window Help S
216. M_cspmv Chance SPCeCANiO V Citas cece sass dssacin ies a a a a Gh uete 18 23 M_slwdn Slowdown O1OW SPC Cetin casts Dszeeincensdihacdedeanpickuca a SahataatengieiaaeGawers 18 24 M_slwstp SOW CO Wil OSLO at cite eres cc ct Sarasa a a been a 18 24 Mterpolaion commands ia gs atin taicanoackeue tod aasasn tase a aH 18 25 M_intp Move a short distance On X Y plane ccccccccccccccccceeeeseseeeseeeeeeceeeeeeeeaeaaaasssseseeeeeeeeeeeeeeeeeaaaaassssseeeeeeeess 18 25 M_intln Move along distance on X Y Plane iinresci ss ancanodeucaidsvnetdauncorvadduoasnieensunsondenardenenousnataoeetuanedaedendnees 18 26 M_intln2 Move along distance Ol Xe Y plane soovcdtessecanodevdeadsveetdawnesnvaddneagniearsuelondeeaadenmnsudaddbavetadestardeadioes 18 27 M_intcl2 IMG VE aC CIE SOll AY ANC eaen E a E ae 18 28 M_intar2 Move A AEC OI XY DIAN are E a E e e 18 29 M_intstp Test X Y plane MOVING COMMANA ccccccccccecccceeeecaeeeseseeeeeeeceeeeeeeeeeeaaaasssseeeeeseeeeeeeeeeeeaqags 18 30 FS O90 CnC OFGEr commands seese a a eea E ara raa 18 31 M_r_enco Reset E9090 sencorder value to Oy sisi catinacnsennsautnndita seenssandnatucamnmnnsainndsatnienssandsithwedneensiedoedaves 18 31 CHAPTER 19 ETHERNET COMMUNICATION AND SECURITY eseeeessssssssssccccccccecessesssssssocsssssecessssseesso 19 1 19T ETHERNET SE CUR EIN Aiia stares Gils ose E a T T E a cee sneer Dl aeet 19 1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 5 19 2 DELIVERING MESSAGE VA
217. No indicate that to download to which starting Byte No of the SRAM Valid starting byte No 1s as below S256 1 249 856 S512 1 512000 X607 1 118 784 X608 1 512000 The other rows are the data A String String should start and end with the character of for ex Abcd123 7 byte The NN NN in hexidecimal and should not equal to 0 could be used to indicate the ASCII character For ex ABC OD contains 4 bytes the 4th byte is lt CR gt B Byte Byte should start with and end with forex 0 123 255 Valid byte range is from 0 to 255 C Word Word should be start with and end with forex 100 20000 32767 Valid word range is from 32768 to 32767 D Integer Integer should be start with and end with forex 1234567 200000 Valid integer range is from 2147483648 to 2147483647 E Real Real value should be start with lt and end with gt for ex lt 123 gt lt 1 56E 2 gt lt 123 456 gt The character between each Byte Word Integer Real String at the same line should be at least one space character lt SP gt or lt Comma gt or lt Tab gt For example 201 to download to the SRAM which staring from byte No 201 Hello 10 20 30 40 10000 70000 End data total 18 bytes User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 11 1 to download to the SRAM which staring from byte No 1 23 da
218. O 43 140 connection loj x File Edit Tools Options Help e PBem tIl FRAS g tmj ref 107 mmn port no 3 wm baud 9600 mma char 6 aus parity 0 smn Stop bit 1 s timeout 2500 i 5 m mbus B com_port n 10 bd User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 14 Example 44 Connecting 1 M 7017RC This example is Wdemo_ 44 Please set M 7017RC s Input range amp Type to 20 mA User may refer to the attatched manual in the product box or visit http www icpdas com products Remote_IO m 7000 m 7000_list htm to get each M 7000 Module s Manual to find their Analog I O Value mapping to physical I O Type code setting We use the variable array in this example please refer to Section 2 6 for the details on it Variables Communication state of the related M 7053D M7017RC O 7 Integer Internal Variable Array Dim 8 M 7017RC s Analog Input value 32768 to 32767 means 20 to 20 mA 1f setting Input range amp Type to 20 mA In_ Val 0 7 REAL Internal Variable Array Dim 8 REAL format Engineering value converted from M7017RC 0 7 4 to 20 mA converting to 0 0 to 1000 0 psi VAL O 7 Integer Internal Variable Array Dim 8 Integer format Engineering value converted from M7017RC 0 7 4 to 20 mA converting to 0 to 10000 unit is 0 1 psi Project One Ladder program one ST program SaGRAF WDEHMO 44 Programs i iol x F
219. OLD value end_if if set anew value to VAL_ OUT if VAL_OUT lt gt OLD_VAL_OUT then VAL _OUT is acceptable if VAL_OUT gt 200 amp VAL_OUT lt 5000 then T1 TMR VAL_OUT Convert integer VAL_OUT to Timer T1 in ms MSGI1 OK else VAL_OUT out of range MSGI1 VAL_ OUT should be between 200 and 5000 end_if OLD_VAL_OUT VAL_OUT update OLD value end_if ST Program end_init in the End area INIT FALSE User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 2 LD Program Demo in the Begin area T1 Display VAL _OUT to S_MMI VALTOLED RUN G FSH_ Operations E The status of four push buttons will be displayed on the HMI screen E The first output will be blinking with the period defined by VAL_OUT in ms E Value of VAL_OUT can be modified from the HMI screen and displayed on the front panel of the controller E The second and third output L2 amp L3 can be controlled by the HMI screen User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 3 Steps to build a Spotlight HMI screen A Complete this Demo project as described above After you finish it Compile it to make sure there is no error B Copy all files inside ICO folder to the associate directory of your project The ICO folder contains some boolean icon files already bulit by ICP DAS They can be found fro
220. Off for freely used Refer to Appendix A 2 of its Getting Started manual delivered with the hardware To use WinCon s COMS to COM 14 at I 8112 8114 8142 8144 serial expansion boards please refer to Appendix E of the Getting Started WinCon ISaGRAF PAC manual 3 COMI of I 7188EG uPAC 7186EG WPAC 5xx7 is set as Modbus RTU Slave port when shipping User may switch it OFF to freely use it by COM port functions Please refer to Section 3 6 of its Getting Started Manual delivered with its hardware However I 7188XG s COMI can not be switch OFF it is always Modbus RTU Slave port If user want to use COMS3 to COMS of I 7188EG XG and 7186EG please plug one extra X 5xx expansion I O board inside it http www icpdas com products PAC 1 o_expansion x_list htm The following will introduce the most common methods of communication User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 24 1 24 1 Cntroller send 1 request and get 1 reply from device Below figure lists the most common RS 232 422 485 application ISaGRAF controller Device Beene aaa weve EEEn ala 2 Is complete valid requesting command received If yes reply the related answer back to the controller 3 receive all coming bytes If it 1s correct format do proper operation Then go back to step to send next request at later time 4 Wait another requesting command if come in go to step 2 User can use the below code or similiar code to do
221. P Qaak Fo 4Ei F3 JHE F4 GH FS F THE F JH F8 Gl Fo tac Then the window will look like below bie saGRAF SIMPLELD LDI Quick LD Program File Edit Tools Options Help Da xea Mp kod Prt Qgqak gs FO 46 FS Fd GH FS CH Fe HF F7 J Fe IGl Fo Fa ai User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 14 Double click anywhere inside of the second block and the Function Block assignment window appears Select the BLINK type function block are using in our example program To learn how the BLINK function operates you can click on the Info button for a detailed explanation of its functionality mE saGRAP SIMPLELD LDI Quick LDP File Edit Toole Options Help Ba Be wesl_xbh d hPm Qaak gf FQ 4B F3 34 F4 GH FS H F HE F 3H Fe Fo P 9a o Function block read lang trom array of Gxx write long to array of Gxx read short trom array of Gxx write short to array of Gxx get asci code arc sine Info arc tangent running average transter 16 bit toa 1 vrord blinking signal convert to boolean contat Messages function black sample Cancel get character comparator write byte ta COS of Gxx write byte to COnMSI4 of Gxx write integers to COM of o x7 File Edit Toole Options Help DA XDA M Ed plage FRAPE F3 35E Fa GH FS F Hi F73 F ipl Fo Fa w User s Manual Of ISaGRAF P
222. P 5147 5147 OD controllers The XP 8xx7 CE6 is the abbreviation for the XP 8047 CE6 XP 8347 CE6 XP 8747 CE6 controllers The XP 8xx7 Atom CE6 is the abbreviation for the XP 8147 Atom CE6 XP 8347 Atom CE6 XP 8747 Atom CE6 controllers The 1P 8xx7 is the abbreviation for the 1P 8447 1P 8847 controllers 2 1 A Simple Ladder Logic LD Program For more extensive information regarding all of the capabilities of the ISaGRAF programming system please refer to Appendix E Language Reference of this manual or the ISaGRAF USER S GUIDE manual which can be found from the CD_ROM of the ISaGRAF workbench Its file name is either ISaGRAF pdf or ISaGRAF doc Ladder Logic Basics Ladder Logic programming LD is a graphical representation of Boolean equations combining contacts input arguments and coils output results Ladder Logic most closely resembles the electrical schematics that an electrician or technician may use to diagnose and troubleshoot an industrial process controller system The LD language enables the programmer to describe the conditions and modifications to Boolean data by placing graphical symbols to represent hardware devices used in a process control application A Simple Ladder Example Program The following is a step by step example on how to create a ladder logic hence forth referred as LD program using the ISaGRAF Workbench software program provided with the ISaGRAF controller system
223. PAC 8xx7 XP 8xx7 Atom CE6 and XP 8xx7 CE6 supports only I 8172W no support I 8172 WinCon 8xx7 supports I 8172W and I 8172 uPAC 7186EG supports only FX 016 x board no support I 8172W and I 8172 3 Every FRnet Output module has a RESET or called HOLD dip on its Dip switch or a special Jumper User may set it to ON position or enable it this will reset the output channels to OFF state when the communication is broken between the I 8172W or uPAC 7186EG FX 016 and the FRnet D O module For example set 8th Dip to ON of FR 2057 means enable it 4 The communication state of D I modules can be detected in the 8 Ch D A of I 8172 For uPAC 7186EG FX 016 itis Frnet86 in the IO connection window However FRnet Output module doesn t support communication detection 5 WinPAC 8xx7 supports max 8 pcs of I 8172W in its Slot O through 7 while XP 8xx7 CE6 and W 8xx7 support max 7 pcs of I 8172W in slot 1 thru 7 1PAC 8xx7 supports only max 4 pcs of I 8172W in its Slot O through 7 VP 2xW7 supports max 3 pcs of I 8172W in its Slot 0 through 2 and uPAC 7186EG supports only one FX 016 in its slot Q Advantage of FRnet I O Fast I O scan it is about 3 ms per FRnet I O scan This depends on your program s PLC scan time for ex if the IsaGRAF PLC program scan time is about 15 ms then the scan time for all will be 15 ms not 3 ms Below is the approximate PLC scan time of an ISaGRAF project which runs only the
224. Positive enables a Boolean operation between a connection line state and the rising edge of a Boolean variable Place the cursor to the right of the Q and click once then type in Mode for both lines of logic Place the cursor to the left of the IN on the top 1 Gain function block click once and enter a 1 Do the same for the second LD line and enter a value of 2 then click once on the Q and enter in Mode When you are finished editing the ISaGRAF Quick LD Program window it should look like the below example User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 56 m ISaGRAF SFC_EXAM SELMODE Quick LD Program File Edit Tools Options Help Dal xoa m l xodi PH aani amp F236 Fle F GH FS F CHEF 1K FS Ip FS Fl Fie Make Project ons le es 4H Fa C TREE seat ad Ra Create new program Sequential Main program Cancel The next step is to create a CHILD program called Model ISaGRAF SFC_EXAM Programs o Bhe ose Make POR me m SUS Help 20 i Ms Ee teste new program Sequential User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 57 Follow the same procedure to create a second CHILD program named Mode2 When you are completed the SaGRAF Programs window should look as follows _ISaGRAF SFC_EXAM Programs Fal ET File Make Project Tools Debug Options Help BP
225. Project architecture Tat RAF DEMO 02 Programs File Make Project Toole Debug Options Help D Ce D x te am He 2 Bs Begin l get rising pulse of K1 K2 amp Kato bli M2 amp Ma demo TSTART TSTOP Begin arg Ladder Diagram Variables Mi Boolean Internal Indicate a rising pulseofK1 M2 Boolean Internal Indicate arising pulseotK2 M3 Boolean Internal Indicate a rising pulse of K3 Operation timer initial value is set at T 0s LD program prg1 Get rising pulse of K1 K2 K3 and save to M1 M2 amp M3 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 19 ST program demo Start timer IF M1 THEN TSTART TI TSTART will start ticking the T1 timer END IF Stop timer IF M2 THEN TSTOP TI END _IF TSOP will stop ticking T1 timer Reset timer IF M3 THEN T1 T 0s Reset T1 timer to 0 sec END IF Output L1 L3 L1 T1 gt T 2s AND T1 lt T 15s L1 will be TRUE between 2 and L LI 15 sec of the value of T1 L3 L1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 20 11 3 2 Demo_17 R W Integer Value From To The EEPROM Project architecture sats RAF DEMO 17 Programs File Make Project Tools Debug Options Help SE tnet Mie mk Aes Begin Eas st init Do some init must be in the upper position Z SA
226. RAF ERUS MM TO connection File Edit Tools Optone Help 2 gt PBPn ts KR e Only Package No to 128 is available F nay 4 Mus package 33 64 0 package 65 96 0 6 sms package 9f 126 0 package 129 160 0 package 161 192 0 a a package 193 224 0 am ebus m package 225 256 0 gt Group n fa boo_pack n B ana_pack CER Ho 32 No l 1 enable Value ot Package 1 32 7 5 3 Programming Ebus Packages Before you can exchange any data across a Ebus network you must make sure that each controller is configured as either a Ebus master ebus_m or Ebus slave ebus_s and remember only ONE controller can be the master in the same Ebus Group No Refer to Section 7 5 2 The following Ebus function blocks can be used in a LD program to exchange data across an Ebus network Ebus_b_r read one boolean package Ebus_b_w write one boolean package Ebus_n_r read one integer package Ebus_n_w write one integer package Ebus_f_r read one REAL package Ebus_f_w write one REAL package The Integer package and REAL package use the same memory Please DO NOT use the same package No as Integer package and also as REAL package at the same time Or the local fault No 115 may happen Please refer to Chapter 10 6 The below block is to get the communication ststus of each Boolean amp Integer Package Ebus_ sts Get ststus of each Package User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP
227. RAF PAC Sep 2012 Rev 6 3 2 xX 11 45 elim S42 2 BAAR we a kim 12 3 exes F zil 85 X BMC x 0 05 0 1204 SARRE C FR wea Y BH CY to HHL a 005 CO 120 aa tee F ap sew mi A m TF 0p are By the procedure you will get the trend curve as the below window You can modify its size or check at any trend line If you move your mouse to point at some position at the trend line the related data is shown EJ Microsoft Excel curvel js E 5 x E eee RHED RAM BAD AAO IA BRO MEC RAD Sf ae Se rE fea S a DAHLS AO Bi e 7 ui SSB s F 2 9 A BHF 3 fe SERIES curvel CH1 C 2400 3 dio ann aol Din ERIS 0 995 0 192 1 994 i User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 46 Please save this trend curve diagram asa Microsoft Office Excel xls format Then at any later time you can open it to display the trend curve directly EJ Microsoft Excel curvel js p J O x KJ 8e0 RRD WAD MAD A0 IA ERO MEUD HAH MER TE EX O meza o G e y vas Io AdB GO RRB Cho oui ne a Brees Chis 3 gy SFRBAC i EE z J i on ae AROSE IE I Os j Bia EESC ee eee a ee on e iai OA 51 1576 1201 9906 Leurvel js cms O E A EAEN ete ee eee MA 3 trend 3 2ds je E TANE AT A ees tand Satin w i Adyviskatardi Mand owls Bree E 3 x ATTE il Temp 3 Ala X Gi E I
228. RAF program variables The only caveat emptor to these internal variables is that you must follow a strict programming scheme to program and access these internal variables and they are more complicated to create than the regular input and output variables For a professional programmer recommend to purchase an ISaGRAF 256 workbench Single Type Board Internal Variable Programming Scheme For single typed board s is the slot No ec is the channel No Z IXS C free channel of a boolean input board ex 1X2 3 QXS C free channel of a boolean output board PQXO 2 IDs c free channel of an integer input board ID3 1 QDs c free channel of an integer output board QD2 4 Z ISS c free channel of a message input board IS3 1 QSs c free channel of a message output board JQS2 4 Complex Type Equipment Internal Variable Programming Scheme For complex board s is the slot No b is the index of the single board within the complex equipment c is the channel No IXs b c free channel of a boolean input board ex IX2 3 2 QXS b c free channel of a boolean output board ex QXO0 2 1 I1Ds b c free channel of an integer input board ex ID3 1 3 QDs b c free channel of an integer output board ex QD2 4 3 Z oISs b c free channel of a message input board ex IS3 3 1 QSs b c free channel of a message output board ex QS 2 1 4 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 26 An Internal Varia
229. RE O Cho a Pata Se C ETERO Cts Fai eta A Fatt ARAL G forties H HER M HA AHD her reise aE TT Pll E Tan ENT ha Tare EN E TIEN P HILE A Ilill I gt A eba lofente fee po i ok pE i p Please click on the first data at the left top position Then press and hold in Shift and at the same time press Ctrl End You will see all data been selected El Microsoft Excel curvet js T a se GRE WAO IBAD fo LAD HED AED HAH _ amp X bi G aS 12 B JZU BSBZa O A Bl Al amp US User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 44 Then click on ill Chart Wizard EJ Microsoft Excel curvel jz CER SED MARCH O G alala HAD feo La BAD MEJO HAH lo x f SEASHORE FX Al 3 etl se er ee a Pee pt ce fT te o we pt tp ft 0 054 2391 0 047 0 044 2393 0 045 0 033 0 028 01 023 0 019 0 012 0 01 2400 0 001 2401 Hoa ob Harel MRS 5 a B B14 BARS amp 005 0 995 4 106 1 998 0 997 D024 1 992 0 998 0 086 1 996 0 995 OFS 1 994 0 997 4 063 1 996 0 997 D052 1 996 0 997 4 042 1 996 0 998 D03 1 995 0 998 02 1 995 0 997 012 1 9842 0 997 O 002 1 996 JE ai Please select the Line Chart on the left hand side And select the left top type on the righthand side Then go Next else time RE 4 7 1 BERN EEA SETAA BARN a 3 User s Manual Of ISaG
230. RN Cancel Click on the station you would like to connect first and then click on Connect to Station to command the modem dialing to the faraway controller MSIE DAS Modem Link ICP DAS CO LTD fed Controller station List iva Sey Ee GN LOM PORT COM 3 Modem Youre OFF ON Connect to Station x ICF DAS CONNECT CONTROLLER ICF DAS COLTO Mim Ea STATION NAME Tiger PHONE NUMBER 22570001 Yait about 70 seconds for remote response DISCONNECT Mimimize Window After the connection is Ok You can download monitor and change the variable value just like you did when the controller is near beside you User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 13 5 To disconnect from the target controller close the Debugger window Then you can choose No to keep the phone connected or Yes to hang off phone If you choose to keep the phone connected you can open another ISaGRAF project to directly connect to another faraway target The modem won t dial again D SaGRAF TESTI Debugger Miel x File Control Tools Optons Help irts hm bo S Me RUN allowed 0 current 3 maximum 6 overntlow 0 16 06 35 0 application stopped 16 07 11 0 application stopped ICF DAs CONNECT CONTROLLER ICP DAs CO LTD Bil Ea STATION NAME Tiger PHONE Petter ents x AN Do You Want to Disconnect ModernLink Also However keep in mind remember to d
231. SP1 spotlight File Edit Insert Options Help A D B s i m pla O x scl de ER a po SpotLight Demo Button 1 Button Buttons L1 L L3 Q i VAL OUT VAL OUT 300 m 500 VAL OUT I Add the HMI screen to the Workspace Quit simulation then run Debug Workspace SaGRAF DEMO 34 Debugger Miel x File Control Tools Optons Help Pb be Oo AS RUN SaGkE 4F DEMO a Pro EYANS File Make Project Tools Debug Options Help A So dE miH Aes Debug Simulate Workspace Begin Demo Ladder Diagram User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 14 Move the HMI screen to the right Workspace Workspace Cancel e J Time to download to the controller and test Click on Debug to download the project to the controller and test it You may double click on L2 L3 or VAL_OUT to modify the value and see what it happens on the controller And also you can press the 4 pushbuttons on the controller IsaGRAF DEMO 34 Programs File Make Project Took Debug Options Help HAE be t s xr on Qos Begin E IRaGRAF DEMO 34 8P1 SpotLight Fie Edit Insert Options Help B DB amp 2 r e pnsan pdam t SpotLight Demo Button Button Buttons Buttoned L 1 L La O ie E VAL OUT 1500 ms OK VAL OUT 1500 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14
232. ST Example Using Internal Variables loj x nstances Defined words zomment Rama real Input 2 real Input 3 real Output 1 Real Output 2 real Output 3 v ICP DAS 4 11 Compile amp download the project You may refer to section 2 1 3 amp 2 1 5 Note If using Modbus TCP IP protocol make sure the Net ID section 1 3 1 IP and Mask address appendix B for the I 8437 80 I 8837 80 and 1P 8xx7 1s set up correctly The HMI can access to I O channels through the associated network address now User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 12 4 4 Linking ISaGRAF PAC To Touch 500 Touch500 series HMI support below protocols to link to ICP DAS ISaGRAF controllers Touch 506L Modbus RTU RS 232 Modbus RTU RS 485 Touch 506TE Modbus RTU RS 232 Modbus RTU RS 485 Modbus TCP IP Touch 510T Modbus RTU RS 232 Modbus RTU RS 485 Please install EasyBuilder 500 software Ver 2 7 1 or later version first before you can program the Touch 506L 506T 510T HMI You may download the new released software and manual from below web site http www icpdas com download others touch touch htm setup zip or run setup exe at I 3000 CD ROM napdos others touch SOOseries setup RS 232 Cable Pin assignment of PC to Touch 500 series For PC to download HMI screen PC 9 Pin DSUB Female RS232 Touch 510 PC 232 9 Pin DSUB Female RXD 2 Js 8 RXD TXD 3 7 TXD GND 5 5 GND
233. Show3Led functions on the front panel of the controller The I 8xx7 1P 8xx7 XP 8xx7 Atom CE6 WP 8xx7 and WP 5xx7 supports the Show3Led to control Leds on the front panel of these PAC Some can control 3 Leds However some can only control 2 Leds or one Led Only the I 8xx7 and iP 8xx7 support the Push4Key The Push4Key are the four pushbuttons on the I 8xx7 control front panel and they are handled as digital inputs The Show3Led are three of the four LED s on the I 8xx7 control front panel the first three from left to right the fourth LED is strictly to show if the power is turned on the I 8xx7 controller system and they are handled as digital outputs Both of these can be linked to an ISaGRAF program through the I O Connection window and can be used to interface with Man Machine Interface MMI programs or for program debugging It is recommended that you assign these functions to slot 8 or higher remember slots O through 7 are reserved for real I O boards IMPORTANT NOTE As with any real digital input or real digital output you MUST declare a variable name for each of the Push4Button inputs and Show3Led outputs in the SaGRAF Global Variables window BEFORE they can be assigned to an ISaGRAF program ISaGRAF IO4LD Global booleans _ j 5j xj Fie Edt Tools Options Help a oe xOd rig Booleans integersReals Timers Name Attrib Messages FB instances Defined words Addr Comment Q3 s IS
234. Soft GRAF HMI demo01 demo07 Please refer to the FAQ 146 example A simple Web HMI example ad 5W VB net 2008 demo 01 for WP 8xx7 DIO demo slot Q Please refer to Chapter 6 of the WP 8xx7 Getting Started I 87055W slot 1 I 87024W wp_vb01 VB net 2008 demo 02 for WP 8xx7 Analog I O wp_vb02 Slot 2 I 87017HW Please refer to Chapter 6 of the WP 8xx7 Getting Started VB net 2008 demo 03 for WP 8xx7 wp_vb03 Read Write long integer float amp Timer Please refer to Chapter 6 wpdmo_01 WinPAC demo_01 R W float value from file FAQ 060 WinPAC demo_02 RAW long integer from file ooo wpdmo_02 FAQ 060 To output at a time interval SYSDAT_R SYSDAT_W SYSTIM_R wpdmo_03 SYSTIM_W ST QLD WinPAC demo_04 User defined Modbus protocol No using Mbus wpdmo_05 To do something at some sec later when an event happens FAQ 017 apa sW wpdmo_06 Using Message Array MsgAry_r MsgAry_w wpdmo_04 wpdmo_07 Convert float value to string using real_str amp rea_str2 PID control refer to WinPAC 8xx7 CD Minos napdos isgraf wp 8xx 7 english_manu PID_AL htm wpdmo_09 Store amp backup boolean amp long integer value To From files SS wpdmo_10 Store amp backup boolean amp long integer value To From EEPROM SS Dir is Micro_SD save 3 values to 3 files per 10 minutes change file name per month Retain variable by Retain_b Retain_N Retain_f Retain_t FAQ 074 Dir is
235. T program ERR THEM Functior File Edit Tools Options Help Ss He Ed elg CASE Ba xoga This function DictionaryPO REAL value from file and raturn ranf Fif am TDIR Ab Eil CE Berar SaGRAF WDEMO 56 READ Fi Local booleans File Edit Tools Options Help oc mm OOC exe dK a Booleans integers Reals Timers Messqaes LEE instances Defined words Name Attrib fy Local objects Pi internal 0000 p User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 23 Variables Global variable The number of retained variables Can be 1 to 255 Please also modify the Dim value of the eee meee onan F VALI and Old F VALI to the same value as SIZE1 Here we use SIZE1 as 17 How many rows in the file This value is automatically num_rowl Integer Internal calculated by SIZE1 Each row should have 10 REAL values except the last row ace ncaa aee eee How many data in the last row 8 This value is automatically calculated by SIZE1 RE LOAD Set as True to read File once init as TRUE Data_Ok1 TRUE means File Ok Bs aa want to save data it will set this value to Len is 64 init as Gystem_Disk data56 txt F VAL1 0 16 REAL menai Mean array Dim should be init as the same value SIZE1 Old_F VALI Old value of F VALI Variable array Dim 0 16 ee should be init as the same value as SIZE1 o ln Index of
236. TCP IP I O There are some configurations that the HMI software gathers the I O data from some called Modbus I O modules These I O modules scan each input channel and refresh the output channels when need Most of time there are no control logic inside these I O modules they are controlled by the HMI To fit such kind of usage the I 8xx7 iP 8xx7 I 8437 80 I 8837 80 can be treated as a Modbus I O module additionally the I 8437 80 I 8837 80 and 1P 8xx7 can be treated as a Modbus TCP IP I O module To do that follow the following procedures If you are not familiar with the ISaGRAF programming recommended to review Chapter 2 Create a new project You may refer to section 2 1 1 2 Example XIII ox DemoPgm File Edit Project Tools Options Help otrok TP TON TOF QLD GalL eA g demo_ Create new project ng reset timer TSTART TSTOP ST QLD demo 51 demo 03 RAN syiar date amp time SYSDAT_R SYSDAT W SYSTIM_R SYSTIM demo 04 Calculate empty cycle time TP 1 QLD demo_ 05 Create new project x demo 06 co L co o L gt Los no coo coo coo coo ooo ad ox coo coc coc coo coo coo m demo 07 Fifa Reference Author ICPE 10 configuration Date Of Creatio Version Numbe Siae z A ISaGRAF Project Management Fh ioi xi File Edit E Tools Options Help t g b g Togal separator ontrok TP TON TOF LD Sort Move up in list op and reset time
237. TRUE ii X Y a 0 0 y NOTE 1 Only one of M_intIn2 M_intcl2 amp M_intar2 command can be called at one time the other motion moving commands related to the same I 8091 card should not be called unless it is completed Please use M_intstp to test command of M_intIn2 M_intcl2 amp M_intar2 completed or not 2 One controller can only drive one I 8091 to move by M_intIn2 M_intcL2 M_intar2 command Two or more I 8091 cards in the same controller to use M_intIn2 M_ intcL2 M_ intar2 at the same time is not possible User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 27 M_intcl2 Move a circle on X Y plane m_intel2 This command will generate an interpolation circle on X Y plane It will automatically generate a trapezoidal speed profile of X axis and Y axis by state machine type calculation method Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 X Y_ integer center point of circle relate to present position dir_ integer moving direction 0 CW 1 CCW speed_ integer 0 2040 acc_mode_ integer 0 enable acceleration deceleration profile 1 disable acceleration deceleration profile Return Q_ boolean always return TRUE Y N X Y CW A ane CCW where radius sqrt X 2 Y2 NOTE 1 Only one of M_intIn2 M_intcl2 amp M_intar2 command can be called at one time the other motion moving commands related to the same I 8091 card should not be called unless it is c
238. UTS Real Output 3 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 3 To assign the other variable address click on an unassigned Map Segment number and then double click on the variable you want to assign to the address and the variable will automatically assign itself to the Map Segment Modbus SCADA addressing map ah xj File Edk Options Help Variables not mapped _ Booleans integersiReals Timers Messages D3 Real input 3 OUT2 Real Output 2 OUTS Real Output 3 For human s thinking way network address represented in hexadecimal format is inconvenient and it increases the chance to make mistake Therefore it s better to change it to be represented in decimal format To do that is as following Modbus SCADA addressing map File Edit Options Help Map __Hexadecimal IMPORTANT NOTE REGARDING MODBUS NETWORK ADDRESSING The Modbus network address definition scheme is sometimes different between HMI devices and other software programs The difference is typically that the other programs may assign a network address number that is one 1 less than that of the IsaGRAF controller system User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 4 HMI or devices such as Indusoft Iconics Citech Wizcon Kepware s OPC server Intellution s 1Fix Wonderware s Intouch National Instruments Labview and ICP DAS s Touch 506L Touch 506T an
239. Utilities For ISaGRAF from http www icpdas com products PAC 8000 isagraf htm gt Driver on the right hand side 1 3 Hardware Setting on ISaGRAF PAC All the hardware setting on the ISaGRAF PAC such as IP address Net ID Modbus RTU slave port pin assignment of communication port etc Please refer to each ISaGRAF getting started manual which can be found in the accompanying CD_ROM of the shipping box WP 8xx7 CD napdos isagraf wp 8xx7 english_manu getting_started_wp 8xx7 pdf WP 5xx7 CD napdos isagraf wp 5xx7 english_manu wp 5xx7_manual pdf XP 8xx7 CE6 CD napdos isagraf xp 8xx7 ce6 english_manu getting started xp 8xx7 ce6 english pdf VP 2xW7 CD napdos isagraf vp 25w7 23w7 english_manu getting started vp 2x W7 pdf iP 8xx7 CD napdos isagraf ip8000 english_manu ipac 8x47_getting_started_english zip uPAC 7186EG I 7188EG XG CD napdos isagraf 7 188eg english_manu 718xegxg_getting_started_english zip VP 2117 CD napdos isagraf vp2k english_manu vp 2117_getting_started_english zip or visit to http www icpdas com products PAC 8000 sagraf htm and click Manual icon to download the Manual User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 1 7 Chapter 2 Getting Started NOTE The I 8xx7 is the abbreviation for the I 8417 I 8437 80 I 8817 and I 8837 80 controllers The WP 8xx7 is the abbreviation for the WP 8147 8447 8847 and WP 8137 8437 8837 controllers The WP 5xx7 is the abbreviation for the W
240. VE save datas to EEPROM End end init end of first scan set INIT FALSE this program must Begin stint Structured Text Variables Please refer to Chapter 2 6 for more information about Variable Array Attribute Variable Array Dim is 8 V O 7 Integer Internal If modifying the value of V O 7 the new value will be stored to the EEPROM Te If controller is just powered up initial value is TRUE ST program st init if INIT TRUE then First scan cycle Read 8 integers from EEPROM Read long integers stored at the save them to Old_V 0 7 V 0 7 position from 1 to 8 of the eeprom at for ii 0 to 7 do the first scan cycle VIii eep_n_r ii 1 Old_V ii Vil End_for remove protection of EEPROM TEMP eep_en Remove the protection of EEPROM so that it can be written later end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 21 ST program save save V 0 7 to EEPROM if it is modified You will find write to EEPROM take lots of time about 23ms for each eep_n_w for ii 0 to 7 do The value will be saved to eeprom only when IF V ii lt gt Old_V ii THEN the current value is changed TEMP eep_n_w iit l V ii Old_V ii V ii END_IF Then update Old value to the new value End_for ST program end init Set INIT to False so that INIT is only TRUE
241. W 8747 70 Q How to do Time Synchronization and record state of many ISaGRAF PACs Q Application Record 10 Ch temperature value into a file in W 8xx7 every minute When 24 hour recording is finished send this record file by email every day Q o lt e oe S e J T Q Application sample Record Voltage Current input by W 8xx7 every 20 ms for 1 to 10 minutes Then send this record file by email Q Why does the I 7017 or I 87017 s Current Input reading value become double or incorrect Q How to use ISaGRAF new Retain Variable What is its advantage Q Why my ISaGRAF project can not connect Modbus Slave device correctly Q Application sample Record Voltage Current input by uPAC 7186EG every second for User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 80 J oS NO 74 75 T1 No English ISaGRAF Ver 3 FAQ 1 to 10 minutes Then send this record file by email Q Application Record 10 Ch temperature value into a file in uPAC 7186EG every minute When 24 hour recording is finished send this record file by email every day 8 IQ How to measure 150VDC in ISaGRAF controllers plus the I 87017W A5 I O card 83 Q How to set I 8x37 I 8x37 80 I 7188EG and pPAC 7186EG s TCP recycling time Q Application A Cost Effective and Hot Swap Redundancy System by uPAC 7186EG or I 8437 80 plus RU 87P4 8 Q The WinCon 8347 8747 uwRPAC 7186EG and i1P 8447 8847 c
242. Winsock state Controller connected well i 7018z on line For testing Write Boolean Read Long value signed 32 bit and write long integer value by Modbus TCP IP protocol set Boo_21 to True long 15 15 set long_15 os TEESE smar 70182 Ch 1 to Ch 6 Type code 14 0 20 mA Analog value 0 3276 Read Word_1 to Word_6 signed 16 bit Ch 1 Ch2 Ch 3 Ch 4 Ch 5 Ch 4 1622 3323 4608 5600 6352 i70182 Ch 7 to Ch 10 type code OF T C K type unit is 0 01 degree Read Long_ Long_9 Long_11 Long_13 Ch 7 Ch 8 Ch 9 Ch 10 999390 999990 2450 999990 value of 999990 means ThermoCouple sensor broker line Communication state Receive 10 bytes User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 64 At designing time of the VB 6 0 program please add Winsock control to your VB 6 0 project as below Then ethernet operation will be possible in the project Projecti Microsoft isual Basic design Fie Edit View Project Format Debug Rom Query Diga BS 1 Ei Add Form S Add MDI Fom gt Add Module 3 Add Class Module fy Add User Control 1 Add Property Page i Add User Document Add WebCls E e Add Data Report i idd DHTML Page Es E Add Data Environment al Add File Ctrl D c a g J Remove Formal fin j 4 References Componente Ctrl T Project Properties D I eckErroar l Benone 8 8x C
243. _46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 M _s ne Set N O N C To set all of the following limit switches as N C normal close or N O normall open If set as N O those limit switches are active low If set as N C those limit switches are active high The auto protection will automatically change the judgement whatever it is N O or N C Limit switches ORGI LS11 LS14 ORG2 LS21 LS24 EMG Note If using I_8091A rather than I_8091 on the I O connection window user don t need to call m_regist amp m_s_nc they are ignored The card_NO of I 8091A is equal to its slot No I 8xx7 0 7 W 8xx7 1 7 Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 SW_ integer 0 N O default 1 N C Return Q_ boolean always return TRUE Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 Note If using I_8091A in the ISaGRAF IO connection window there is a NO_OR_NC parameter can be set to define as 0 Normal Open 1 Normal Close So user no more need to call this m_s_nc function if using I_8091A User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 18 Stop commands M_stpx Stop X axis m_ stpx card E Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 Return Q_ boolean always return TRUE Exam
244. _cntl 1 else saving is finished save_filel False TMP F _ close Filel Close file STEPI 2 2 recond finished Msg1 Record is finished You may download the record file to your PC now end_if end_for end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 77 11 4 Frequently Asked Questions FAQ USaGRAF Ver 3 FAQ Questions Descriptions Demo programs http www icpdas com faq isagraf htm www icpdass com gt FAQ gt Software gt ISaGRAF Ver 3 English FAQ Table 1 Q How to get counter value built in I 7000 amp I 87xxx remote I O modules 5 Q Can I use more than 32 I O in my ISaGRAF project if I don t have ISaGRAF 256 or SaGRAF L Q Can I use ISaGRAF controller I 8417 88 17 8437 8837 I 7188EG XG as a Modbus Master controller to gather data from other Modbus devices 7 Q Can I write my own protocol or third party protocol to apply on ISaGRAF controllers Q What is the limitation of program size of I 8417 8817 8437 8837 I 7188EG amp I 7188XG 9 Q Can not fine I O boards in the ISaGRAF I O connection window 10 Q I Want to email my ISaGRAF program to someone How can I archive one ISaGRAF project to a single file 1 Q How can I implement motion control in I 8417 8817 8437 8837 Q My HMI software wants to access to float values and long word values inside the p lt NO I 8417 8817 8437 8837 7188EG amp 7188XG H
245. _s lt New Setas Fous slave Jeue onta we am GHEMODE S E AE Eyan _ xE Or tne RES_CH4 n ma CHS_MODE 3 i 5017a 8CH Analog Inputwith Alarm Cancel m RES CHE nt me CHE MODE 3 ldz Isolated 16 CH OI amp 16 CH DO OK mm GH MODE 3 Note can GHG MODE 3 m GH1_2_filter 0 Library mm GH3_4_filter 0 e sos CH5_8_filter 0 C Boards G Equipment 8033W J Ch encorder 3 ch z index The default CHx_x_filter setting is 0 0 means do not enable this function If the value is not 0 it is for filtering the input signal with smaller time width that is larger input frequency will be filtered out CH1_2_filter for Ch 1 and Ch 2 of 8 Ch Up Counter and 8 Ch Frequency or Ch 1 of 4 Ch Dir Pulse Counter and 4 Ch Up Down Counter CH3_4 filter for Ch 3 and Ch 4 of 8 Ch Up Counter or 8 Ch Frequency or Ch 2 of 4 Ch Dir Pulse Counter and 4 Ch Up Down Counter CH5_8_filter for Ch 5 6 7 8 of 8 Ch Up Counter and 8 Ch Frequency or Ch 3 and Ch 4 of 4 Ch Dir Pulse Counter and 4 Ch Up Down Counter Please set a proper filter value according to the physical input signal Max allowed input signal Hz CHx_x_filter value O 1K 200 2K 5K O A k O S a Cid User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 15 CHx_MODE setting is to set the signal input type of each channel as below
246. a Boolean package with an ID of 3 and an integer package with an ID of 3 There is no limitation on how many controllers can read the same number package across the Fbus network Any of the S2 S3 S4 and S5 controller systems can read the Boolean package with an ID of 1 and the integer package with an ID of 1 if desired Rule 4 ONLY ONE controller system can be configured as a Fbus Master all the others controller systems MUST be configured as a Fbus Slave The master controller sends commands for how data is to be exchanged across the Fbus network If you configure more than one controller system as a master or configure none of the controller systems as a master on the Fous NO DATA CAN BE EXCHANGED across the Fbus network User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 2 7 2 Configuring The ISaGRAF PAC To Be A Fbus Master Or Slave To begin configuring a controller system as either a Fbus master or slave while the XP 8xx7 CE6 XP 8xx7 Atom CE6 WP 8xx7 WP 5xx7 VP 25W7 23W7 doesn t support Fbus it supports Ebus only Please refer to section 7 5 first open up the SaGRAF I O Connections window and double click on a slot number higher than 7 The Select Board Equipments window will now open click on Equipments and then double click on the fbus_s selection to configure an Fbus slave or double click on fbus_m to configure an Fbus master Remember ONLY ONE controller can be
247. a user allocated RAM memory in the WinCon 8xx7 The sampling time is one record every 0 01 second The record period is 1 to 10 minutes Then PC can download this record and display it as a trend curve diagram by M S Excel cceeeeeeeeeeees 11 68 FiA FREQUENTLY ASKED QUESTIONS 9c0 4tstirtens teeta las arab ieetaeeousd sae abeanlon ede ataalosea a einatiahes ebiantaiios ee 11 78 CHAPTER 12 SENDING Bei ceci Eea EA AEAT AS 12 1 CHAPTER 13 REMOTELY DOWNLOAD VIA MODEM LINK cccccssscccsscccsccccsccccsccccsccccsccccscccceescess 13 1 1r INTRODUCTION ononon E Gah nat AA eG ae a 13 1 13 2 DOWNLOAD PROGRAM VIA MODEM_LINK ccccseccescccssccseccecccusseseceesceeussessceeuceeusceseceeseeusseseseseceeecsuseseeceeness 13 2 CHAPTER 14 SPOTLIGHT SIMPLE HME ceniris inerea o rN KNEE 14 1 1 A SPO TWIGH EXAMPLE oaei a ave a a a a a ee 14 1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 CHAPTER 15 CREATING USER DEFINED FUNCTIONS cccccccsssssscccsscccsssssscccscccssssssccccccccssssssccccssees 15 1 15 12 CREATING TUNCHONS INSIDE ONE PROIJE CV extent eres uae seca widscl Eaa E ot teuptiaengalde a E E 15 1 15 2 CREATING FUNCTIONS IN THE TSAGRAB LIBRARY cisssoiasshcacvetenstednndaetvas nace e REEE EEEREN 15 6 CHAPTER 16 EINEIINGAIVIMEICOIN ieiiiccescctcauedshstcecatessawsadabicdencsbensadcheadacaassbanmacabacdencsbeaseisheaduasesssasaadavacdenssbeasabeteacss 16 1 16 i HARDWARE INSTALLATION sariini e T E
248. aGRAF IO4LD 1 0 connection 5 xj fie Edt Tools Options Help a PBPA ts FA Ce pos nel a amj ref 11 i_87017 oo o T oy KI C Pushbutton 1 t i_87024 we Y K2 Pushbutton 2 4 amp KJ C Pushbutton 3 BB o Kat Pushbutton 45 a Se EB gt pushy A mB eto kK w Eee wie woa aw ret 10 ts i_87024 we 7 y Q1 C Outpt Lamp 1 Lal Z amp Q2 Outpt Lamp 2 L5 ERs Q3 C Outpt Lamp 3 Ce t push4key ne rp show3led ne User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 21 3 3 2 Using io_state to test the operation state of real I O boards The 1o_state function can be used to test the operation stste of real I O board in slot O through slot 7 The failure states are as below 1 Wrong I O board plugged in the slot It can not detect I 81 121W 8 1 141W 81421W 81441W and 8212W I 8213W I 8072 I 8073 I O boards 2 I O board is absent 3 I O board is damaged which cause the ID byte can not be read by the controller Note Please DO NOT plug the I 8xxx and I 8xxxW parallel I O boards on slot 0 7 when controller power is ON This action may make the IO board and backplane damaged Only the I 87xxxW high profile I O boards can support Hot Swap function on the iP 8xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 WP 8xx7 VP 25W7 VP 23W7 and VP 2117 controllers io_state can only detect the real I O boards in slot O through 7 If th
249. ackage_1_32 Ho 32 No l 1 enable Value of Package 1 32 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 5 The parameter package_xxx_xxx at fbus_m ana_pack indicates the integer package number which will be written to and read from on the Fbus network The fbus_m ana_pack is used to read and write 32 bit integer values across the Fbus network Each of the parameter values is expressed as 32 bit integer values in hexadecimal and the same configuration rules apply as those for the Boolean package ow SaGRAF TEST 1 0 connection File Edit Tools Options Help boo_pack B ana_pack 10 g5 p amp 5 a Ff St a sos package 97 128 0 sous package 129 160 0 soos package 161 192 0 ius package_193_224 0 w package 225 256 0 Only Package No 1 to 128 is available No 32 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 Mol Value of Package 1 32 ICP DAS 1 enable 7 6 7 3 Programming Fbus Packages Before you can exchange any data across a Fbus network you must make sure that each controller is configured as either a Fbus master fbus_m or Fbus slave fbus_s and remember only ONE controller can be the master Refer to Section 7 2 The WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 VP 25W7 23W7 doesn t support Fbus it only support Ebus please refer to Section 7 5 The following Fbus function blocks can be used in a LD
250. address 16 201 of that Modbus device the value of A2 will be written to the value of Modbus address 16 202 and A3 will be written to the value of Modbus address 16 203 The value of Stat1 is connected to the output coil and if the operation is successful Stat1 will be true otherwise the value of Stat1 will be false MBUS N W stat I uo 4001 16 201 4 atei SLAVE_ 1000 is the COM Port No SLAVE_ 1000 is the Net ID of device Al Here 4001 means using COM4 device ID 1 At AJ 0 If the ACTION input keeps at the status of TRUE it will continue to write these A1 through A3 many times to that Modbus device until it is reset to FALSE If you just want to write one time you can write a LD program similar as the following The act1 is declared as an internal Boolean variable If setting actl to TRUE it writes only once MBUS Nv stati Q act More information about Modbus Master is at www icpdas com FAQ Software ISaGRAF FAQ 144 113 101 096 075 047 027 028 045 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 8 9 8 3 Linking The M 7000 I O Modules ICP DAS M 7000 series I O modules support Modbus RS 485 RTU protocol The ISaGRAF PAC can be configured as Modbus RTU Master to connect them For more information and demo program please refer to Chapter 21 and http www icpdas com products Remote_IO m 7000 m 7000_list htm or http www icpdas com faq
251. agraf htm click FAQ icon or visit http www icpdas com faq isagraf htm User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 Performance Comparison Table 1 of ISaGRAF PACs Compared with I 8417 N l seri ISaGRAF Memory a aa aE code size for runnin LACS oo Speed point et limitation wren calculation bytes bytes f scan time scan time About About 2 ports About 10 50 times 10 50 times 10 100 2 MB 200 400 3 15 ms 3 15 ms Mbps MB LX 800 XP 8xx7 CE6 500 MHz PXA270 About About WP 8xx7 520MHz 10 30 times 10 30 times wan or compatible 3 15 ms 3 15 ms VP 25W7 PXA270 About About Abou VP 23W7 520 MHz 10 30 times 10 30 times 20 40 MB i or compatible 3 15 ms 3 15 ms 80186 8580 About About Aboni VP 2117 MHz 4 times 0 8 times 768 KB or compatible 2 25 ms 10 125 ms iP 8447 About imi 80186 80 About About ae iP 8417 MHz 4 times 0 8 times iP 8817 or compatible 2 25 ms 10 125 ms I 8437 80 I 8837 80 About 1 8417 MHz 1 times 0 2 times r 8817 or compatible 5 100 ms 25 500 ms About 768 KB About 640 KB uPA C 5xx7 80186 80 About About MHz 4 times 0 8 times uPAC 7186EG or compatible 2 5 ms 10 125 ms 80188 40 About About About 512 KB MHz 1 times 0 2 times or compatible 5 100 ms 25 500 ms Note W 8xx7 I 8x37 has phased out Please select compatible WP 8x47 iP 8x47 I 7188XG User s Manual Of ISaGRAF PAC Se
252. ail server 2 connected Sending HELO 8 Sending MAIL FROM to Mail server 2 9 Sending RCPT TO to Mail server 2 10 Sending DATA to Mail server 2 11 100 the current progress of sending email data For ex 25 means 25 100 25 36 means 36 100 36 95 means 95 100 95 100 means 100 100 100 sent completely User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 12 9 Chapter 13 Remotely Download Via Modem_Link 13 1 Introduction COM64 of the I 8417 8817 8437 8837 amp COM2 of the W 8xx7 supports full modem signals It has embedded the Modem_Link protocol for remotely download and monitoring since the I 8xx7 driver version of 2 14 amp W 8xx7 driver version of 3 10 Please refer to Appendix C to make sure your controller driver version is the same or higher You can obtain the new released driver from http www icpdas com products PAC 8000 sagraf link htm To Remotely download and monitor program via the Modem_Link I 8xx7 s COM4 amp W 8xx7 s COM2Z2 has to link to a modem They have exactly the same pin assignments as the Com 9 pin Dsub of the PC I 8xx7 s COM4 or ISaGRAF Phone Line Or VB6 program Phone Line We name the controller as Modem Station since it will pick up the phone call coming from the remote PC running ISaGRAF If the controller is either I 8437 or I 8837 Ethernet controller The configuration can be extened to link many controllers to
253. al input or 16 Ch Single end input If using in the iP 8xx7 controller the I 8017HW s max Sample rate is about 125Hz 8 Ch or 62 Hz 16 Ch If using in WP 8xx7 VP 25W7 XP 8xx7 Atom CE6 XP 8xx7 CE6 controllers the I 8017HW s max Sample rate is about 200Hz 8 Ch or 100 Hz 16 Ch However the sample rate depends on the PLC scan time the bigger PLC scan time the smaller sample rate will be For ex if the PLC scan time is 50 ms that will make the max I 8017HW sample rate only about 1000 50 20 Hz Please refer to http www icpdas com products PAC 1 8000 8000_IO modules htm gt I 8017HW Range settin Minimum Physical analog val Maximum i Physical analog val 5 Physical analog val 2 5 V 32768 OV 0 2 5 V 432767 eee ee an external resistor of 125 ohms cma Ae 00 OmA 0 20 mA 32767 1 25 V 32768 OV 0 1 25 V 432767 PG 10V 32768 OV 0 10V 432767 POS 32768 OV 0 5 V 432767 Parameters Noise_Filter_Max The maximum allowed analog input value 32468 to 32767 If the analog input value is larger than this value it will be modified to become this value Noise_Filter_Min The minimum allowed analog input value 32768 to 32467 If the analog input value is smaller than this value it will be modified to become this value Sample_Number wa saGRAF CREATION I O connection The sampling number to be File Edit Tools Options Help averaged as an Analog input v
254. all calculate total record number record_cntl 0 3 reset current record count as 0 STEPI1 1 set step as l recording Msg Recording now Please wait start ticking T1 from 0 second T1 T Os T1_Interval TMR ntervall1 T1_next T1 T1_Interval TStart T1 ticking now save_cntl 0 end_if end_if end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 75 in reconrding state if STEP1 1 then store one record if T1 gt T1_next then Re calculate next T1 T1_next T1_next T1_Interval T1 will be overflow after T 23h59m59s999ms so reset it at T 20h if T1 gt T 20h then T1 T Os T1_next T1 T1_Interval end_if record data for ii 0 to NUM CH I1 do Volt1 ii Real i8017H ii 0 000305176 convert to voltage using Real_int to map REAL value to become integer value amp then store it by ARwrite TMP v ARwrite 1 NUM_CH record_cnt1 ti Real_int Volt1 ti check if ARwrite correct if TMP v lt gt 1 then Msg1 Can not operate ARwrite STEP1 0 0 no action TStop T1 stop T1 T1 T Os end_if end_for Check 1f record number reach the end record_cntl1 record_cntl 1 5 current record count plus 1 if record_cntl gt total_record1 then record is finished prepare to save records to a RAM disk file
255. alue BBM m trl amp Default is 1 It can be modified to vm ref 801716 become 1 to 500 Setting as 1 mai CH1_rang 8 using the max sampling speed ma CH2_rang 8 However setting as 500 means ma CH3_rang 8 every 500 samples to be averaged mma CH4_rang 8 as one analog input value mma CH5_rang 8 as GCH6_rang 6 sas GH _rang 6 amas GHE_ rang am CHI 10_rang 6 ama GH11_12_rang 8 ams GH13_14_rang 8 mwa GH15_16_rang m Noise_Filter_Max 32766 oe Noise Filler_Min 32 76 wa Sample_Number 1 Smk E g m The higher this value the lower the sample rate is And the I 8017HW s input waveform will become smoother _ _ _ 2 mp User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 14 3 2 5 Using the I 8084W The iP 8xx7 WP 8xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 and VP 25W7 23W7 support the I 8084W board The I 8084W can be used as 8 Ch Up Counter or 4 Ch Dir Pulse Counter or 4 Ch Up Down Counter or 4 Ch A B phase Counter Quard mode and it can also be used as 8 Ch Frequency input Please refer to http www icpdas com products PAC 1 8000 8000_IO modules htm gt I 8084W wu SaGRAF CREATION VO connection File Edit Tools Options Help a PSeam EL FAISE o L tml ref 808041 an i_B084w mal CH1_MODE 3 B CNT4 oe suns CH2_MODE 3 me FREQ8 ey sos GHI_MODE 3 fbus
256. ample I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 M_cspmv Change speed move This command will accelerate decelerate the selected axis s motor to the move _ speed This command can be continuously send to I 8091 to dynamicly change speed The rotating motor can be stop by the command M_stpx M_stpy M_stpall or M_slwstp Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 dir_ integer direction 0 CW 1 CCW axis_ integer 1 X axis 2 Y axis move_speed_ integer 0 lt move_speed_ lt 2040 Return Q_ boolean always return TRUE move speed Acc_Dec 2 Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 23 M_slwdn Slow down to low speed m_slwdn To decelerate to slow speed until M_stpx or M_stpy or M_stpall is executed ea ARIS Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 AXIS _ integer 1 X axis 2 Y axis Return Q_ boolean always return TRUE SLOW_DOWN Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 M_slwstp Slow down to stop m_slwstp To decelerate to stop le ARIS Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 AXIS _ integer 1 X axis
257. and is comment Variables Used In The Example ST Project Indicate pushbutton K2 is just pushed TEMP Boolean Internal A boolean variable for temporary use COUNT Integer Internal JA integer value generated by push K1 amp K2 initial value is set at 0 Three programs are used in this example One is LD program named LD1 The other two are ST programs named respectively as STIL amp end_init InatRAF ST EXAM Programs File Make Project Toole Debug Options Help amp Mie mk 2 ee End end int Structured Text LD program LD1 Outline User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 35 ST program ST1 Outline Open Com3 with 9600 baud rate 8 char size no parity stop bit at first scan cycle if INIT TRUE then TEMP comopen 3 9600 8 0 1 end_if Do something when K1 or K2 is pushed if M1 TRUE or M2 TRUE then COUNT plus 1 when K1 is pushed If M1 TRUE then COUNT COUNT 1 end_if COUNT plus 10 when K2 is pushed if M2 TRUE then COUNT COUNT 10 end_if save COUNT value to the 5th Pos of No 2 integer arry TEMP ARY_N_W 2 5 COUNT write one byte 2 hex to Com3 TEMP COMWRITE 3 16 2 write 1 integer 1 long integer contains 4 bytes of Pos 5 inside No 2 array to Com3 TEMP COMAY_NW 3 2 1 5 write one byte 3 hex to Com3 TEMP COMWRITE
258. annels when measure the current on any channel For voltage measuring can set as 10 or 20 input channels It doesn t need to plug an external resistor of 125 ohms to measure current input just switch the Jumper on the board Please refer to http www icpdas com products PAC 8000 8000_IO_modules htm gt I 87017ZW When using ISaGRAF to measure it the sample rate is about 10 10 1 Hz if it set as 10 input channels It means to sample all 10 channels once per second if it set as 20 input channels the sample rate is about 10 20 0 5 Hz If your application needs faster sample rate please use the I 8017HW The analog input value of I 87017ZW is an integer between 32768 to 32767 as below table Voltage cee Type D me Value 2 s Complement HEX 7FFF Ss Decimal Value 32768 2 s Complement HEX S En HEX o F 8000 Value ae 32768 Ee S ees HEX o TFFF 8000 a Value A 32168 ae S 2 s Complement HEX HEX o F 8000 c P Decimal Value 432767 32768 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 11 Current Range Code Hem Max Minimum Hex a Analog Input value Decimal 32767 o oO Analog Input value Hex 7FFF oT Analog Input value Decimal 32767 32768 Analog Input value Hex 7FFF 8000 7 1A Analog Input value Decimal 32767 o Analog Input value Hex 7FFF o If using I 87017ZW and set it as
259. any SCADA software some are impossible and some are not easy need to create two sets of data tag to do that WP 8147 8447 8847 Redundant System PC HMI i E PC HMI Ethernet E NS 205 208 l 37K8 base 37xxXW cards User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 20 5 Chapter 21 Connecting M 7000 Series I O Modules ISaGRAF controllers support M 7000 remote RS 485 I O since below driver version I 7188EG 7188EGD 2 17 or later version I 7188XG 7188XGD 2 15 or later version UPAC 7186EG uPAC 5xx7 1P 8xx7 VP 2117 Since its released version WP 8xx7 WP 5xx7 VP 25W7 23W7 XP 8xx7 CE6 XP 8xx7 Atom CE6 Please visit http www icpdas com products PAC A 8000 isagraf link htm to download them amp follows steps listed in ReadMe txt or Update w8xx7 pdf to update them to your controller if your controller s driver is older The M 7000 series modules are RS 485 remote I O modules which support Modbus RTU slave protocol Please visit http www icpdas com products Remote_IO m 7000 m 7000_list htm for more information User can write ISaGRAF program to support Modbus RTU Master protocol to connect to M 7000 I Os Please refer to Chapter 8 of the ISaGRAF user s Manual The Ethernet port of WP 8xx7 WP 5xx7 VP 2xW7 XP 8xx7 Atom CE6 and XP 8xx7 CE6 suppport Modbus TCP Master please refer to http www icpdas com fag isagraf htm gt FAQ 113 If the Modbus device can t be conn
260. as below Recommand to save it anytime for safety Given a name to this screen 1 Ey fal Button 1 Button Buttons Sav e listas CS SP we pearance aenean o nnna aenean inns meester roan oe asenaan o o ee User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 7 We need one another Boolean icon to display the status of L1 Create it with a different color TRUE YEL_ON2 1co FALSE YEL_OFF2 ico E lsaGRAF DEMO 34 untitled Spotlight File Edit Insert Options Help 8 O bea 2 ise pila xB devils oo Button 1 Button Buttons O L4 And then create L2 amp L3 with TRUE CMD_ON2 ico and FLASE CMD_OFF2 ico as below Save it anytime L2 amp L3 should not un check Command variable BlhaGRAF DEMO 34 untitled spotlight Fie Edit Insert Options Help B C a whe pi l a xDddauN m a go Ttem style a E E x Buttons Button4 ane 6 E 3 See a ral Color L Wrection J To the top False cM D OFFAICO True JEMD_ON2 ICO d Caption Name Font Align Top Color R Back none Command variable Keep it checked for L2 amp L3 he User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 8 E Add Unipolar bargraph Click on Unipolar bargraph set the associated Name as VAL_OUT Scale as 5000 Color as blue Back as gray Direction as To the righ
261. ate a pulse output every second to the internal boolean variable M3 Plus integer variable pulse No by 1 every time when M3 pulse is generated Display the value of pulse No to the 7 Seg leds of the I 8xx7 or I 7188EG XG controller ST Program end_ init Set boolean variable INIT to FALSE at the end of the PLC scan cycle So that INIT will be TRUE only at the first scan cycle Description of block and some basic LD item TOF To turn off a boolean however delay a time of PT IN is a boolean parameter 1f falling from TRUE to FALSE The timer ticks from 0 to PT PT is a timer parameter it defines the delay time of output Q is the boolean output of this block It will be turned OFF when PT is reached ET is the timer output of this block We don t use it in this example IN TOF IN q Q FT pe ee ee ey aes ee Pe ET 0 BLINK To blink a boolean with a period of CYCLE RUN is a boolean parameter if it is TRUE the boolean output Q will be blinking at period of the timer parameter CYCLE BLINK RUN UN G VALIOLED Display an interger value to the 7 Seg leds of the controller Only for I 8xx7 I 7188EGD amp I 7188XGD RUN is a boolean parameter TRUE to display FSH is a boolean parameter TRUE to blink the display CLK is a timer parameter It defines the blinking period VA I isthe intege
262. available on the Bus7000b Remote virtual board This analog input channel will return a value equal to the currently set baud rate If the value is 0 means that it fails to open the communication port User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 7 6 3 Programming an I 7000 amp I 87xxx Module 6 3 1 Program I 7xxx or I 87xxx remote IO function blocks To link any I 7000 and I 87xxx module to the ISaGRAF controller system the Bus7000b module MUST be opened first Once the Bus7000b is opened the I 7xxx I 87xx function block can now be programmed and you can access all of the I O channels available from that function block and that data can now be used in a LD program NOTE Please declare all variables which connect to the I 7xxx I 87xxx block as Internal attribution Example 1 Programming an I 7050D Module L 7O50D COM i Q Address of I 76050D Connect well will return TRUE D O channels of I 7050D Can declared l i 7 D channels of I 7050D Can be declared as Internal attribute as Internal attribute Connect well will Address of return TRUE I 7041D 14 D I channels of I 7041D Can be declared as Internal attribute User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 8 Example 3 Programming a I 87017R or I 7017RC function block Used when the hardware is I 87017RCW or I 7017RC I 87017RCW and I 7017RC can measu
263. b_w function writes one Boolean package on the Fbus network In the example below the Fbus_b_w function has a Boolean package ID address of 255 the C1 input writes a value to the first Boolean of the package No of 255 the C2 input writes a value of the second Boolean of the package No of 255 and the C3 input writes a value of the third Boolean of the package No of 255 The other inputs follow the same format to where the C8 input writes a value of the eighth Boolean of the package No of 255 FAWS BY n z Please do not add any PACK_NG_ condition on the left of the Fbus_xxx block Fbus_b_w always returns TRUE Package No should be aconstant value not a variable value Fbus Function 3 Fbus_n r The Fbus_n_r function reads one integer package from the Fbus network In the example below the Fbus_n_r function has an Integer package ID address of 5 The D1 output contains the value of the first integer of the package No of 5 the D2 output contains the value of the second integer of the package No of 5 and the D3 output contains the value of the third integer of the package No of 5 The other outputs follow the same format to where the D6 output contains the value of the sixth integer of the package No of 5 FBUS_M_R en _____ Please do not add any condition on the left of the Fbus_ xxx block PACK MO Package No should be aconstant value not a variable value User s Manual O
264. be used in one WP 8xx7 WP 5xx7 X P 8xx7 CE6 XP 8xx7 Atom CE6 and VP 25W7 It means that the amount of Mbus_XR plus Mbus_XR1 can t exceed 128 Modbus Example Function 1 Mbus_b_r The following example the Mbus_b_r function block is reading 8 bits from a slave Modbus device with a NET ID address of 1 with the Modbus address starting from 1 and using controller s COMS3 port In this example the results of B1 contains the value of the Modbus address 1 B2 equals the value of Modbus address 2 etc B5 equals the value of the Modbus address 5 If device is connected Ok ststl will be TRUE MBUS BR Stat er E Hi Hi Hs _ SLAVE_ 1000 is the COM Port No SLAVE_ 1000 is the Net ID of device H4_ AS B6 Ay Here 3001 means using COM3 device ID 1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 8 5 Modbus Example Function 2 Mbus_b_w The following example of the Mbus_b_w function block is writing one 1 bit to a slave Modbus device with a NET ID address of 1 The Mbus_b_w function will only write this one bit when the ACTION_ line is true In the example below the resulting value of B1 is written to the Modbus address 16 1001 or 4097 of that Modbus device when the ACTION_ line is true The value of Statl is connected to the output coil and if the operation is successful Stat1 will be true otherwise the value of Stat1 will be false MBWS BV sta
265. ble Program Example Create a new project for an ISaGRAF ST program and then create a link to the I O boards that are specified in the window below Declare three input variables called D1 D2 amp D3 for the I 8051 board located at slot 0 and then create three output variables called OUT1 OUT2 amp OUT3 for an I 8056 board located at slot 1 This time set each of their respective attributes to internal instead of input or output this means they are not connected to any real physical I O a ISaGRAF ST_INTER 1 0 connection File Edit Tools Options Help ee ele ele ale TT 8051 a Create a new ST program i ISaGRAF ST_INTER Programs ee wilt x File Make Project Tools Debug Options Help O BOM OO Xr mH RO ST Example Using Internal Variables LT x Gey Name Beg Comment ST Example Using Internal Variables Language ST Structured Text Style Begin Main program Cancel Double click on the ST_Inter that is highlighted and the ISaGRAF ST Program window will open Type in the program code displayed in the window below EXACTLY as shown Remember each line MUST end with a semi colon 3 ISaGRAF ST_INTER ST_INTER ST program File Edit Tools Options Help Da xoa mg xod klg lt Read input channels to internal variables gt O x Di 186 1 D2 1kG 2 D3 1RG 3 Write internal variables to output channels QKR1 1 OUT1
266. can assign an intial value of 100 to 109 to CNT O to CNT 9 INIT is declared as an internal Boolean with initial value of TRUE CNT is declared as an integer array with Dim 10 111s declared as an internal integer IF INIT THEN INIT FALSE only do it once at 1 PLC scan cycle For ii 0 to 9 do CNT ii 100 115 End_For END_IF Note Please do not exceed the Dim number of variable array For example please do not program at CNT 10 or CNT 11 in the above example since the CNT s dimension is only 10 CNTI 0 CNT 1 CNT 9 There is no CNT 10 CNT 11 How to debug variable array After you compile your ISaGRAF project you may download the project to the controller or simulate it Please open the Tools Spy lists on the Debugger windows please refer to section 9 12 for more information about Spy lists Insert the name you want to debug D SaGRAF TESTI Debugger File Control iii Options Help gt mL DP epotLight y SaGRAF TEST1 untitled List of variables File Edit Options Help E CESES Mame Value send of list CNTIO CNT SS Please key in the variable array name For example CNT 1 CNT 2 Cancel User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 66 Please remember to save the spy list to a name for example list1 and then put it into the workspace You wil
267. can be 1 to 12 depends on how many Dl counter channel in the Wl 000 to be read The Ml r000 DA counter value is fram 0 65535 contained in one word Since Mbus r amp Mbus_ r1 can only return word value as 32768 to 32767 so please use wd long to convert this word to become a long integer value Then the converted counter value willbe Oto 633535 wa_long Lo o 0 Hai long HiL H2_ HS Na_ wd long NS Lo_ NB_ bong NF Ne No Nid N11 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 10 To reset M 7000 s D I counter value to 0 please write bit value 1 TRUE to coil Modbus No 16 200 to 16 21F Reset Chl Is to write to No 16 200 Ch2 is 16 201 Ch 32 is 16 21F Ladder Program SetRS1 to True to clear Dl counter 1 ADDR 16F200 The Clear Di counter s Modbus ADDR is fram 16 200 to 16 21F depends on the total Cl channel number of the M 000 MELISS Avy I Set R52 to True to clear Ql counter 2 ADDR 164201 The Clear Dl counter s Modbus ADDR is fram 16 200 to 16 27F depends on the total Dl channel number ofthe M FO00 Ia alsway reset RS1 amp RS to False atthe end F51 I O connection ow SaGRAF WDEMO_42 140 connection Ioj x File Edit Toole Options Help allesamt FRAIS E ref 107 caus port_no 3 soe baud 9600 mn char amp man parity 0 m Stop bit 1 soe timeout 250 7 User s Manual Of ISaGRAF PAC Sep 20
268. changes to your user account Manage your credentials i Change your password Create a password reset disk as Remove your password Link online IDs Administrator Change your picture Password protected Manage your file encryption Change your account name certificates Change your account type Configure advanced user ge yP profile properties Change my environment W Manage another account vanables H Change User Account Control settings A Parental Controls User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 1 4 2 After clicking it will show up the screen as below Windows Vista Uncheck the option Use User Account Control UAC to help you protect your computer and then click on OR j g Turn User Account Control On or Off Turn on User Account Control UAC to make your computer more secure User Account Control UAC can help prevent unauthorized changes to your computer We recommend that you leave UAC turned on to help protect your computer se User Account Control UAC to help protect your computer Windows 7 Move the slider down to Never Notify and then click on OR HE PARAR ARE E E E E BE Windows HE Heh RATER SGHHEDAatRee AS Pal SS Windows 7 BBR Te meel az 3 Reboot your computer to apply the change 4 After rebooting please refer to section 1 1 Installing the ISaGRAF User s Manual Of
269. ck T Command variable Click and hold on the left button of the mouse to change to the prefered shape as below Save it anytime ISaGRAF DEMO_37 SP1 SpotLight 5 x File Edit Inert Options Help 8 DAA one beoea xB fetes ft 2 SpotLight Demo Button Button Buttons Button L1 L2 L3 O IS K VAL OUT 500 VAL OUT 300 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 12 H Add picture Please build 2 bitmap pictures by MS painter as below Then save them respectively with file names of sp2 bmp amp ms bmp to the associate project directory For this example c isawin spotligh demo_37 d MS BMF i l E FET MAHE Wa ED Eeo MAg oot a anama me Pio a e a CE See m eae Tabi Gite T CWE Sawn CP eG iE an Dy Click on Picture Select the associate bmp file name File Edit Insert Options Help 8 O Bals I menla aG sete go EISGRAF DEMO _34 SP1 Button 1 Button Buttons Button 4 L1 L L2 CLIFF COFF Insert picture tata N BRP ee WAL OIT Ep2 bmp cliswinispothghWdemo 34 a VAL OUT ARET E o Bitmaps ej User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 13 Add 2 pictures sp2 bmp and ms bmp to the prefered place then we got the below window Click on Lock to protect it No modification allowed Save it anytime ElsaGRAF DEMO 3
270. ck period valid or not we assume 1 to 10 minute is valid in this example Elsif Period1 lt 1 or Periodi gt 10 then Msg1 Wrong Period value it should be in 1 to 10 minute else parameter is correct start recording total_record1 Period1 60000 Intervall calculate total record number record_cntl 0 3 reset current record count as 0 STEP 1 set step as recording Msg1 Recording now start ticking T1 from 0 second T1 T Os T1_Interval TMR ntervall T1_next T1 T1_Interval TStart T1 ticking now Current_posl 1 reset current data position in 256 S512 as 1 To_Blink TRUE Set as TRUE to blink the display value end_if end_if end_if in reconrding state if STEPI1 1 then store one record if T1 gt T1_next then Re calculate next T1 T1_next T1_next T1_Interval User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 59 T1 will be overflow after T 23h59m59s999ms so reset it at T 20h if T1 gt T 20h then T1 T O0s T1_next T1 T1_ Interval end_if stri 5 init strl as empty string for ii 0 to NUM CH 1 do convert 18017H analog input value to Volt value Volti ii Real i8017H ii 0 000305176 10 0 32768 0 000305176 stri stri Rea_Str2 Volt1 ii 3 09 delimiter is lt TAB gt character end_for
271. ct To start a new ISaGRAF project click on the Create New Project icon and then enter in the name for the new project You can then enter additional information for your project by clicking on the Edit and then Set Comment Text menu as illustrated below 4 ISaGRAF Project Management loj x File Edit Project Tools Options Help BS QAO Me to m e demo st imer control TP TON TOF QLD demo create new project lona reset timer TSTART TSTOP ST QLD demo 03 RW system date amp tine SYSDAT_R SYSDAT_V SYSTIM_R SYSTIM demo 04 Calculate empty cycle time TP 1 QLD m demo_05 eee project x m demo_06 En deme 07 wame C Simpid J Reference Author ICP _ 10 configuration Date Of Creatio Yersion Numbe inane ba A ISaGRAF Project Management ai File Edit Project Tools Options Help Set comment text A tt qt 23 DemoPgm 3 Toggle separator AST trot TP TON TOF QLD Sort Move up in list op and reset timer TSTART TSTOP ST QLD BBE Move down in list stem date amp time SYSDAT_R SYSDAT W SYSTIM_R SYSTIM re 2 a O a a owe demo_05 o gt demo_06 Ct Tet Reference sim Author Comment CJA Simple LD Program D Date of creation 12 Version number 1 aR E Description 5 You will now see the name of the new project in the Project Management window Double click on the name of the new project to open the new project ISaGRAF
272. d the digital input channel will return a TRUE value If the Fbus connection failed to establish the digital input channel will return a FALSE value If you configure an controller as aio x Fbus master the parameter File Edit Tools Options Help baud_rate and fbus_m rate can PBEM tl FK S be set to 2400 4800 9600 19200 38400 57600 or 115200 The default value 1s 19200 for the controller All aj gt 00 ref 105 ious baud rate 19200 z controllers on the same Fbus MUST be set to the same baud rate L o z 3 m fbus_m B rate t ana_pack n xi Parameter baud_rate There is a digital input channel associated with the fbus_m rate equipment If the Fbus connection has been established the digital input channel will return TRUE value if the Fbus connection failed to establish the digital input channel would return a value of FALSE To begin configuring the Fbus Master Boolean Packages click on the boo_pack selection from the fbus_m I O connection am ISaGRAF TEST 1 0 connection FAs RS File Edit Tools Options Help S PSP tl FR Only Package No 1 to 128 is available 4 gt m ref 102 ous package 1 32 0 sus package 33 64 0 jj www package_97_128 0 wm package_129_160 0 sos package 161_192 0 sss package 193 224 0 os package 225 256 0 4 fbus_m gt rate
273. d Touch 510T do have the exact same addressing scheme as the ISaGRAF controller system The network address definition scheme for some HMI and ISaGRAF PAC are different If you are assigning a network address of B hexadecimal of these products the PAC s network address should be set to C A network address of 2 should be associated with a network address of 3 in the ISaGRAF controller system Another things mistaked very often is the first digit of the network address of many SCADA and HMI softwares resprent the data type and Read Write authority not one part of the network address The max address number for the I 8xx7 I 7188EG XG uPAC 7186EG uPAC 5xx7 and 1P 8xx7 1s 4095 The max address number for the WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 VP 25W7 and VP 23W7 is 8191 For example the network address relation between i1Fix and ISaGRAF is as below 1Fix Decimal ISaGRAF PAC Decimal 00001 R W Boolean l 00002 R W Boolean 2 10010 Read Boolean 10 1001 1 Read Boolean 11 31000 Read Word 1000 31001 Read Word 1001 40101 R W Word 101 42001 R W Word 2001 ICP DAS has not been able to test every possible SCADA or HMI software program or hardware device that has Modbus addressing capability If you are trying to connect your HMI software program or hardware device with Modbus to an ISaGRAF controller system REMEMBER that you may have to offset the Modus addressing by 1 between these products so th
274. d look like the following ISaGRAF SFC_EXAM Programs a Oj x Fie Make Project Tools Debug Options Help A S OEM sve OH apa Begin SelMode Ladder Portion Of SFC Program Sequential Main Pe Model X Sequentia Mode2 Sequential Function Chart User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 53 LD Program SelMode SFC Child Program Model OUTI OUT 2 GS1 T gt TMR1 GS2 T gt TMR1 SFC Program Action 1 When K1 is pressed run the Model program 2 When K2 is pressed run the Mode2 program User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 SFC Program Main OUTI R OUT2 R Mode 2 Mode 2 Mode lt gt 2 OUTI GS1 T gt TMRI1 OUT 2 GS2 T gt TMR1 ICP DAS 2 54 2 5 1 Programming The Example SFC Program The procedure for creating the example SFC program is the same as outlined in Section 2 1 You must remember to declare the variables K1 K2 OUTIL OUT2 TMRI and MODE The following illustrates creating the new SFC project A ISaGRAF Project Management i 10 x File Edit Project Tools Options Help DE Dam MWe t g B Demoga fbd_ y sae new project st_ ex4 Example IL Project 3 simpleld A Simple LD Program z Create new project ae xi 10 configuration Cancel none ha After creating the new SFC project the next step is to create an LD program named SelMode as illustrated
275. d then dial 22570001 The password must set to the same password of the modem station controller If you are going to connect the Modem station controller check Modem station otherwise i check Other IP Other IP means the target E bodem Station controller is not connect to a modem however C otherip 192 connect to the Modem station controller via an ethernet cable the IP address has to assign Then click on debug to start dialing the modem to connect to the faraway controller Isat RAF TEST Programs File Make Project Toole Debug Options Help S HS Oe m s Merl mk eee Begin ICP DAS Modem Link Copyright IC amp Begin fi Lan Dialing i Please wait about 20 to 80 seconds Fhone Mo 22570001 Comm Setting COMI 19200 M 5 1 Target Modem Station After the connection is Ok you can download a new program monitor the variable status just like you did when the controller is near beside you When you close the Debugger window the PC will command the modem to hang off the phone and disconnect with the faraway controller saGRAF TEST Debugger File Contol Toole Optons Help Omlm had oS AH ebus m_ active User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 13 7 Chapter 14 Spotlight Simple HMI Spotlight is a simple HMI coming with ISaGRAF which allows user to build Boolean Icon Bar Graph Trend Curve
276. derations XP 8xx7 CE6 XP 8xx7 Atom CE6 and WP 8xx7 supports redundancy solution Two controllers to be one redundancy system One is redundant Master one is redndant slave Master handles all inputs amp outputs of the remote RS 485 I O I 7k amp I 87K at run time If master is dead Slave will take over the control of the remote I O All Outputs should be configured as RS 485 remote I O Inputs can locate at slot 1 through 7 or configured as RS 485 remote I O Redundant Change Over Time lt 500 ms Synchronization lt 75ms Ethernet considerations 1 The WP 8xx7 WP 5xx7 XP 8xx7 CE6 and 1P 8447 1P 8847 s ethernet is 10 100M bps XP 8xx7 Atom CE6 is 10 100M 1G bps and dual ports All other current ISaGRAF controllers have only one Ethernet port uPAC 7186EG and uPAC 5xx7 s Ethernet are 10 100M bps I 7188EG I 8437 80 I 8837 80 are 10 Mbps All of above controllers support Modbus TCP IP slave protocol I 7188XG I 8417 8817 and 1P 8417 1P 8817 don t support Ethernet 2 XP 8xx7 CE6 XP 8xx7 Atom CE6 WP 8xx7 WP 5xx7 and VP 25W7 VP 23W7 VP 2117 UPAC 5xx7 uPAC 7186EG and 1P 8447 8847 support sending email with one attached file and sending receiving user s defined message string via UDP IP or TCP IP to PC or other devices however I 8417 8817 I 7188EG I 8437 80 8837 80 1P 8417 1P 8817 no supporting them User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 Windows CE Interface WP 8xx7 WP 5xx
277. dow saGRAF LD_ TEST Debugger Mis x l Fie Control Tools ptions Help Pod LAS Click on Debug Workspace ISaGHRAF LD_TEST Programs File Make Project Tools Debug Options Help D ws OG Det me Aes Fat simnlate Workspace Begin LOT Ladder Diagram User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 23 Move all List to the right hand side Id program l1 dist remoto program e Sat AF LD TEST Programe A Sit Oe th x al Marne Value Comment Al 2 01 0 801 7h Slot2 Chi Ch Al 2 O02 T Al 2 03 0 Al 2 O4 T Val 100000 Reali 1 23 send of list User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 24 9 13 How to search a variable name in an ISaGRAF project Please click on Cross references and then entering the name you would like to search The location will appear on the right hand side Just click on it to get into it ISaGRAF DEMO_21 Programs a lolx File Make Project Tools Debug Options Help D HSE Dam sxe OH aes Begin HA FATE Show the system is working HEE str ww write strings Cross References 4 l x Sew amar Seach obien Begin hi Ladder Dia File Edit Tools Options Help B He SaGRAPF DEMO 1 STR W Guick LD Prestam E 2 o x File Edit Tools Options Help Bae MOS wSlxad Pa QQauke g FO 4b F3 JHE Fa GH FS 40H F Hi FP iH Fe Il
278. dress number for each element For example Previous ire 1 Assign continuous Network No 1 2 3 10 to CNT O CNT 1 CNT 2 CNT 9 INIT is declared as internal Boolean with initial value at TRUE TMP is declared as internal Boolean IF INIT THEN INIT FALSE only do it at 1 PLC scan TMP S MB _ADR 1 10 0 assign 10 elements starting at No 1 continuous No END_IF 2 Assign Jumping Network No 1 3 5 19 to CNT O CNT 1 CNT 2 CNT 9 INIT is declared as internal Boolean with initial value at TRUE TMP is declared as internal Boolean IF INIT THEN INIT FALSE only do it at 1 PLC scan TMP S_ MB_ADR 1 10 1 assign 10 elements starting at No 1 jumping No END_IF User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 68 2 6 2 Setting Variable Array As Retained Variable To set varable array as retained data please assign the network address number to the first element For example No 1 assigned to CNT O And then using Retain_A function as below Please refer to chapter 10 1 for more information about the New retained function Inte zer Real Fariable x Name Network Address NA Please assign the first number for the first element sill O O please refer to section 4 1 for more information The number enter here is always in Hex format Attributes Format Internal f Integer
279. dules Note A If the I 7000 and I 87xxxW I O module s type is Analog Input please configure the format as 2 s complement Like these AI modules I 7005 I 7013 I 7015 I 7016 I 7017 I 7017R I 7018 I 7018R I 7019 I 7019R I 7033 I 87005W I 87013W I 87015W I 87015PW I 87016W I 87017W I 87017RCW I 87017ZW I 87017DW I 87018W I 87018RW I 87018ZW I 87019RW and I 87019ZW etc B If the I 7000 and I 87xxxW I O module s type is Analog Output please configure the format as Engineer Unit Like these AO modules I 7021 I 7022 I 7024 I 87022W I 87024W and I 87026W Before connecting the I 7000 and I 87K remote I O modules to the controller system it needs to set up the NET ID Must be unique ID for each I O modules and the same baud rate with the controller by using the DCON Utility DCON Utility is a useful software tool used to network search configure or test the I O modules Please visit the website to get DCON Utility software and its user manual ftp ftp icpdas com pub cd 8000cd napdos driver dcon_utility Notes 1 Make sure the hardware connection is correct 2 Search and configure the modules one by one 3 Connect the module s INIT to GND or switch the junper to INIT and Power on the module Very Important Please wire an terminal resistor around 110 to 330 ohms you can try 125 ohms first then try others at ISaGRAF controller s RS 485 port between the D andthe D pin Th
280. e CompactFlash path The read write speed for CompacFlash is much slower than RAM Disk The advantage of CompacFlash is that the files will not disappear after shutdown but the disadvantage is the read write speed is too slow The third is the fastest way the application with the minimum sampling time can reach 10 ms that means the fastest 100 Hz Please refer to Section 11 3 10 for the example illustrates But this minimum sampling time is related to program complexity If the PLC user program scan time is 100 ms the sampling time should be greater than 100 ms The source code for Web HMI is stored in Please refer to chapter 3 4 5 of WinCon ISaGRAF Getting Started W 8xx7 CD ROM napdos isagraf wincon english_manu getting_started_w8337 pdf W 8xx7 CD ROM napdos isagraf wincon WebHMI_Demo whmi_12 or ftp ftp icpdas com pub cd wincon_isagraf napdos isagrat wincon webhmi_demo User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 40 If you can t find these functions such as Msg_F Msg _N ARY_F_R AFY_F_W etc which installed in ISaGRAF on your PC Please visit to http www icpdas com products PAC 8000 sagraf htm to download the ICP DAS utilities For ISaGRAFP zip file After unzip it run the setup exe file to install these new functions into the ISaGRAF How to test this demo 1 Please plug one I 8024 in W 8xx7 s Slot 2 one I 8017H in Slot 3 Then connect Ch1 to Ch 4 voltage output of I 8
281. e PLC scan time will become a very big time It will be a bad performance If user need fast retain function please refer to Chapter 10 1 for retaining data in the S256 S512 Project Architecture 101x File Make Project Toole Debug Options Help A a S Ae m s Mil mk age Begin STI Functions read f1 Fead retained data from file save ME orite retained data to file E5 G data Get user data from F_VALI 5 data Set user data to F_VALI Functions save Fl Structured Text There are 5 ST programs in this Wpdmo_56 project Four of them are ISaGRAF user defined functions reaf_f1 save_f1 G_data and S_ data Important note 1 User may modify the constant value of SIZE1 in the ISaGRAF dictionary window to a value between 1 255 according his own application And then remember to compile it 2 Please also modify the Dim value of the F_VALI and Old_F_VALI variable array in the ISaGRAF dictionary window to become the same value as the SIZE1 And also please modify the G_ data and S_ data program 3 There is one advantage of retaining vale in the System_Disk The data file can be edited in advance in PC Then using ftp utility to download it to WP 8xx7 The file path name of this example is System_Disk data56 txt Then set RE LOAD value to TRUE once all related variable will update to the new value U
282. e all motion will be terminated and stop Set limit switch as normal close condition The limit switches EMG LS11 LS14 LS21 LS24 ORG1 ORG2 is initially normal open condition that is these signal is active when connect it to ground In industrial application it might be recommended normal close condition that is these signal is active when open from ground The M_s_ne card_NO_ sw_ command can be set sw 0 default for normal open condition When set sw 1 for normal close condition User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 8 18 3 4 Pin assignment of connector CN2 CN 2 DB25M 90 CW_PULSE1 gt CW PULSE gt CCW DIRI _ gt CCW_DIR2 gt HOLDI gt HOLD2 __ gt ND EXT VCC 12 24V ORGi1 gt ORG2 __ gt LS11 gt LS21 gt LSi4 gt S LSs24 gt EMG gt EXT_GND Fig 8 CN2 connector of I 8091 Table of CN2 connector s pin assignment pin name pin number y CW_PULSE1 CCW_DIRI1 HOLD 1 G GND JORGI 7 y y ODO HOLD2 5 ND ND User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS The internal circuit of CW_PULSE CCW_DIR HOLD When output these signal as 1 it can source 15mA max When output these signal as 0 it can sink 50mA imax CW_PULSE1 CCW_DIR1 HOLD 1 CW_PULSE2 CCW_DIR2 HOLD2 i8091 Fig 9 internal circuit of pulse output pin The internal circu
283. e 0F User may refer to the attatched manual in the product box or visit http www icpdas com products Remote_IO m 7000 m 7000_list htm to get each M 7000 Module s Manual to find their Analog Input type and data Format Table Type code setting Variables comm_okl comm_okl Communication Communication state of the related M 7019R of the related M Communication state of the related M 7019R Temper_1 to Integer Internal Temperature input value of Chl To 8 of M 7019R Temper_8 Project One Ladder program ISaGRAF WOEMO 45 Programs iol x Fie Make Project Tools Debug Opton Help ye YE a S Begin LD1 Ladder Diagram I O connection aw ldaGRAF WDEHO 45 I O connection E iol x Fie Edit Tools Options Help B PBPrn tL FERA o a j ref 107 n port no 3 mu baud 9600 sous char 6 a moa parity 0 m Stop bit 1 6 mun timeout 250 iz 9 mbus B com_port n z User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 18 Ladder program comm okt w This is special setting for temperature input module The CODE parameter of MBUS_R amp MBUS_R1 can be standard or special setting In the standard setting case Setting CODE_ as 1 or 2 each returned N1_ to N12_ contains 16 bits data or 16 Digital Input Setting CODE_ as 3 or 4 each returned N1_ to N12_ is normally from 32768 to 32767 T
284. e 3 04 M Use embedded SFC engine Upload Optimizer M Aun two optimizer passes Evaluate constant expressions Default Suppress unused labels Optimize variable copying Optimize expressions Suppress unused code Optimize arithmetic EPEn OK mel oo I 1 Ibak AF T5063 Programs File Make Project Tools Debug ptons Help D S AEDS we Mie Oe zp Begin End F Make application code Functions ee W_EEP Save an integer tothe EEPROM Begin demo Ladder Diagram Code Generator 3 x Ho eror detected Do you want to esit the Code Generator now Continue After download to the controller you may change the New_ Val and then press K1 to see what it happens User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 15 5 15 2 Creating functions in the ISaGRAF library Functions created in the library can be called by programs in any project The steps is similar to the former section 15 1 Please refer to it in advance A Get into the library Then click on Functions A ISSGEAF Project Management Ioj ES File Edit Project Tools Options Help Ey amp A I Archive ED LULLE fo ebus_s in be Import IL program mm ebus s2 mm tio m Sa AP Libraries E lB x Hef File Edit Tools Options Help Aut Dag bss g Wi configurations ID complex equipment FBsample n sample function realize
285. e WinCon Web HMI Wincon ISaGRAF Driver Setting Welg About Ti O ECUrity Settings errr re Setting user name amp password here wW Didgble FTP Serveice i Disable Telnet Serveice PrioNty Low User Name To set up advanced security click on Settings Password Priority Middle User Name Password Priority High User Name Password User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 19 1 About item 1 user may set up to 8 IP address for IsaGRAF or other HMI to get access to the controller via the Modbus TCP IP protocol as below On the IO connection window of ISaGRAF please connect vip and entering the IP which can get access to the controller via Modbus TCP IP protocol If vip is not connected any remote IP can get access to your controller via Modbus TCP IP protocol If vip is connected and No IP is entered all ol x File Edit Tools Options Help B epBem tll R am i 80 7 DI DOs 2 elect board equipment E 2 x Em 8063 Isolated 4 CH DI amp 4CH DO O0 K 870630 8 CH 1 0 amp Cnt Max 100H2 DK e 8F082c 2 Counter amp 2 read back DO OfUS2F 2 Frequency amp 2 DO Cancel i iw diob 4 CH DI amp 2 CH Relay DO 3 iw dio8 4 CH DI amp 4 CH DO H Hote EE Woke Keypad Input mbus Modbus master on COMS or COM4 MMICON Connect MMICON by Com or Ce modem ps Set Password of Com Modem L
286. e refer to Chapter 2 6 Selecting the Run Two Optimizer Passes will insure that the code is compiled into the smallest possible program code User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 15 9 10 Using The ISaGRAF Conversion Table Note The conversion table is only for Input amp Output attribution variables not for internal variables You may refer to Appendix A 4 for A4_20_to To_A4_20 to convert the analog value of 4 to 20 mA to application engineering value Or V0_10_ to To_V0_10 for converting analog value of 0 to 10 Volt to application engineering value Conversion Table Example In this Conversion Table example the value from an I 87017 an eight channel analog input module board needs to be converted The I 87017 is configured to receive a 10v to 10v signal where 10v equals a value of 32768 and a 10v signal equals a value of 32767 You may refer to Appendix D to see the translation table of each analog board In this example we will use the Conversion Table to reconfigure the I 87017 so that a 10v signal will equal a value of 10000 and a 10v signal will equal a value of 10000 In this example a value of 2 573v signal will equal a value of 2573 Note The ISaGRAF controller only supports the value before conversion within 32768 to 32767 and the value after conversion within 10000 to 10000 Setting conversion table out of these range may cau
287. e ri ea aE a e aan aes 2 69 CHAPTER 3 ESTABLISHING VO CONNEC FIONS ves teiicssveewscaucbersensstcccncstceticssidececensteticocddadeaceeeslaesscecasssetetieess 3 1 JA EINKNG VO BOARDS TO ANISAGRAF PROJECT armisarocioiion rro O A a aa 3 3 Jle nl cab aca VO Boards merere N EE EN reer rer nner 3 4 31 27 Lankine Input amp Output Board Variable Ssnan EN i 3 5 5327 LNEINGANATOG TYPE VO BOARDS colias ase r E O E A N 3 7 3 2 1 Setting range parameter and conversion functions for analog IO board nnnnneeeeeeeeeeeeeeeeseeererrerersseeee 3 7 3 2 2 Setting special range parameter of temperature input board to get clear Degree Celsius or Degree Fahrenheit Put Value rore enra E ET E TA 3 9 IAS Usne MeT S OLZA W airnn E A E 3 11 PA s mS oad evo 0 TEW siais a T A E 3 14 I STNG DeL SOSI aooiee E E T A E 3 15 IAO Usine the 1267 O15 Wand 1287 0 la PW serina A REA 3 17 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 ei NOM UNG Me OL ZW aiceeiche edeictice est A A spite aeeenteraeae ees aaa gaat aout reenter eae 3 18 Seve A Sime MEL SOA W go castnassactscnt cas euia saturate EE suarecadanievaanactageuicns 3 19 29 SIN INE THB OV SZ IW arra a suse can cohencedeutabues casaueloadiecewun celancoden EEA A 3 20 zo Linkin Some Special Vila DOA cassahez cate Asteas a sous doadds teen E Montesa dAiiasactagenats 3 21 5 0 1 Using Pushnakey and SRO wale nasadia Seti rt toh cap Salis wneneah as Satine athe Galen
288. e slot No in the ISaGRAF I O connection window is empty it is not detectable To use io_state please connect it at slot 8 or larger slot No in the I O connection window The below example will detect if slot 1 slot 2 and slot 5 working normal or failure The channel 1 8 in the 10_state will show the operation state of real I O boards on slot 0 7 It means working normal if the related channel is TRUE False means failure or can not find the related I O board The XP 8xx7 CE6 XP 8xx7 Atom CE6 and WinCon doesn t have channel 1 Slot 0 me ISaGRAF TESTI I O connection O x Fie Edit Tools Optons Help S gt SBemn tl RR i mnj ref b t L801 fh fu w w i_ 8024 nu ol ios ol ios L4 4 t i_87015f ru amp zi ol ios5 J 4 E io state m al E User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 22 3 3 3 Using echo_tim to delay some milli seconds before the Modbus RTU Slave port to replying I 8xx7 1P 8xx7 and W 8xx7 8xx6 controllers support echo_tim to delay some milli seconds before the Modbus RTU slave port to replying Each I 8xx7 and W 8xx7 8xx6 can control only one Modbus RTU slave port to delay the reply for other Modbus RTU slave port it will quickly reply when PC HMI or other devices received the Modbus Request The echo_tim can control the below Modbus RTU Slave port I 8xx7 1P 8xx7 One of COMI and COM2 and COM3 W 8xx7 8
289. e was described as following 1 The required max output pulse rate PRmax Vmax N 60 2047 PRmax DDAcycle 1 1 024ms PRmax max output pulse rate Vmax max speed rpm N the pulse number of stepping motor per revolution pulse rev 2 The required speed resolution The maximum output pulse number is Np 0 2047 therefore the speed resolution is Vmax max speed Np The DDA cycle can be obtained by following equation NP PRmax DDAcycle 1 1 024ms 3 When choose large DDA cycle DDA period it will occur vibration between different pulse input which generally can be observed during acceleration or deceleration So the small DDA cycle the smooth acceleration deceleration curve as long as the speed resolution is acceptable Example Stepping Motor The spec of stepping motor is 500 pulse rev max speed 500 rpm speed resolution 2 rpm The required max pulse rate PRmax 500 rpm 500 60 4166 67 pps The maximum output pulse Np 500rpm 2rpm 250 pulse number User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 4 The DDA cycle can be calculated by follow equation es PRmax DDAcycle 1 1 024ms 250 4166 67 DDAcycle 1 1 024ms DDA cycle 58 High Speed 247 pulse 4166 67 58 0 001024 The above results means that maximum speed is 500rpm when send command 18091_SET_VAR 0 58 2 2 247 to I 8091 card Example Pulse type input Servo Motor The spec of servo motor is 8000 pulse
290. ease give below Modbus command to below M 7000 modules s Digital input channels to invert them 01 46 29 Ol 4 byte command each byte is 2 Hex number The first byte is the M 7000 Address number been set by DCON utility it may be 01 02 03 OF to F7 depends on your setting of the related M 7000 The other 3 bytes 46 29 01 should be always same M 7000 Modules should be inverted M 7041 M 7044 M 7050 M 7053 M 7060 M 7063 M 7065 M 7041D M 7044D M 7050D M 7053D M 7060D M 7063D M 7065D Please Do Not give the upper command to other M 7000 modules which are not in the above lists Steps to invert the digital input channels After Step 4 is finished power on M 7041 or M 7044 or M 7050 or M 7053 or M 7060 or M 7063 or M 7065 again Run DCON utility to search the module first If the module is found Stop search Make sure the Module name is one of M 7041 or M 7044 or M 7050 or M 7053 or M 7060 or M 7063 or M 7065 Then goto Terminal Single Line F DCON Utility Ver 4 4 2 Ioj xj File COM Port Search Run Terminal Help The 140 Modules Found _ pingle Line E UIC 2m CET OES ETE es ea fuss A NIN UA 8600 Disable ia aaa gt searching status COM Port EOM J Address o2fdecl Mihe Baud Aate 3600 TF 0239 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 4 Select the correct baudrate Protocol should be set to MRTU Then type
291. ected well please refer to FAQ 075 for troubleshooting or set the specific Delay_Time The example program for connecting the M 7000 I O modules are stored in the WP 8xx7 CD ROM napdos isagraf wp 8xx7 demo These programs all use COM3 port to connect to M 7000 I O You may change the port no setting of the mbus to fit your controller COMS3 connecting 1 M 7053D 16 Ch D D 2 M 7045D 16 Ch D O Wdemo_42 COMS3 connecting 1 M 7053D to get D I counter value 16 bit 0 65535 Wdemo_43 COMS3 connecting 1 M 7017R 8 Ch A I 2 M 7024 4 Ch A O Wdemo_44 COMS3 connecting 1 M 7017RC 8 Ch Current Analog Input COMS3 connecting 1 M 7019R 8 Ch Universal A I thermocouple or voltage input or current input to get temperature value Wdemo_46 COMS3 connecting 1 M 7080 2 Ch counter or frequency User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 1 21 1 Using DCON utility to do initial setting for M 7000 Before we starting at programming Modbus Master port please run DCON utility to well configure M 7000 s Slave No or called Address Baudrate for every D I O amp A I O module and channel range or type setting for Analog input amp output module The Procotol setting should be Modbus You may install Dcon Utility from the 1 8000 CD ROM or visit http www icpdas com download 7000 7000 htm to download and then install it Steps to configure each M 70
292. ective Getting Started Manual delivered with the product User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 14 9 9 Optimizing The ISaGRAF Code Compiler The ISaGRAF Workbench program allows you to modify the settings for the Compiler Options to optimize the ISaGRAF program when you compile your project To access the Compiler Options open the ISaGRAF Programs window and select Make on the menu bar and then click on Compiler Options The Compiler Options window will open and now you can select which optimization parameters you want for when you compile your ISaGRAF program ISaGRAF SIMPLELD Programs Ioj xj File Make Project Tools Debug Options Help Make application ic OD 2a Begir verify D Program Touch Application run time Options Begir Resources Compiler options x Targets gt SIMULATE Workbench Simulator Select Unselect Upload I Default TIC code for Intel vY Run two optimizer passes Evaluate constant expressions l Suppress unused labels Optimize variable copying l Optimize expressions Suppress unused code Optimize arithmetic operations Cancel If using Variable Array in the program please DO NOT check the 2nd 7th 8th and 9 th Optimizer options or the value of the Variable array will be incorrect Recommend to check only the Ist Run two optimizer passes option Pleas
293. ed x Workbench Archive Backup Restore Close Help Compress Archive location C ADOCUME 1 SCOTTADESKTOPM 8XX771 Browse User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 2 11 2 IsSaGRAF Demo Example Files The example program for VB uPAC 7186EG uPAC 5xx7 1P 8xx7 WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 and XP 8xx7 CE6 are listed in this section For other PAC please refer to their respective Getting Started Manual http www icpdas com products PAC 1 8000 isagraf_demo_list htm VBNET www icpdas com gt product gt solutions gt software gt Development Tools gt IsaGRAF gt Demo Files Visual Basic example program I 8000 CD ROM napdos isagraf vb_demo ftp ftp 1cpdas com pub cd 8000cd napdos isagraf vb_ demo D l g PC Read Write data in the I 8437 8837 by Modbus TCP IP a Demoa 1 84x7 88x7 PC use Modem phone line to link to remote I 8437 8837 I 87064 please refer Chapter 13 Modem Phone line Demo_3 PC run VB net 2005 or VB 6 0 program to Read Write data in the contoller I 8x37 80 I 7188EG uPAC 7186EG UPAC 5xx7 VP 2117 1P 8xx7 WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 or VP 25W7 VP 23W7 by Modbus TCP IP protocol Please refer to http www icpdas com faq isagraf htm 051 amp 052 Demo_4 PC run VB 6 0 program to Read Write data in I 8x37 80 I 7188EG uPAC 7186EG wPAC 5xx7 VP 2117 1P 8xx7 WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8x
294. ed interval or sampled in every PLC scan 100 IQ How to use I 8084W 4 8 Ch Counter or 8 Ch frequency Q How to read max 120 Words or max 60 Long Integers or max 60 Real value from 101 Modbus RTU ASCII devices by using MBUS_XR or MBUS_XRI1 function block for WP 8xx7 8xx6 and VP 25W7 23W7 25W6 23W6 and WinCon 8xx7 8xx6 only Q Why PC can not connect the WP 8xx7 or VP 25W7 23W7 s FTP server Q Using RS 232 Or USB Touch Monitor With WinPAC Q Why my PC running ISaGRAF can not connect the ISaGRAF PAC correctly Q Program The 8 Channel PWM Output Board I 8088W In WP 8xx7 VP 25W7 23W7 QO OO 091 097 102 103 104 105 And 1P 8xx7 PAC User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 81 English ISaGRAF Ver 3 FAQ Q How to display the frequency trend curve by running ISaGRAF and C net 2008 ne program in the WinPAC 8xx7 plus I 8084W 107 Q How to do auto time synchronization and measure the local Longitude and Latitude by using the I 87211W GPS I O module in ISaGRAF PAC 108 Q How to display the temperature trend curve by running ISaGRAF and C net 2008 program in the WinPAC 8xx7 plus I 87018z 109 Q How to adjust the system time of some ISaGRAF PACs via Ebus by using ISaGRAF PAC and I 87211w ill Q How to use the GIM 201 RS 232 to send a short message in user s local language 112 Q Program the I 8093W 3 axis high speed Encoder inp
295. eesseeececsssaeesseecseeeuneeees 4 8 AA LINKING ISAGRAP PAC STO TOUCH 500 nalainn Ea E sananceaAusacas calance gece vas sananceaduseeatcepancedeass 4 13 Aube Prooram he PAGAN EOP AG oria e sauadidasiticas const estas Vuastinaddes timebs N OAA 4 14 AA 2s Prora tie TOUS OO a a neticdetasscenasavadecncti E a T facie airnatsatereaaes 4 15 4 5 ACCESS TO WORD amp INTEGER ARRAY VIA MODBUG cccccccccccccccssueesessssseseeeeccccceeeessaaaaeessseeeeeeceeeeeeeeseaaaeaggesenss 4 35 CHAPTER 5 MODBUS PROTO COD cred E A 5 1 5 12 MODBUS PROTOCOL FORMA T RI USERN onicas a a a a a A 5 1 3227 MODBUS PROTOCOLFORMA T TE P P vc sasssomsevioasianseanscessaatieanssantareviadsacastanadesaae esaaaantacewaaaaneastanadeaaeatiecmaaenavina 5 6 3I ALGORMTIM FORCRC I6 CHECK yerina anao aa AE EAA o a E E EEA Ea EE E EEEE 5 7 CHAPTER 6 LINKING I 7000 amp I 87K REMOTE I O MODULES ssssssssseccccecccccossssssssecceceosososssssssssscecesesssso 6 1 6 1 CONFIGURING FHE 1 7000 8 amp 1 87 XXX MODULES isie a nla a a 6 1 6 2 OPENING THE BUS 7000R FUNCTION crane na a a a ses a a a a qeiaene ah emeaananuss 6 6 6 3 PROGRAMMING AN I 7000 amp 1 87 XXX MODULE ss sevivesianesessasiaviveinues ieialuavinasavehsasaadaviseiauesiaiatiavizesaueiiaraaderiacsaneniasacuesss 6 8 6 3 1 Program l 7xxx or 1 87 xxx remote IO function blocks iiecens idcdscricosaesisssedbeannenonel ia lcaseuseasayebierneacensertarntbeleasaass 6 8 6 3 2 Setting a special ADR parameter of remo
296. egi iSaGRAF EXAM Programs File Make Project Tool Debug Options Help CM E call Dg mf amp Mie Ow ApS Begin Make application code Eric end init Begin STi Structured Text User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 41 After compiling the example ST project click on the Simulate icon to observe the ST program running ISaGRAF 8T_EXAM Programs File Make Project Tool Debug Options Help D HSM Cam eM mk agg You may open the dictionary window to see the COUNT value Click on K1 or K2 you will see the COUNT value is changed D saGRAF ST EXAM Debugeer File Contool Toole Options Help hold Oo AT seGRAF ST EXAM Debug programs File Tools File Project Tools Options Help Options Help Begin mA LD End end init Renin S71 PStriictired Teti saltRAF ST BELAM Global integers reals File Edit Tools Options Help Booleans Integers Reals Timers Messages FB instances Defined words Attrib Addr Value internal Integer 0000 Eas COUNT M2U000 internal integer You can now download this example project to the I 8xx7 controller system Please follow the same procedure as outlined in Section 2 1 5 After downloading to the controller the program will send 6 bytes via Com3 of the controller whenever K1 or K2 is pushed If you have your RS 232 monitoring program runnin
297. el x Compile On line Simulation Off line mulation Download Projectname GAEBs00 Project testl epj Compile file name EB300 Projectitest eob User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 33 To download the project to the Touch 510 click on the Windows Start button then click on the Program button then click on the EasyBuilder EasyManager button The following window will be displayed Choose the correct COM No on your PC Normally is COM1 115200 bps Connect the RS 232 download cable refer to section 4 4 between PC and Touch 510 Touch 510T SO6L 506TE Click on Jump To RDS first if OK you can see the screen of the Touch 510 will change and wait for project download Click on Download to start to download the MMI picture to the Touch 510 Easyllanager COM 115200 bps Project Download Upload Complete Download Uploac EasyBuilder simulator DownLoad UpLoad Jump To RDS Jump To Application Jump To Touch Adjust Exit If downloading is OK You may click on Jump To Application or reset the Touch 510T and then connect another RS 232 cable between Touch 510 and the I 8xx7 refer to section 4 4 Now you may touch each icon on the Touch 510 to test Have a good luck Touch 506L S506TE S1OT User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 34 4 5 Access To Word amp Inte
298. elect gt Greater Than For more information regarding any of the function blocks available in the ISaGRAF program just click on Info button ISaGRAF FBD_EXAM MAIN FBD LD Program oj x File Edit Tools Options Help Dal Xaa ws xO d QQE Ee WRGaPSVSR Fae Ge weno sl x Se i TE R ai A Inputs gt greater or equal Cancel p pos gt boolean OR 1 1 gain abs absolute value Info acos arc cosine Select function block Using the same procedure as described above add a lt Less Than function block below the Greater Than function block User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 45 fit ISaGRAF FBD_EXAM MAIN FBD LD Program Fae ES File Edit Tools Options Help Da MOS ge Bd QQ WI RERAPYS At Ble lesson o o y oo nsert variable Click on the Insert Variable icon as shown above and then click on Integer Real from the ISaGRAF Select Variable window This will cause the variable A1 to appear in the ISaGRAF Select Variable to appear Double click on the highlighted A1 Simulate Temperature Input which will then place the variable A1 inside of the SaGRAF FBD LD Program window Select variable O xj _ Simulate Temperature Input eA Simulate Temperature Input C function block Repeat the same process to add a second A1 OUTI and OUT2 variables Lastly add two constant variables 5000 and 2000 and place th
299. elow E 1SaGRAF SFC_EXAM MAIN SFC program 5 x File Edit Tools Options Help BG VOs m xOd Qai a F2 F amp O Fe hl FS Fe ty FaH Feth FaH Fe F9 Te ie ee Dal xoa m xO 4 Qala F2 3 F3 D Fa 4 Fs fh Fe fy FH Fet tr Fe F9 File Edit Tools Options Help a XA m Bd QQ Fa FeO F of Fsh Fe by FH Fet FE User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 59 With the gray box below Step 2 click on the transition button to add a second transition transition 2 to the example SFC program After adding the second transition below Step 2 click directly below the OR Divergence so that the gray box is now placed there Click on the transition icon again with the gray box below the OR Divergence to add a third transition transition 3 When you have completed these tasks your SFC program should now look like the third SFC picture below E 1SaGRAF SFC_EXAM MAIN Sha File Edit Tools Options Help Ae xoa Bw xidli F2 FO Fa FS fh F Fr H Fe File Edit Tools Options Help Aa MOR Bw xB dQ FOO FC Pe ob Fe Fe FaH ee File Edit Tools Options Help Da xoa m xd a sresesesdheseserepe Al From where the gray box is currently click on the Step icon to add Step 3 and then with the gray box below the newly created step 3 click on the transition icon to add a fourth transition transition 4 to the example SFC program Your SFC program
300. em below these two A1 variables as shown below Select variable E Scope Gen SCE OUTI High Alarm OUT2 Low Alarm A Z ISaGRAF FBD_EXAM MAIN FBD LD Program File Edit Tools Options Help Aaa Or Be xd QQH Se w RESP WS 223 ml less than User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 46 The last task to accomplish is making the connection between each of the variables and constants and the function blocks Click on the Draw Connection Line icon and draw a line between each of the variables and function blocks as shown below hi ISaGRAF FBD_EXAM MAIN FBD LD Program File Edit Tools Options Help en ee ee less than Draw connection line IN2 Q The top Al variable should connect to the INI of the gt Greater Than function block the 5000 constant to the IN2 of the gt Greater Than function block the bottom A1 variable to the IN1 of the lt Less Than function block and the 2000 constant to the IN2 of the lt Less Than function block Lastly connect the Q of the gt Greater Than function block to the OUTI1 variable and the Q of the lt Less Than function block to the OUT2 variable Connecting The I O amp Compiling The Project Follow the same procedure as outlined in Section 2 1 2 and 2 1 3 for connecting the I O and compiling the FBD example program The ISaGRAF I O Connection window should look like the exa
301. en2 been called it means the given pulse number is reached Note 1 Max 8 output channels can call PWM_en PWM_en2 pwm_ON pwm_OFF at one controller 2 This function can be used to test if PWM_en2 reachs its given pulse number or not PWM set Dynamically change the ON_ OFF_ amp NUM_ setting Parameters SLOT_ integer Which slot CH_ integer Which channel 1 32 OFF _ integer Off time scale is Ims ON_ integer On time scale is 1 ms I 8xx7 I 7188EG XG uPAC 7186EG uPAC 5xx7 1P 8xx7 1 32 767 WP 8xx7 WP 5xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 VP 25W7 2 32766 it must be set as multiples of 2 NUM _ integer number of pulse to output 2 147 483 647 If gives a negative value to NUM_ for ex 1 it will ouput indefinitely until pwm_dis been called Return Q_ boolean TRUE Ok FALSE An error occurred PWM_sts2 Get pulse number been output by pwm_en2 and pwm_en Parameters SLOT_ integer Which slot 0 7 CH_ integer Which channel 1 32 Return NUM_ integer the pulse number already been output by pwm_en amp pwm_en2 Note 1 This function only works when pwm_en amp pwm_en2 have been enabled 2 The returned pulse number may less than the given number in pwm_en2 when it reaches the destination For example gives 20000 pulse in pwm_en2 however when reach the end the pwm_sts2 may return only 19998 3 If the ouput number given in the pwm_en2 is a negative value the pulse outp
302. ength field lower byte number of following bytes The rest of the Modbus TCP IP protocol is the same as the Modbus RTU Serial protocol after byte No of 6 except that the CRC 16 is not need for the Modbus TCP IP protocol Example TCP IP Transactions The first example of a TCP IP transaction is reading one 1 word at Modbus address 4 from slave number 9 NET ID returning a value of 8 the transaction would be as follows Request 01 02 00 OO 00 06 09 03 00 04 00 QI Response 01 02 00 00 00 035 09 03 OZ OO DS The second example of a TCP IP transaction is reading 8 bits starting from Modbus address 2 from slave number 7 NET ID returning a value of 0x49 bit field 01001001 would be as follows Request 03 29 00 O00 00 06 07 01 00 02 00 08 Response 03 29 00 00 00 04 07 01 01 49 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 5 6 5 3 Algorithm For CRC 16 Check The following C language algorithm is for Modbus RTU Serial ONLY This CRC Cyclic Redundancy Check program provides a checksum that can be used to validate information being passed through Modbus RTU Serial protocol This CRC 16 check program first calls crc_init one time at the beginning of the communication to initialize the checksum table Then you can call crc_make to calculate a checksum whenever you want to define POLY _CRC16 0xA001 static BYTE TABLE1 256 static BYTE TABLE2 256 void crc_init void set crc table
303. er s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 11 Additionally enable the Boolean package for the SA controller The Boolean package can be send received through the Fbus network only when the Boolean package number is 1 5 x on SaGRAF TEST I O connection File Edit Tools Options Help 2 PBA TL FR E aj w ref 182 0400 package 1 32 1 sus package 33 64 0 cos package 65 96 0 caus package 97 128 0 sous package 129 160 0 cous package 193 224 0 cous package 225 256 0 a m fbus_m 4 L4 e mo package_161_192 0 Also enable the integer package for the SA controller system The Integer package can be send received through the Fbus network only when the Integer package number is 1 a SaGRAF TEST 1 0 connection File Edit Tools Options Help sows ref 103 package 1 32 1 sus package 33 64 0 cos package 65 96 0 mw package 97 128 0 sos package 129 160 0 sas package _161_192 0 sas package 193 224 0 ous package 225 256 0 3 Em fbus_m 4 gt rate ne gt boo_pack ne B ana_pack v User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 12 The ISaGRAF LD Project For The SA Controller FBUS_B_W always return TRUE Please do not add any condition on the left of the Fbus_ xxx block FEBUS B W A e Write boolean pack No 1 to the Fbus Package No should be Dg ba variable ZZ is included aconstant
304. er iaternal Variable array Dim as 4 addr as 7 all To get the temperature input of I 7018z s Ch 7 to Ch 10 CNT1 For testing by VB 6 0 addr as 15 Hex is F For testing by VB 6 0 addr as 17 Hex is 11 ieee a Setia value as 02345 STprogram ST1 Ain 0 5 Internal if INIT then INIT False Configure Ain 0 5 s network addr as 1 2 3 4 5 6 the initial addr 1 should be assigned when doing variable declaration in the ISaGRAF dictionary window TMP S_MB_ADR 1 6 0 the 3rd parameter 0 means setting as continuous addr Configure Temp 0 3 s network addr as 7 9 11 13 the initial addr 7 should be assigned when doing variable declaration in the ISaGRAF dictionary window TMP S_MB_ADR 7 4 1 the 3rd parameter means setting as jummping addr end_if if M1 then M1 False CNT1 CNT1 1 if M1 is set as TRUE by VB 6 0 program increase CNT1 by 1 end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 66 LD program LD1 The TYP1_ to T YP6_ parameter of the I 7018z block should be set as the same type code value in the DCON utility Here we use 1A 0 20 mA in this demo And TYP7_ to TYP10_ set as 16 100F This demo set OF T C K Type in the DCON utility Because we want to convert the temperature value to Celsius degree so we use 16 100F here unit is 0 01 degree If applying as Degree Fahrenheit please
305. er will response a a SNN h r E E See report message back to the use User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 17 2 _TRaGRAF DEMO 43 Programe Fie Make Project Toole Debug Options Help a mgg hean xr on zeae EOE I O connection ww SaGRAF DEMO_43 I O connection p Oj x File Edit Tools Optons Help B apBPrn ts RK g ENeIelelslEle m SMS B Status n 10 tc show3led n re pushdkey n 12 alle LD program work om _ STS end Blink outputs Message coming count Q1_cnt is declared as retained variable User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 17 3 ST program rcv_msg Q1 SMS_test Test if a message is coming or not ma Yearl SMS_get 1 Mon SMS_get 2 Dayl SMS _ get 3 call SMS_ get to get message coming Wdayl SMS_get 4 date amp Time in integer format Hourl SMS_ get 5 Minl SMS_get 6 S ae SMS ewe get phone No of sender phone SMS_ gets 2 get message coming date amp time in string format date_time SMS_ gets 3 get message data SMS_gets 1 should be called in the last one because it will reset SMS_ test status to FALSE No message coming data SMS_ gets 1 Check the coming message For ex T1500 will result T1 1500 ms while T0300 result T1 300ms however TAB10 will result T1 0 ms not valid if mid data 1 1 T then check Ist char is T or not
306. ernet Communication and Security ISaGRAF PAC has built in high flow rate protection in the Ethernet communication This protect the ISaGRAF program running well when TCP SYN TCP FIN flood attack happens 19 1 Ethernet Security There are some ways user can get access to the XP 8xx7 Atom CE6 XP 8xx7 CE6 WP 8xx7 WP 5xx7 VP 25W7 23W7 W 8xx7 via its Ethernet port 1 Using Modbus TCP protocol at port No 502 ISaGRAF and other HMI can do this 2 Using ftp for example keyin ftp 10 0 0 103 on the Internet Explorer 3 Using telent for example keyin telnet 10 0 0 103 in the command window 4 Using the Web Server The Web HMI does Note 1 While for I 8xx7 I 7188EG nPAC 7186EG uPAC 5xx7 VP 2117 and iP 8x47 only item 1 is possible 2 If the controller is WP 8xx7 WP 5xx7 X P 8xx7 CE6 XP 8xx7 Atom CE6 VP 25W7 23W7 W 8xx7 when using ftp telnet Web HMI amp Modbus TCP IP please connect your PC HMI to its LANI port and please use NS 205 or NS 208 Ethernet switch For safety recommend to disable item 2 and 3 at run time for WinCon Wincon ISaGRAF Driver Setting Web About Options V Enable Web HMI v Disable FTP Serveice V Disable Telnet Serveice Check it to disable To set up advanced security click on Se Settings And about item 4 please set proper username amp password for th
307. ert one 32 bit integer to two word and then put it into MBUS_N_W Now the MBUS_N_W must be set as 2 or 4 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 8 4 Write 1 2 floating point value 32 bit to Modbus device First using REAL_INT to convert one 32 bit floating point value to one 32 bit integer and use the LONG_WD block to convert it to two word then put it into MBUS_N_W Now the MBUS_N_W must be set as 2 or 4 Write max 4 bit value using Modbus function code 5 or 15 MBUS_B_W_ When NUM_W 1 using Modbus function code 5 When NUM_W 2 4 using Modbus function code 15 MBUS_WB Write max 16 bit value using Modbus function code 15 NOTE 1 The maximum number of each Mbus_x_x function block that with the same type can be used with one I 8xx7 I 8xx7 80 I 7188EG XG pPAC 7186EG wPAC 5xx7 iP 8xx7 VP 2117 controller system is 64 2 The maximum number of each Mbus_x_x function block that with the same type can be used for one port of WP 8xx7 WP 5xx7 X P 8xx7 Atom CE6 XP 8xx7 CE6 VP 25W7 is 256 3 MBUS_ R MBUS R1 MBUS24R MBUS24R1 MBUS_N_ R and MBUS_NR1 are with the same type MBUS B_R and MBUS_B_R1 are with the same type MBUS B_W and MBUS_ WB are with the same type MBUS N_W and Mbus12W are with the same type 4 Max 128 Mbus_XR or Mbus_XR1 can
308. ery 75 seconds and then send to PC I 87017 via COM3 Store 2880 short integer values every 18 seconds and then send to PC I 8017h via COM3 Read Write user defined protocol via COM3 Show3Led Time synchronization by using Fbus between two or more controllers Demo _35A should be used with Demo_35B demo If the time is modified in 35A the time in controller running 35B will be automatically modified User can modify the program to use Ebus Time synchronization by using Fbus between two or more Fbus_s controllers l Push4Key Spotlight demo Simple HMI please refer to Chapter 14 Show3Led I 8xx7 link MMICON demo 1 please refer to Chapter 16 I 8xx7 link MMICON demo 2 please refer to Chapter 16 Store 8 A I binary to S256 per minute then PC can load it by ICPDAS UDloadet Record Alarm text to 256 512 amp PC can load it by ICPDAS UDloader Store 8 A I text to S256 per min then PC can load it by ICPDAS UDloader na message type sMs Motion control x axis slot 0 I 8091 Fbus_m Nn UD D O User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 7 7 Pulse move at a specified speed 1 8090 Demo _49a_ Redundant 8437 8837 redundant Master Bus 7000 Ebus_m Demo _ 49b Redundant 8437 8837 redundant slave ace PWM I O demo Refer to section 3 7 I 8055 Demo 52 Parallel D I counter demo 1 at slot O Refer to section 3 8 1 8051 Counter Value is retained
309. eturn char 3600 eRe SF SHE ACT EEOC ED HAH sR 00 00 44 EEEE 9600 o N 1 CAPS NUM ima PIED User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 35 11 3 5 Wdemo_24 Send string to COM2 when alarm 1 to 8 happens This demo program can be running in WinCon 8xx7 8xx6 or in I 8xx7 Please init PORT as 2 if your target is WinCon while 3 for I 8xx7 Location W 8xx7 CD ROM napdos isagraf wincon demo wdemo_24 or ftp ftp icpdas com pub cd wincon_isagraf napdos isagraf wincon demo wdemo_24 Variables Please refer to Chapter 2 6 for more informayion about Variable Array pulse generated every 1 sec to counting time Variable Array Dim is 8 Variable Array Dim is 8 A COM PORT Number to open init as 2 for WinCon Variable Array Dim is 8 a ane E count ihe elapsed seconds Message to send to COM2 init length as 128 Project architecture TBaGRAF WDEMO 24 Programs ol x Fie Make Project Tool Debug ptons Help S HS nET Zxr mk aes Begin Begin STi Structured Text Operations 1 If IN O 7 rising from False to True and hold in True for at least 3 seconds send one message Alarm N lt LF gt lt CR gt to COM2 N 1 2 8 depends on which Input is triggered For ex if IN 2 is rising and hold in True longer than 3 seconds send Alarm 3 lt LF gt lt CR gt to COM2 2 If after IN O 7 s first alarm is sent and then c
310. eu k gente E E E A 10 S000 IPAC SERIES WIH WINPAC aroase aio a E a E E 11 l 7 L68 MEAC SERIES PAC ororo tent aout a a a e S E e E S 12 HOW TO SELECTISAGRAE PAG wiskssassecsteccsascccsancssesesaatcssesusrshesoecuss ectnscssseavavensuincsobecawatcasstudcessesuetsusuicsshancaascontindsoteans 14 CHAPTER 1 SOFTWARE amp HARDWARE INSTALLATION u 0 ccsscscsccccccccccssscssssccsssssssscscccccsssssssssssseees 1 1 1 1 INSTALLING THE ISAGRAF WORKBENCH SOFTWARE PROGRAM sssssssseeeeeeeceeeeeeeeeeesseesssnnaaeeeeeeeeeeeeeeeeeeeeesaeas 1 1 1 1 1 The hardware protection device dongle amp USB Key Pro ccccccccccccssssssssesseeeeeceeeeeeeeeeaaaaasenseseeeeeeees 1 2 1 1 2 Important Notice For Windows 2000 USCIS ceneno a E EE a 1 3 11 3 Important Notice For Window NT USseiS suecia E E at 1 4 1 1 4 Important Notice for Windows Vista or Windows 7 32 bit Users neeesessssssssseoeeeeresssssssssssssseeereessssssse 1 4 1 1 5 Important Notice for Windows 7 04 bit USES sinora a e Gia See itianas 1 6 1 1 6 Important Settings for Using Variable Arrays oii ciisctcccecs ssc tinaredonambloenianicseaniddienceltnassGieinnnuit neg idtenes 1 6 12 INSTALLING THE ICP DAS UTILITIES POR SAGRA Perosti a SN nda Mabie 1 6 Lo HARDWARE SETTING ON ISAGRAE PA CGocnosionesorn ee a a A td deebatcnabaa tidied l 7 CHAPTER 2 GETTING STARTED vincire ore E T aE 2 1 2e ASIMPLE LADDER LOGIC 12 PROGRAM oeaiei er aa e a tad aunt rE r EA 2 1 ZARES Prosramnne
311. ey will properly communicate with each other Developers who design and write their own software interface programs using Microsoft s Visual Basic or Visual C programming language should refer to Chapter 5 of this manual for more information on how to interface the Modbus protocol to these programming languages While communicating with the I 8xx7 uPAC 7186EG uPAC 5xx7 I 7188EG XG 1P 8xx7 and VP 2117 controller system One single Modbus frame cannot request more than 255 bits or Boolean and cannot request more than 122 words in one single modbus frame It should be divided into 2 or more reading frames to achieve it For the WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 VP 25W7 and VP 23W7 One single Modbus frame can request up to 1968 bits or Boolean and also cannot request more than 122 words in one single modbus frame User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 5 4 2 Read Write Word Long Word amp Float through Modbus Modbus protocol provides function 3 and 4 for reading multiple words while function 6 and 16 to write words Please refer to Chapter 5 for more information about the protocol The word defined in the Modbus protocol of ISaGRAF controllers is like a signed short integer which occupies 2 bytes and range from 32 768 8000 in hexa to 32 767 7FFF in hexa It is normally used to describe the behavior of analog I O channels For examples the I 87017W I O board please refer to sectio
312. f Filel 0 then return creat failed exit this function end_if max num_rowl rows to save these REAL values Each row in the file contains 10 REAL values for 112 0 to num_rowl 1 do strl set initial value of strl if 12 num_rowl 1 then last row num2 last_numl last row has only last_num1 number of data else non last row num2 10 non last row has 10 data end_if for jj2 0 to num2 2 do stri strl REAL_STR F_VALI1 10 i222 jj2 end_for the last data in each row should end with lt CR gt lt LF gt character stri stri REAL STR F_VALI 10 ii2 num2 1 0D 0A TMP2 f_writ_s Filel str1 write one row to file we end_for Any file been open should be closed by f_close TMP2 f_close Filel save fl TRUE return value as TRUE Ok User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 29 How to test this Wpdmo_ 56 project 1 Please download Wpdmo_56 to WP 8xx7 then the Spy list window will pop up as below y SaGRAF WOEMO_56 LIST1 List of variables Oj File Edit Options Help DA He lt Q Mame Value Comment Meg Get Retained data from tile Ok Fiel operation state Len 126 Data _Ok1 TRUE True means data iz read Ok from Tile False means error File_namet fCompactFlashidatase txt File name Len 64 RE LOAD FALSE init as TRUE to load da
313. f ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 12 18 4 Software I O connection The I 8091A connected on the I O connection window contains 11 digital input channels ow saGRAF WORMO 26 MI connection File Edit Tools Optons Help S pSPrmh tlRrR a roo ref 80914 EB i_80914 ne ma NO_OR_NC A al EMG emg A The NO_OR_NC 4 parameter can beset as Li amp LS11CLe 0 Normal Open By Led Re 1 Normal close mae ol XSTOP ial ol LS21CLe E L524 Rig ol ORG2C0 Gi 9 YSTOPC I 8090 contains 3 analog input channels ow eaGRAF TESTUL PO connection File Edit Tools Options Help B PBPn tlk s o i_8091 n g mj ref 8090 ED i_8090 o e m x_mode 10 EH 4 2 ig EE m Y mode 10 m z mode 10 10 x Input Channel CH1 EMG emergency stop CH2 FFEF FIFO is empty or not TRUE empty CH3 FFFF FIFO is full or not TRUE full CH4 LS11 Left limit swtch of X axis CH5 LS14 Right limit swtch of X axis CH6 ORGI Original position swtch of X axis CH7 XSTOP Stop or not of X axis TRUE stop CH8 LS21 Left limit swtch of Y axis CH9 LS24 Right limit swtch of Y axis CH10 ORG2 Original position swtch of Y axis CH11 YSTOP Stop or not of Y axis TRUE stop O x Parameter X_mode integer counting mode of X axis y_mode integer counting mode of Y axis Z_mode integer counting mode of Z axis 00 quadrant counting mode 10
314. f ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 8 Fbus Function 4 Fbus_n_w The Fbus_n_w function writes one integer package to the Fbus network In the below example the Fbus n w function write variables E1 to the first integer of the package of No 1 E2 to the second integer of the package of No 1 E3 to the third integer FEBUS N W er Q Please do not add any PACK NO condition on the left of the Fbus_ xxx block Fbus_n w always returns TRUE Package No should be aconstant value not a variable value User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 9 7 4 An Fbus Data Exchange Example Example Description In this Fbus data exchange example there are three I 8xx7 I 7188EG XG controller systems linked together in an Fbus network These controller systems are named SA master controller system 1 SB slave controller system 2 and SC slave controller system 3 One of the digital input values from the SA controller master system needs to be shared with the SB and SC the slave systems controllers across the Fbus network and the name for this digital input value will be called ZZ The first task of this example is to create an Input variable named ZZ on the SA controller system Use the ISaGRAF Project window to declare ZZ as an input variable and then link the ZZ input variable using the SaGRAF I O Connections window for the SA controller system Next you will
315. fc_exam Xample SFC Projec simpleld amp Simple LD Program oa Reference Simple LD Project Foss Author ICP DAS USA Inc ly Date of creation 12 15 2001 Yersion number 1 ISaGRAF 3 41 Description Simple Example Of An LD Program Archive Projects X Workbench Archive demo_1 5a B ackup demo_15b demo_16 demo_17 Hestore fbd_exam il exam io4lid ETI Close Help gt Browse T st_inter work_01 work_02a work_02b f Ar You will now find the backed up ISaGRAF project file in the Archive location you have designated In the example above the name of the backed up file is simpleld pia User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 9 Restoring An ISaGRAF Project To restore an ISaGRAF project from a backed up file use the same method as above to access the Archive Projects window click on Browse to find the location of your backup ISaGRAF project then select the project name you want to restore that listed in the Archive window then click on the Restore button The project will now be restored to the ISaGRAF Archive Projects i x Backup Restore Close Help Workbench Archive 02b Compress Archive location C ASCOTTS Browse You can now open edit and download the restored ISaGRAF project file User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 10 9 6 Copying amp Renaming
316. fer to Appendix B NET ID as 1 Then power OFF the I 7188EG connecting its COM2 to the I 7018z Then power up I 7188EG and JI 7018z To User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 62 connect this I 7188EG well in the local network PC s IP should be in the same domain as 192 168 1 x For example setting PC s IP as192 168 1 2 Mask 255 255 255 0 4 PC run ISaGRAF to download demo_72 project to the I 7188EG via ethernet If you don t know how to do it please refer tp section 2 1 5 or 1 3 8 Then open the Ladder program window in the ISaGRAF to check if I 7018z is well connected Hig SaGRAF DEMO_72 LD1 Quick LD Program lol x File Edit Options Help i aieo _7018Z en Q 1 ADR NML 16 1A TYP1_ NI2_ 16 1A i ea aE TYP N3 If OK1 is True it means 16 1A i this i 7018z well TYP3_NI4_ connected 16414 TYP4_ NI5_ 16 1A TYP5_ NIS_ 16 1A TYP6_ NIZ 16 100F TYP7_ NIB 16 1 OOF TYP8_ NI9_ 1631 00F TYP9_ NI10_ 163 1 OOF Y p os 6 14 F 5 Then please run VB 6 0 Demo_4 exe in your PC It resides at 1 8000 CD napdos isagraf vb_demo demo_4 demo_4 exe or http www icpdas com faq isagraf htm gt FAQ 055 As the figure in the next page There is one another VB net 2005 demo project can be study Please visit http www icpdas com faq isagraf htm gt FAQ 051 or www icpdas com FAQ Software ISaGRAF 051
317. fer to step 2 ah nectar False True je clswintepotheh demo 4 BLU_ON2 TICO BLU _OFF1 ICO BLU _OFF2 ICO BLU_OFF ICO BLU ON1 ICO IA WIN SPOTLIGH DEMO 34 Caption LU ONSICO Align BIN_OFFI ICO 1 RAAT REET Icons Color T Command variable Then drag the boolean icon to appropriate place E TsaGRaAF DEMO 34 untitled potLight Fie Edit Insert Options Help O EE ET EEEE EE Button 1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 5 Check on the new created boolean icon copy it Ctrl c and then paste it Ctrl v to reproduce one another boolean icon Then drag it to the prefered place ThaGRAF DEMO 24 vntitled spotlight File Edit Insert Options Help BOBA s repna xe gw oo Check on the new created boolean icon then click the right button of the mouse select Set item style to modify the name to Button2 BE TsaGRAP DEMO 34 untitled spotlight File Edit Insert Options Help 8 O B 2 i mpila scl da a po click the right button of the n rt Cut Ctx Copy Ctrl C Paste Ctlt Delete Write value met item style User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 6 Then we have k ETAT Button Button DFF era o pac ee an a ee ee ea serene a E ee osaa EE Follow the same method to create 4 boolean icons
318. g value Begin LD1 Ladder Diagram User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 12 Ladder program Read 6 words trom Slaye 1 M FO000 Address 1 using code 4 starting Modbus ADDR No is U Please set M r01 TR s range to 10 by DECON utility type code 8 comm _okt _f OTF R O OTF Ri OTT R 2 _f OTF R 3 _fO1 FRA _f OTF RS _f 01 R 6 _fOTFREF Arite 4 words to Slave 2 M S O00 Address 2 starting Modbus ADDR No is U Please set tl 0124 s range to 1 0 by DEON utility type code 33 MEUS M WY comm ok Q gt User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 13 ST program Please configure this M 7017R as 10V range type code 8 convert M 7017R s A I value 32768 to 32767 to become engineering value of 10000 to 10000 for ii 0 to 7 do IN_Val ii Bin2Eng M_7017R ii 32767 32768 10000 10000 end_for Please configure this M 7024 as 10V range type code 33 convert OUT_Val of 1000 to 1000 to become M 7024 s A O value of 16384 to 16383 for ii 0 to 3 do if OUT_Val ii gt 1000 then M_7024 ii 16383 elsif OUT_Vallfii lt 1000 then M_7024 ii 16384 elsif OUT_Vall ii gt 0 then M_7024 ii OUT_Vall ii 16383 1000 elsif OUT_Vall ii lt 0 then M_7024 ii OUT_Vall ii 16384 1000 end_if end_for I O connection om ISaGRAF WDEM
319. g on your PC you can connect Com3 to your PC to see how it works User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 42 2 3 A Simple Function Block Diagram FBD Program The Function Block Diagram FBD is a graphical programming language that allows a programmer to build complex procedures by taking existing Functions from the ISaGRAF library The following section details how to build a Function Block Diagram program with ISaGRAF Example FBD Control Specification The following details the variables that will be used in our example Function Block Diagram program OUTI High alarm OUT2 Simulate a temperature input initial value is 0 FBD Program Outline 2000 n OUT FBD Program Action If Al gt 5000 output OUT1 is TRUE If Al lt 2000 output OUT2 is TRUE Other situation output OUT1 and OUT2 are FALSE 2 3 1 Programming The Example FBD Program Creating a Function Block Diagram henceforth referred to as FBD program is very similar to creating a LD program as outlined in Section 2 1 The following steps detail how easy it is to create a FBD program Creating a New FBD Project From the SaGRAF Project Management window click on the Create New Project icon and enter the name FBD_ Exam User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 43 X ISaGRAF Project Management l pr iol x File Edit Project Tools Options Help
320. ger signed 32 bit 4 bytes Real float 4 bytes Message string len lt 255 len bytes To access to the SRAM the below functions can be used Please refer to Appendix A S_B_R S_B_W S_BY_R S_BY_W S_M_R S_M_W S_WD_R S_WD_W SNR S_N_W S_R_R S_R_W S_MV 10 3 2 Upload data stored in the SRAM For PC to upload data stored in the volatile SRAM of the IsaGRAF controllers the SRAM should be divided into or up to 8 files Each file has a ID No of to 8 and a name of up to 8 characters and 3 file extension The below functions are for handling file format inside the SRAM S_FL_INI S_FL_AVL S_FL_RST S_FL_STS Please use functions of S_FL_INI amp S_FL_AVL to arrange the file resident location amp current available location Please refer to Appendix A amp demo_40 41 or 42 The volatile SRAM is consisted of bytes The total number of bytes available depends on which module is used as below The upper 12K is reserved Byte No Sxx7 S256 1 249 856 244K 256 244 12K is reserved 1 I 8xx7 S512 512 000 500K 512 500 12K is reserved I 7188XG EG X607 1 118 784 116K 128 116 12K is reserved I 7188XG EG X608 1 512 000 500K 512 500 12K is reserved A file can be located at any place inside these bytes Each file s location can be described as Begin End Begin is the lower limit byte No of the associated file while End is the upper limit byte No and Begin is always less than End
321. ger Array Via Modbus User can use the below functions to read write word amp integer arrays inside the ISaGRAF project For more information about these functions please refer to Appendix A 4 ARY_N_R Read one integer 4 byte signed from an integer array ARY_N_W Write one integer 4 byte signed to an integer array ARY_W_R Read one word 2 byte signed from an word array ARY_W_W Write one word 2 byte signed to an word array Word and integer arrays built in the I 8xx7 I 7188EG XG uPAC 7186EG 1P 8xx7 amp VP 2117 controller occupy the same memory area please use them carefully Other softwares HMI OPC server running on the PC can access to these word and integer arrays via Modbus protocol The valid network address for these arrays is from 5001 to 8072 for I 8xx7 I 7188EG XG uPAC 5xx7 uPA C 7186EG 1P 8xx7 amp VP 2117 while 10 001 to 19 216 for the WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 VP 25W7 23W7 and their relation is listed in below table For the I 8xx7 I 7188EG XG uPAC 7186EG uPAC 5xx7 1P 8xx7 VP 2117 po 5002 Y D e o 5004 A oo O a e o 8071 12 255 6 256 8072 12 256 o For the WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 and VP 25W7 23W7 0002 y aD e a 10004 1 4 19215 36 255 18 256 19216 86 256 Note 1 Network address 1 to 4095 for I 8xx7 I 7188EG XG uPAC 7186EG uPA C 5xx7 iP 8xx7 VP 2117 while 1 to 8191 for WP 8xx7 WP 5xx7 XP 8xx7 CE
322. gether Therefore the PC running ISaGRAF can remotely download to anyone of them through the modem and the Modem station I 8437 8837 Vite E E iii Ethernet ISaGRAF Phone Line cues aaa i 18437 8837 Com4 program lt tation Se AUN ee eo Phone Line Note 1 W 8xx7 s COM2 can be set as Modbus RTU port please disable it if using as modem_link port Please refer to W 8xx7 s Getting Started Manual 2 WinCon 8xx7 just support Modem station which connect to Modem User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 13 1 13 2 Download Program Via Modem_Link Note 1 The quality of the phone line busy situations and weather conditions may have dangerous effects on changing a program in the remote controller So please try not to download the program via Modem_Link unless necessary But the users can still monitor the operations of the controller and it s not dangerous 2 The COM2 of W 8xx7 is used as a Modbus RTU port by default please disable it if using as modem_link port Please refer to W 8xx7 s Getting Started Manual Warnning Do not download a project which uses I 8xx7 s COM4 amp W 8xx7 s COM2 to do other things to the Modem station controller Because the Modem_Link function will be invalid and can not remotely connect unless you move to the controller and set the program again For example do not connect Bus7000 amp Mbus wit
323. gt 5 2 Select board equipment xj i 8055 8 CH DI amp 8 CH DO i_87055 8 CH DI amp 8 CH DO A xana_io Analog I Os for simulation xboo_io Boolean I Os for simulation Cancel xmsg_io Message I Os for simulation ___ te Library Bleeke Boards Equipments If you link an I O board to an incorrect slot first click on the slot number you wish to correct then just click on the Clear Slot icon to delete the connection The connection is now cleared and now you can make a connection to the desired slot location User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 4 3 1 2 Linking Input amp Output Board Variables All of the input and output board variables or names must be linked connected in the I O Connection window Click on the slot you wish to link the attribute to then double click on the channel or I O point name number on the right hand portion of the I O Connection window Lastly choose the variable name you wish to link to and then click on the Connect button IMPORTANT NOTE Remember that before you can assign any input or output you must FIRST declare the variable in the TSaGRAF Global Variables window as shown below SaGRAF IO4LD Global booleans 5 x Fie Edt Tool Options Help 00 KGd Kg Booleans integersReals Timers Messages FB instances Defined words Click once on slot 8 then do
324. gt I 87019ZW The analog input value of I 87019ZW is between 32768 to 32767 refer to Appendix D When applying as temperature input please refer to Chapter 3 2 2 to get direct temperature value If applying I 87019ZW to measure current input range setting is 06 07 or OD it doesn t need to plug external resistor of 125 ohms There is Jumper to be switched on the board I 87019ZW s Sample Rate is about 10 10 1 Hz that means sample per second on all 10 channels If your application is to measure faster signal of tlOV or 20mA please use I 8017HW To program I 87019ZW please connect 1_87019z in the related slot in the ISaGRAF I O connection window Then set proper range setting Then connecting related Integer Input variable in Ch 1 to Ch 10 as below wu SaGRAF CREATION FO connection File Edit Tools Options Help a p gt Seam tL FRAAIE If it set as 100F T C K Type convert to o a mej ref 87019FA C wa CH1_rang 8 Degree Celsius unit is 0 01degree E i 870197 e me CH2_rang 9 28 CH3_rang D If it set as 200F T C K Type convert to a am CH 4_rang g Degree Fahrenheit unit is 0 01degree z cos CHS rang 8 ma CH6 ak 8 When using special setting and the return naan CH7_rang g value is 999990 it means Sensor Em CH8_rang broken line Refer to Section 3 2 2 e mwa GH9_ rang 8 sos CH10_rang 8 z aia a User s Manual Of ISaGRAF PAC Se
325. gt and has intial value of 1 Do some init setting at Ist scan cycle if INIT then INIT FALSE TMP M_regist cardNO 16 80 plug 18091 in slot O TMP M_r_sys cardNO reset 1809 1 s setting TMP M_s_var cardNO 4 2 5 100 TMP M_s_dir cardNO 0 0 Normal direction TMP M_s_mode cardNO 1 1 pulse_dir mode TMP M_s_serv cardNO 1 1 X amp Y server ON TMP M_s_nc cardNO O Normal open end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 14 M_r_sys Reset all setting To reset I 8091 card this command will terminate the running command in m_ Ff sys I 8091 card User can use this command as software emergency stop This oad a command also will clear all of setting so all I 8091 card s parameter should be set again Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 Return Q_ boolean always return TRUE Example 1 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 15 Ms _ var Set motion system parameters To set DDA cycle accelerating decelerating speed low speed and high speed value Parameters card NO_ integer the card No has been set by M_regist valid is 0 19 DDA_cycle_ integer DDA cycle valid is 1 254 Acc_Dec_ integer Acc Dec speed valid is 1 200 Low_Speed_ integer low speed
326. h port_no 4 for I 8xx7 amp port_no 2 for W 8xx7 And do not use Comopen to open Com4 for I 8xx7 amp Com2 for W 8xx7 It will disable Modem_Link But the Email function described in chapter 12 has no this limitation The first thing is to add a modem password to your ISaGRAF program of the Modem station controller for security To do it click on one empty slot No from the I O connection window Then connect Modem PS on the slot ISaGRAF TEST Programs File Make Project Tools Debug Options Help ICER e viel ge aoe Begin fi ww saGRAF TEST 140 connection Begin fi File Edit Tools Option Help 2 pBeam tL EFRI select boardequapment 8042 Isolated 16 CH DI amp 16 CH DO 1 8054 Isolated 8 CH DI amp 8 CH DO 18055 8 CH DI amp 8 CH DO 1 8063 Isolated 4 CH DI amp 4 CH DO Cancel L87013 4 CH RTD Input with Alarm 8 017 8 CH Analog Input with Alarm Note 1 87018 8 CH Thermocouple with Alarm L87054 Isolated 8 CH DI amp 8 CH DO 187055 8 CH DI amp 8 CH DO 14 063 lsolated 4 CH DI amp 4 CH BO Library master Set as Fous Master lt Old Yer mbus Modbus master on COM or COMA C Boards modem os set Password of Com4 Modeo z slave Set as Fbus slave lt Old YVersion gt Equipments 107 EDI amp 7DU for the 7188KB EX gt x304 1DA 3AD 4D0 401 for 71884B7 E IBEW EleleleIElel Then you got the window
327. hanges using the Edit Diary facility for enhanced program management capability ISaGRAF SIMPLELD Programs el Fie Make Project Tools Debug Options Help D BS Dem ZX OM Agp File Edit Tools Options Help axed amp Name SimpleLD Language LD Creation da When you have completed entering information in the ISaGRAF Diary file just click on the Save icon for your revision notes to be saved User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 8 9 5 Backing Up amp Restoring An ISaGRAF Project For archiving purposes you can Back Up and Restore an ISaGRAF project For example you may want someone to test your program or email to service icpdas com for ICP DAS s ISaGRAF technical service Backing Up An ISaGRAF Project Open the ISaGRAF Project Management window select Tools from the menu bar click on Archive and then click on Projects An Archive Projects window will open which allows you to designate where you want to save the ISaGRAF project to Click on the name of the ISaGRAF project you want to backup in the Workbench and then click on the Backup button You can compress the size of the file you have backed up by clicking on the Compress checkbox BEFORE you click on the Backup button ISaGRAF Project Management File Edit Project Tools Options Help he Archive Tont ak e a aan OEE Common data st exam il_exam Import IL program anl s
328. he special setting case is for M 7000 temperature input modules like M 7015 M 7018R amp M 7019R Please set CODE_ to a special value defined as below Format TTRRCC Hex TT 10 Convert to Degree Celsius TT 20 Convert to Degree Fahrenheit TT 00 standard setting 32768 to 32767 RR should be set as 00 if TT 00 RR Type Code setting of the related temperature input module CC Modbus function code to 4 of the related Modbus device The temperature input value unit is 0 01 degree For ex if returned 3012 it means 30 12 degree If returned 999990 it means sensor broken line For example setting CODE_ as below to read the temperature value of M 7019 A 16 100F04 TT 10 RR OF CC 04 Hex the input value will be Degree Celsius unit is 0 01 degree range OF Thermocouple K Type 270 1372 degree Celsius code 04 Dec That results input value of 2356 23 56 Degree Celsius 489 4 89 Degree Celsius 999990 sensor broken line B 16 200F04 TT 20 RR OF CC 04 Hex the input value will be Degree Fahrenheit unit is 0 01 degree range OF Thermocouple K Type 270 1372 degree Celsius code 04 Dec That results input value of 4512 45 12 Degree Fahrenheit 500 5 00 Degree Fahrenheit 999990 sensor broken line C 16 04 TT 00 RR 00 CC 04 standard setting User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 19 Example 46 Connecting 1 M 708
329. hey are OUTO1 OUTO2 amp OUTO3 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 27 2 1 3 Compiling The Example LD Project For ANY AND EVERY ISaGRAF program to work properly with any of the IsaGRAF controller systems it is the responsibility of the programmer to properly select the correct Compiler Options You MUST select the ISA86M TIC Code For Intel option as described below First click on the MAKE option from the main menu bar and then click on Compiler Options as shown below ISaGRAF SIMPLELD Programs E loj x File Make Project Tools Debug Options Help Make application aa ie HM AQR Begir tees D Program Touc Application run time Options Beqir A Resources The Compiler Options window will now appear Make sure to select the options as shown below then press the OK button to complete the compiler option selections Compiler options 2 x Targets gt SIMULATE Workbench Simulator Select ISA68M TIC code for Motorola gt ISA86M TIC code for Intel Unselect CC86M C source code 3 04 IV Use embedded SFC engine MAKE SURE Upload Optimizer THESE BOXES ARE V Run two optimizer poner pt HECKED A valuate constant expressio Nie If using Variable Array in the program please DO NOT check the 2nd 7th 8th and 9 th Optimizer options or the _ Suppress uny value of the Variable array will be incorrect Recommend to
330. hl to Ch 4 voltage output of I 8024 to Chl to Ch 4 of I 8017H Then power up this I 8437 80 2 Download the ISaGRAF project Demo 71 to the I 8437 80 3 At run time you may press pushbutton 1 to start recording Then it will record data during 2 minutes You can see the displayed number on the front panel decreasing to O and blinking If recording 1s finished the 3 Leds on the front panel will blink and the displayed number will be 0 To stop at anytime just press pushbutton 4 once 4 Whe recording is finished please run UDLoader in your PC to upload the record file in the S 256 512 to PC If your PC is currently running ISaGRAF workbench please run Tools ICP DAS ICPDAS UDloader Then you will see the window listed in step 5 below _ SaGRAF DEMO 71 Programs ol x Fie Make Froject Tools Debug Options Help B BEE Importfomlibery mK 2 oe Begin ini Export to library EAA Auto scan 0 VIEW Background Downloader ICPDAS UDloader Begin ST1 Structured Text eee User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 53 If your PC is not running ISaGRAF workbench please copy 1 8000 CD napdos isagraf some_utility udloader exe to for example PC windows s desktop Then please run it Set proper Link Setup If click on Browse you may modify the file upload location path Then click on Ok and Ok to save this setting then
331. iable array Dim 8 4 1801 FH 7 variable array Dim 3 ICP DAS 11 49 ST Program Sim_out Output I 8024 s Chl to Ch4 as different Sin Cos voltage curve 2 Pi T1 60000 T1 1 047197E 4 2 pPi T1 120000 T1 5 235985E 5 i8024 0 i8024 1 ANAC sin REAL T1 1 047197E 4 3276 8 ANA cos REAL T1 5 235985E 5 3276 8 18024 2 ANA sin REAL T1 1 047197E 4 6553 6 18024 3 ANA cos REAL T1 5 235985E 5 6553 6 If set Stopl as TRUE stop the T1 timer and set the STEP1 as 0 if Stopl then Stop1 False STEP1 03 set the STEPI1 as 0 0 No action TStop T1 stop the T1 timer T1 T Os Msg1 User stop recording end_if If set Gol as TRUE it will start to action if Gol then Gol False STEPI 0 No action 1 recording 2 finished if STEP1 1 then Msg1 It is still recording now Update the operation status else Check if the value Intervall is correct the value is between 40 10000 Unit is 0 001 second If Intervall lt 40 or Intervall gt 10000 then Msg1 Wrong Interval value it should be in 40 to 10000 milli second Check 1f the value Period1 is correct the value is between 1 10 Unit is minutes elsif Periodi lt 1 or Periodi gt 10 then Msg1 Wrong Period value it should be in 1 to 1
332. ibrary rote ps000 Link to MTCP 6430 8830 S256 Al Batter backup SRAM for 6s SMS Short Message Service vio Permissive IF via Modbus TCP IP s107 BOL amp FOO for the 186sG EG HITS FOL amp FOO for the 71084G EG Boards G Rees aw SaGRAF WHMI_05 IO connection E x File Edit Toole Options Help BS PBeo ELERA S i 4 sama pei te a am i 8077 a IP_ 1 10 0 0 2 DIB n IP_ 2 10 0 0 4 DOB m anan Pe mo IP_A NA m IP_5 NYA 4 m IP_6 NYA Ea oa IP_7 NJA 6 mus IP_ 8 N A la am Vip B ip n i s i Eee Bd User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 19 2 19 2 Delivering Message via UDP When using WP 8xx7 WP 5xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 and iP 8x47 you may connect ethernet cable at LAN1 or LAN2 port Please use NS 205 208 Ethernet switch for them Since I 7188EG driver 2 18 I 8437 8337 driver 3 20 W 8xx7 driver 3 37 or later Ver Please connect udp ip before using udp recv and udp send functions on SaGRAF CREATION I O connection Til gt File Edit Tools Options Help This_port Port No of UDP IP used for SB P gt PBemi LEFKAS receiving message from remote PC or Send_Time_Gap ref 127A controllers It is better to use value larger than the ane neral for each this port 12001 1000 65535 Default is 12001 message sending The unitis W8 this ip xxx ine enbe a TO eserved
333. ich has no floating point value saved inside ICP DAS ISaGRAF controllers support Controller Fault detection since below driver version The VP 2117 uPAC 7186EG wPAC 5xx7 1P 8xx7 WP 8xx7 WP 5xx7 VP 25W7 23W7 XP 8xx7 CE6 XP 8xx7 Atom CE6 are supported I 7188EG I 7188XG I 8417 8817 8437 8837 W 8037 88337 8737 There is two type of controller fault One is called Global fault The other is Local fault When Global fault happens the IsaGRAF project will stop running Waiting the new modified project to be downloaded When Local fault happens the ISaGRAF project still runs PC HMI OPC Server can request the controller fault state by using Modbus protocol Word address of 9999 is the controller fault state 0 Ok 1 Controller fault R_MB_ADR 1 9999 to get controller_state Word address of 9998 is the controller fault type R_MB_ADR 1 9998 to get fault_type 101 Global fault other value is Local fault 102 S_R_R Float error 103 R MB _REL Float error 104 INT REAL Float error 105 RETAIN F Float error 106 RETAIN _X Float error 107 Real value divided by 0 108 Integer value divided by 0 109 RETAIN _A Float error 110 Real value multiplication is overflow exceeds valid range of 32 bit float 111 Real value division is overflow exceeds valid range of 32 bit float 112 Real value addition is overflow exceeds valid range of 32 bit float 113 Real value subtraction is overflow exceeds valid range
334. ick LD F File Edit Tools Options Help Aa Xe gs xBd Pr QgalHe ge Fo 4Ei F3 45 Fd GH FS H F CHE F JH F Gt Fo Fao User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 19 Assign T 1s to the parameter of CYCLE then we got the below window Sie lhat RAF SIMPLELE LD1 Quick LD F File Edit Tools Options Help Aa Xezal BS xB d Pe QQaak g Fo 4BE F3 JHE Fd GH FS CH F HE F7 JH Fe EI Fo tae File Edit Tools Optons Help Aa BA2 Os xh d PM QQqgak g F2 4HE F3 46E Fd GH FS H F HE F7 JH FS Ip SEE User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 20 Double click on the N coil to assign M3 to it Sie pals RAF SIMPLELD LDI Quick LD F File Edit Tools Options Help Pal xal mpl xad ela F2 4HE F3 JHE Fa GH FS H Fe HE FP 34 F yl Fo tae Now we are going to add another LD rung Move the cursor to the below position of the second rung And click on F9 Return Sie pals RAF SIMPLELD LDI Quick LD F File Edit Toole Options Help Pe XSA Bs keg PM aR F2 4HE F3 I4 Fa GH FS H Fe HE FH Fe GI Fo tare User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 21 Move the cursor to return and then click on F2 Contact on the left to add a contact on the left Bie pals RAF SIMPLELD LD Quick LD Pro File Edit Tools Optons Help Aa xe Bs
335. icpdas com pub cd wincon_isagraf napdos isagraf wincon demo or www icpdas com gt FAQ gt Software gt ISaGRAF gt 082 23 3 Using FR_B_A Function to Reduce the Program Size Some application may use many FRnet I O channels in the WP 8xx7 or iPAC 8x47 If using FR _ 16DI and FR 16DO in this kind of program the size will become complicated and large To low down the program size user may use FR_B_ A and Boolean variable array in the program uPAC 7186EG FX 016 also supports FR_B_A Variable declaraction sample in the following page INIT ia as Internal Boolean and with an initial value at TRUE DOUT is as Boolean variable array dimension is 128 that is DOUT 0 127 Please assign its Network addr as 101 65h DIN is as Boolean variable array dimension is 128 that is DIN 0 127 Please assign its Network addr as 229 E5h Please refer to www icpdas com gt FAQ gt Software gt ISaGRAF gt 039 for more about Variable Array User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 23 8 ITT l Only run once in the first PLC scan INT Assign DOUT 0 127 s Network addr as 101 to 228 Please make sure DOUT 1s declared as array DIM 128 and with a Network address number 101 in the dictionary window So MB_ADR SE Assign DIN 0 127 s Network addr as 229 to 356 Please make sure DIN is declared as array DIM 128 and with a Network address number 229 in the dictionary window
336. ie Make Project Toole Debug Optons Help S HS HEt Zxr oh zee Begin fA AP Connecting M 7000 ST1 Scaling Alto Eng Value Begin LD1 Ladder Diagram User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 15 Analog input Table of M 7017RC 20 mA type type code 16 D 32768 to 32767 4 to 20 mA type type code 16 7 0 to 32767 If the input sensor type is 4 to 20 mA it is better to set M 7017RC as 20 mA type It is not good to set M 7017RC as 4 to 20 mA type The reason is when the sensor is broken the analog input of M7017RC 0 7 will be near to 0 If setting M 7017RC s range type as 4 to 20 mA type the value near 0 can mean 4 mA and also can mean sensor broken So no way to distinguish them However if setting M 7017RC as 20 mA type the value near 0 only means sensor broken if the communication of M 7017RC is well Because if sensor is well the input is 4 to 20 mA value should be 6553 to 32767 Value near 0 means sensor broken if the communication of M 7017RC is well For safe reason please set M 7017RC as 20 mA type So you can say if the value of M7017RC 0 7 lt 5000 or lt 4000 then it means sensor broken One Ladder program Read 6 words from Slave 1 M 7O00 Address 1 using code 4 starting Modbus ADDR Mo is 0 Please seth fOT SRO s range to 20 mA by OCOM utility iype code D comm okt FOTFRO O POF RE A FOUFROE 2Z OTF RO S fOUFRE
337. ile is in CompactFlash File Web HMI support only in CompactFlash Temp HTTP Data Please refer to Chapter 11 2 Whmi_08 demo Operation state message Len is 255 init as No Action now addr as 41 Hex is 29 Len is 255 internal use User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 48 I O Connection ow SaGRAF WHHI 12 I O connection File Edit Tools Options Help PBenl ese Rl S elle EJ i_8024 t i_8017h elelee a bua ref 8024 sae CHT rang 33 se CH rang 33 cae CHS rang 33 soe CHA rang 33 1802 4 0 180241 18024 2 4 i6024 3 Kal om SaGRAF WHMI 12 I O connection File Edit Tools Options Help B a gt SPrn tl RK amp Lo rm i_8024 EJ i_80i7h Peo PP Pp ss Ss a aa lol lao o foot den fe food dro fo ia mn User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 mj ref 8017 cous CHT rang 6 cous CH rang 6 sms CHS rang 6 smut CH4 rang 6 cous CH5 rang 6 cos CHE rang 6 sae CHF rang 6 cous CHG rang 6 coe Noise Filter Max 32 66 coe Noise Filter Min 32767 soe Sample Number 1 O x O x 1801 7H O variable array Dim 8 i801 FH 1 variable array Dim 3 1801 7H 2 variable array Dim 8 4 801 FH 3 variable array Dim 3 1801 7H 4 C variable array Dim 8 6 i801 HIS t variable array Dim 8 1801 7H 6 var
338. in serval separate PLC scans STEP1 0 set step as 0 at the beginning of saving Tstop T1 T1 T Os Create a new file Filel F_creat File_namel if Filel 0 then Can not create file Msg1 Create File File_nam1 Error else User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 76 Because saving lots of data to file take lots of PLC scan time we are not going to 8 going save all data in a single PLC scan We will save it in serval separate PLC scans Msg Please wait Saving data to file File_namel save_filel True set as True to start saving RAM disk file save_cntl 0 from 0 to total_recordl 1 end_if end_if end_if end_if Because saving lots of data to file take lots of PLC scan time we are not going to save all data in a single PLC scan We will save it in serval separate PLC scans save records to a RAM disk file in serval separate PLC scans if save _filel then for 112 0 to50 do we limit one PLC scan can save max 50 records if save_cntl lt total record1 then stri init strl as empty string for ii 0 to NUM CH 1 do delimiter is lt TAB gt character stri str1 Rea_Str2 Int_real ARread 1 NUM_CH save_cnt1 ii 3 09 end_for stri str1 0D 0A add lt CR gt lt LF gt at the end of each row TMP F_writ_s Filel str1 save_cntl save
339. in this demo Push4Key Parallel D I counter demo 2 at slot O Refer to section 3 8 Demo_53 Not retained 1 8056 ot retaine a Modbus Master Demo 54b Modbus Slave PWM I O demo 2 Refer to section 3 7 DI counters using DI_CNT 8xx7 8051 Refer to section 3 8 Demo 61 Do somethig when DI signal happens Demo 70 med gt to COM3 when alarm 1 to 8 happens Access to variables Recording I 8017H s Ch 1 to Ch 4 voltage input in S 256 512 in I 8437 80 or I 8837 80 The sampling time is one record every 0 05 1 8024 second The record period is to 10 minutes Then PC can download I 8017H this record and display it as a trend curve diagram by M S Excel Demo_72 Connecting I 7018z and I 7188EGD to get 6 channels of 4 to 20 mA input and 4 channles of Thermo couple temperature I 7018Z input And then also display the value on PC by VB 6 0 program NOTE Demo_18 uses PID_AL which is provided by CJ International for evaluation Please refer to CD Napdos isagraf 8000 english_manu PID_AL ComplexPIDalgorithm implementation htm Demo 71 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 8 WP 8xx7 example program The Soft GRAF Studio software listed in the FAQ 146 is more useful than the way listed in the FAQ 131 WP 8xx7 CD ROM napdos isagraf wp 8xx7 demo or ftp ftp 1cpdas com pub cd winpac 8xx 7 napdos isagraf wp 8xx 7 demo Project Description T O used name WP 8xx7 ronan it
340. ined in Section 1 2 Installing The ICP DAS Utilities For ISaGRAF Please visit below Web site to get more information about I 8K and I 87K I O boards http www icpdas com products PAC 8000 8000_IO modules htm The following I 8K parallel I O can be used in slot O 7 Note The I O boards are divided into low profile and high profile I O and the name with W is high profile version For example the I 87057 is low profile I O the I 87057W is high profile I O The 1P 8xx7 WP 8xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 VP 2117 and VP 25W7 23W7 only support high profile I O plug in the slot 0 7 If using low profile I O in these PAC it may cause communication error retain variables exception or incorrect I O behavior I 8K parallel I O boards can be plug in PAC s slot O through slot 7 and slot 1 through slot 7 of XP 8xx7 CE6 XP 8xx7 Atom CE6 controller The I 87K4 I 87K5 I 87K8 I 87K9 RU 87P4 and RU 87P8 expansion unit supports only I 87K serial I O moduls better to use high profile modules They don t support I 8K parallel I O modules I 8037W I 8040W I 8040PW I 8041W I 8042W I 8046W I 8050W I 8051W I 8052W I 8053PW I 8054W I 8055W I 8056W I 8057W I 8058W I 8060W I 8063W I 8064W I 8068W I 8069W Analog Input V mA I 8017HW 8 Ch Differential 16 Ch Single end iP 8xx7 max IJ 8017HW Sample rate is about 125Hz 8 Ch 62 Hz 16 Ch WP 8xx7 XP 8xx7 CE6 VP 25W7 max I 8017HW Sample rate is about 200H
341. ing is 3 Datal_ Message The email data 1 Max 255 characters For ex Pressure 1 is too high Please check it soon Data2_ Message The email data 2 Max 255 characters More message behind the Datal_ For ex More message Attach_ Message The attached file name or file ID if it exists It depends on controller Please give empty messge if no attached file used WP 8xx7 WP 5xx7 amp W 8xx7 The file name can be Max 64 characters and it must store in the Email ETH folder For ex Email_ ETH A1 txt UPAC 7186EG The file must store in the X 607 X 608 memory iPAC 8447 8847 The file must store in the built in battery SRAM in the backplane the valid value is 1 2 8 the number is the file ID No set by the S_FL_AVL function refer to section 10 3 or appendix A 4 The max attached file size are listed as following Wincon 8xx 7 2MB 1PAC 8447 8847 488 KB uPAC 7186EG X607 112 KB uPAC 7186EG X608 488 KB Return Q_ Integer 1 Ok then start sending email lt 0 error 1 Busy The earier email is still sending 2 The first Receiver No Start_ is empty or error 3 Mail server 1 is empty or error 4 Sender is empty or error 5 Start_ value less than 1 or larger than 10 6 Subject_ exceeds 128 characters 7 Email system is not active yet Please use mail_set to set at leaset one receiver email box address one mail se
342. integer stored in LONGI variable a T N2_ Na Na E int_real MSL Long Real NE NF Ne No NiD SLAVE_ 1000 is the COM Port No SLAVE_ 1000 is the Net ID of device Here 4001 means using COM4 device ID 1 RI Modbus Example Function 4 Mbus_n_r The following example the Mbus_n_r function block is reading eight 8 words from a slave Modbus device with a NET ID address of 2 the Modbus address starts from 1 In this example the results of A1 contains the value of the Modbus address 1 A2 equals the value of Modbus address 2 etc through A8 which equals the value of the Modbus address 8 The value of Statl is connected to the output coil and if the operation is successful Stat1 will be true otherwise the value of Stat1 will be false MBJS N F stati 2 M1 At M2 A2 ie SLAVE_ 1000 is the COM Port No Naa SLAVE_ 1000 is the Net ID of device MS_ AS Here 2002 means using COM2 device ID 2 MHB_ AB i AT User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 8 8 Modbus Example Function 5 Mbus_n_w Below example of the Mbus_n_w function block is writing three 3 words to a slave Modbus device with a NET ID address of 1 and the Modbus address is starting from 16 201 513 The Mbus_n_w function will only write when the ACTION_ line is true In this example when the ACT1 line is True the value of Al will be written to the value of Modbus
343. ion The USB port for the mouse device of the XP 8xx7 CE6 is more efficient than the WP 8xx7 and VP 2xW 7 The WP 8x37 supports 2 USB Port the WP 8x47 supports 1 USB Port I 8x17 8x37 80 equip with 256 S512 uPAC 7186EG I 7188EG XG equip with X607 128K X608 512K can support up to 1024 retained variables The data date amp time can also be stored in it uPAC 7186EG has to use an extra X607 X608 battery backup SRAM expansion card for sending E mail with an attached file or it can only send E mail without attached file If the cable of one Ethernet port is broken or damaged the PC HMI can communicate with the other Ethernet port by Modbus TCP IP protocol Please plug one I 8135W in VP 25W7 23W7 to enable the 2 Ethernet port The Mbus_xr and Mbus_xr1 can read max 120 words or 60 long integers or 60 real values Please refer to www icpdas com gt FAQ gt Software gt ISaGRAF gt FAQ 101 for more information To support FRnet I O in uPAC 7186EG please insert one FX 016 in it VP 2xW7 amp VP 2117 support Max 3 pcs of I 8172W Max ch 768 DI amp 768 DO iP 8xx7 support Max 4 pcs of I 8172W Max ch 1024 DI amp 1024 DO WP 8x47 amp WP 8x37 support Max 8 pcs of I 8172W Max ch 2048 DI amp 2048 DO XP 8xx7 CE6 W 8x47 8x37 support Max 7 pcs of I 8172W Max ch 1792 DI amp 1792 DO XP 8xx7 CE6 uPAC 5xx7 uPAC 7186EG 1P 8xx7 WP 8x47 WP 8x37 VP 25W7 23W7 and W 8xx7 supports the I 7530 RS 232 to
344. ion of 3 37 Please visit http www icpdas com products PAC 8000 sagraf link htm for new released driver And please also visit http www icpdas com products PAC 1 8000 isagraf htm to download the ICP DAS Utilities For ISaGRAF zip to remove it and restore it to your SaGRAF installed in PC Then you will find IO connection Tep Clie amp c function Tcp send amp Tep recv PC TCPIIP Client TCP IP Server devices Wincon 8x47 8x46 Wincon 8x37 18x36 Note The WP 8xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 VP 25W7 23W7 support the TCP IP client function The ISaGRAF demo program is Wdemo_32 pia amp Wdemo_33 pia amp Wdemo_60 pia It can be download at ftp ftp 1cpdas com pub cd wincon_isagratf napdos isagrat wincon demo Note The remote PC or device must support the TCP IP Server function for connecting the TCP IP Client W 8xx7 esses Useful Application Please refer to www icpdas com FAQ Software ISaGRAF 064 for demo program W 8347 and W 8747 can use its TCP IP Client to auto report acquisition data or control data to local or remote Internet PC HMI The PC HMI can send back control commands or time synchronization command to the WinCon after receiving the data from WinCon The advantage is every WinCon in different location doesn t need a fixed Internet IP we PC HMI w ae k i J Gateway server in ISP company Gateway server
345. iples of 2 Return Q boolean TRUE Ok FALSE wrong input parameters too many PWM outputs been enabled or the associate output channel is not found Example I 8xx7 iP 8xx7 demo_63 W 8xx7 Wdemo_22 PWM_en2 Enable PWM to output a given number of pulse Parameters SLOT_ integer Which slot 0 7 CH_ integer Which channel 1 32 OFF _ integer Off time scale is Ims ON_ integer On time scale is 1 ms I 8xx7 I 7188EG XG uPAC 7186EG uPAC 5xx7 1P 8xx7 1 32 767 WP 8xx7 WP 5xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 VP 25W7 2 32766 it must be set as multiples of 2 NUM _ integer number of pulse to output 1 2 147 483 647 If gives a negative value to NUM_ for ex 1 it will ouput indefinitely until pwm_dis been called Return Q_ boolean TRUE Ok FALSE wrong parameters too many PWM outputs been enable or the associate output channel is not found _ LJ L OFF i ON one pulse PWM output curve Note 1 Every time the PWM_en or PWM_en2 is called it will reset its internal tick to 0 and re start ticking to OFF ON OFF ON 2 If the given number of pulse of pwm_en2 is reached it will stop amp disable PWM auomatically Calling PWM_dis for pwm_en2 is not necessary PWM_sts can be used to test if pwm_en2 reaches its given number of pulse or not Max 8 output channels can call PWM_en PWM_en2 pwm_ON pwm_OFFE at one controller 5 Do not enable the channel that is already enabled
346. ir content is similar but unlike the WinCon CD Moreover these controllers WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 and VP 25W7 VP 23W7 do not use this path CompactFlash Temp HTTP WebHMl The WP 8xx7 WP 5xx7 and VP 25W7 VP 23W7 use the path Micro_SD Temp HTTP WebHMI the XP 8xx7 CE6 XP 8xx7 Atom CE6 use the path System_Disk Temp HTTP WebHMI For more information please refer to the website WP 8xx7 setup_web_hmi_demo pdf ftp ftp icpdas com pub cd winpac 8xx7 napdos isagraf wp 8xx7 wp_webhmi_demo VP 25W7 VP 23W7 setup web hmi demo pdf ftp ftp icpdas com pub cd vp 25w7 23w7 napdos isagraf vp 25w7 23w7 vp webhmi demo AJ XP 8xx7 CE6 xpce6 setup web hmi demo pdf ftp ftp icpdas com pub cd xp 8xx7 ce6 napdos isagraf x p 8xx7 ce6 xpce6 webhmi demo N This demo is Whmi_12 pia it can only be used for WinCon 8xx7 8xx6 with driver version 3 36 or later New driver http www icpdas com products PAC 8000 sagraf link htm The demo program is stored in W 8xx7 CD ROM napdos isagraf wincon demo or ftp ftp icpdas com pub cd wincon_isagrat napdos isagrat wincon demo The W 8xx7 provides three ways to record the data One way is to read write the file in the RAM Disk like this example and this applies to the application that its mininum sampling time is 40 ms the fastest 25Hz The files in the RAM Disk will disappear after power off Another way is to put the recording data in th
347. is 10 The 10 REAL value Gi Ti nternal Index of for loops User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 15 ST program if RE LOAD then Read file once if RE LOAD is TRUE RE LOAD FALSE Filel f_wopen File_namel Open file in Read amp Write mode if Filel 0 then 0 open file fail Msg1 Can not Open file File_namel return Cannot open file just exit this ST program end_if for ii 0 to 9 do Total 10 rows if f_eof Filel TRUE then test if reaches the End Of File Msg1 Data number is not enough in File_namel Exit Exit this for loops end_if strl fm_read Filel read one string in the File TMP F str_real str1 convert string to a REAL value if TMP F 1 23E 20 then if returns 1 23E 20 it means format error Msg1 The Msg ii 1 th Data format is not correct exit Exit this for loops end_if F_VAL ii TMP F Read amp Convert Ok Store value to F_VALI O0 9 end_for TMP f_close Filel always close File after its operation If ii 10 then All data is succefully read and converted 10 rows Msg Read File_namel OK end_if end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 16 10 5 2 Wpdmo_54 Read 20 REAL values from a file Total 4 rows each contains 5 REAL values The Wpdmo_54
348. is will ensure the host watchdog of I 7000 and I 87K output modules to work correctly For example if you don t wire any terminal resistor and enable the host watchdog function at bus7000b Section 6 2 the host_watchdog parameter set as 1 when you just unplug the I 7000 s DATA pin keep Data pin connected with the controller you will see the watchdog doesn t work in this I 7000 If you wire a resistor about 125 ohms between the controller s RS 485 D and D pin if you unplug any one of I 7000 s Data or Data pin the watchdog will work correctly User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 1 Step 1 Hardware connection Please connect the PC and I 7000 module to configure it f _ z a Z te P A K AN aT LA HOST COMPUTER POWER SUPPLY 10 4 30VDC Note For linking I 7000 and I 87xxx I O module you have to prepare an I 7520R or I 7520 RS 232 RS 485 converter or USB to RS 485 converter such as tM 7561 I 7561 The ICP DAS I 7520 I 7520R tM 7561 I 7561 high functionality converter with a Self turner which can auto change the baud rate http www icpdas com products Industrial communication_module communication_list htm For other brands the RS 232 RS 485 converter will use one specific baud rate Without a Self turner every time the baud rate changed you must manually configure it and it s really inconvenient Step
349. isagraf_c htm gt FAQ 050 Note Each RS 485 port for IsaGRAF PAC can connect up to 32 M 7000 Modules For more connection it requires a RS 485 repeater I 75 10 8 4 Linking The EKAN Modview LED Display The RS 485 port of EKAN Modview LED display support Modbus RTU protocol The ISaGRAF PAC can be configured as Modbus RTU Master to connect with them and to control the data you want to display For more information amd demo program please refer to www icpdas com FAQ Software ISaGRAF FAQ045 or http www icpdas com products HM I led ekan htm EKAN WE122 Modbus RTU protocol H 412 6mm i RS 485 2 wire i 7188EGIXG onm 75 93 j i i 796 36 mm j EKAN WE124 i 8437 8837 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 8 10 Chapter 9 Commonly Used ISaGRAF Utilities NOTE The I 8xx7 is the abbreviation for the I 8417 I 8437 80 I 8817 and I 8837 80 controllers The WP 8xx7 is the abbreviation for the WP 8147 8447 8847 and WP 8137 8437 8837 controllers The WP 5xx7 is the abbreviation for the WP 5147 5147 OD controllers The XP 8xx7 CE6 is the abbreviation for the XP 8047 CE6 XP 8347 CE6 XP 8747 CE6 controllers The XP 8xx7 Atom CE6 is the abbreviation for the XP 8147 Atom CE6 XP 8347 Atom CE6 XP 8747 Atom CE6 controllers The 1P 8xx7 is the abbreviation for the 1P 8447 1P 8847 controllers The following chapter describes many useful features and utilities of the IsSaGRAF Wor
350. isconnect the modem_link when you finish your work don t waste the money to the telecom company gt tenar UCT bees alaiz Gut ye O A RESI slinwe g0 turent g maximem G aovesitews lil Bh Git Breet iro Gwo iki he Os me t p Bou 2 un lt creatian p CE ertewe ths m emoa 723 es a E het oer x n PENN etj tyi Cor mizi bind emo_30 gt y yee re mha frre 8 Om wn gare tn MO mas TE m istiman L SLART HNI TS 0645 avs TEHA la TH MD NAS FF Obs 1288 TF Ob ya FS 2 rUevel Y gt myz Tia T 0M Twa FE 05 45 pais E nna TE 104 i As FFH STATION NAME Tiger rae PP OFO PHONE NUMBER 227578673 lt lt Ready for ISsGAAI May erence gt i ice abti ARCA D thor LELTE ETT ELIET ELLI m Date of cre Versonns lt MERNASTARAARENRNARE Dencriptin DISCONNECT Mirminmizn Window D Temp oO WINDOWS Ls EEUE x IERRA y Cicin Me ay Haoi woa SE aRar Pet CA BFRAF TESTI amorar teri sicr pason aE Frau ee em User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 13 6 For windows 95 amp 98 users Given the correct target phone No and the correct COM port of your PC which will dial the modem 6G 99 If you add a character indise the phone No ICP DAS Modem Link Copyright ICP D E It will wait one second and then dial the rest No For ex Given No as 9 22570001 will dial 9 first then wait 2 seconds an
351. it of limit switch input Initially the limit switch inputs of I 8091 board are normal open N O the I 8091 board will automatic protect when limit switch pin connect to EXT_GND The user can use the command M_s_ne card_NO_ 1 to let those limit switch input as normal close condition at the beginning of the user s program EXT_VCC 12V 24V O ORG1 LS11 LS14 ORG2 LS21 LS24 18091 EMG Fig 10 internal circuit of limit switch input pin User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 10 Example of connection 5V O n DPE V l 5 een CW_PULSE1 CW 1 a ES Tet Z CCW 2 X Ka 5V O NE e HOLD1 HOLD l re gy fc a GND V DGND FAN OUT TYPE VEXTA DRIVER Fig 11 fan out type driver VEXTA s motor driver DAND SINK TYPE DRIVER Fig 12 Sink type driver User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 11 CN2 CN2 DB25M 90 DB25M 90 10 D 1B 15 CCW DIRI 3 1C 16 HOLD 4 4 lo EGND 17 5 2A 18 EXT VCC 6 EXT_VCC O 2B 9 a ee 7 12V 24V PHOME1 gt eet PHOME2 gt 3 ray 3 PLS11 L gt EGND 21 PLs21 __ gt 9 9 22 A 22 10 3B 10 23 B 23 11 11 PLS14 L gt 53 OA PLS24 gt 19 aay 12 PEMG __ gt 35 ND 25 EXT GND ND 13 S8091 card S8090 card Fig 13 The connection between I 8090 and I 8091 for function testing or pulse feedback by I 8090 encoder card User s Manual O
352. kbench programming environment These features and utilities make programming an ISaGRAF project quick and easy This chapter in no way contains all of the features and utilities available with the ISaGRAF Workbench program For more details and information about all the features the IsSaGRAF Workbench program has to offer consult the ISaGRAF USER s GUIDE manual which can be found from the CD ROM of the ISaGRAF workbench Its file name is either ISaGRAF pdf or ISaGRAF doc User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 1 9 1 Creating An ISaGRAF Project Groups A very useful feature of the IsaGRAF program is the ability to organize numerous programs into projects The Creating Projects feature assists an ISaGRAF programmer who must create and maintain many different ISaGRAF programs for different application projects 1SaGRAF Project Management 3 loj xj File Edit Project Tools Options Help Ae den ws tpl DemoPgm 2 fbd exam Example FAD Project Select project group st_exam Example ST Project pa il exam Example IL Project sfc exam Example SFC Project Project groups x Default c isawiniapl Samples c lisavinismp DemoPgm c isayyinidemopgm Sub dir i E Path _c isawin F actory xi Default csavyviniapl Select cisavinismp Close h If you want to delete an existing project group simply use the Windows Explorer to locate the ISaGRAF
353. l times Then upload the file stored in the SRAM fel PDAS UDloader file resident location Upload aE PRAM MODULE 512 File ID File Hame 1 20l Upload 1 2 Mot Used 1 1 AA Upload 2 a Nat Used 1 al 1 Upload 2 ic i Current available Upload 4 3 OL i file location Click here to set File name amp Not Used i location PC NotUed fl if of H oT Not Used 5 5 5 5l a Upload communication parameters Upload DestMation Folde i CDocuments and SettingsAdministrator st AU Dloader Browse set Load File Download User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 10 10 3 3 Download data to the SRAM For PC to download data to the volatile SRAM of the ISaGRAF controllers The below functions can be used Please refer to Appendix A amp demo_44 S_DL_EN S_DL_DIS S_DL_RST S_DL_STS Please call S_ DL _EN to enable it The Controller accepts only the binary format for String Byte Word Int amp Real Byte OQ 255 1 byte Word 32768 32767 2 byte low bye high byte Int 32 bit signed integer 4 byte lowest 2nd 3rd highest Real 32 bit float 4 byte lowest 2nd 3rd highest String up to 255 bytes If using the UDloader exe to download data to the volatile SRAM the data to be downloaded should be edited as a text file Its format should follow the below rules The first row should be a
354. l Author ICP DAS USA Inc EB Date of creation 12 24 2001 Yersion number 1 ISaGRAF 3 41 Description Example Function Block Diagram Program alol SaGRAF FBD_EXAM Programs Fie Make Project Tools Debug Options Help BD Bese qE msx mk aps Tree new oran a Program x esessssssssssseseesssssssssssssssessesssssssesssssssssst Language Style Begin Main program Cancel User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 44 Declaring The Variables For our example FBD program we are going to declare three variables The variables to be used are OUTI1 OUT2 and an integer variable called A1 Declaring variables for the FBD program is like declaring variables for the LD program Refer to Section 2 1 1 3 Declaring The Variables to review the variable declaration process Editing The FBD Program To create and edit the example FBD program double click on word MAIN in the ISaGRAF Programs window and then click on the Insert Function Block icon as shown below ISaGRAF FBD_EXAM Programs 0 x File Make Project Tools Debug Options Help A HSU OB ZX Oe ABs File Edit Tools Options Help Da XDA MS xO sd QQ 6 v Rag wo 23 Fh amp boolean AND Insert function block Move the cursor to approximately the middle of the SaGRAF FBD LD Program window and click the mouse one time to add the first function block Next double click on the block to s
355. l Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 10 To declare the Integer pulse_No variable used in this example program click on the Integers Reals tab in the setup screen Double click on the colored area and enter the Name as pulse_No set the Attributes to Internal the Format to Integer and the Initial Value to 0 then click on the Store button Salt Rak sSIMIPLELD Global inte gers reals File Edit Tools Option Help OOO HE KES R 2 Integer Real Variable Hame pulse No Y Network Address PY ee Comment i Internal nae Slow R Cancel C Output Next x Constant Ta Previous BaD RAF SIMPLELD Global integers reals Hml E File Edit Tools Option Help OOO HE KES RS Booleans Integers Reals imers Messages FB instances Defined words Attrib Addr Comment internal integer OOO Hulse Mo 0000 internal integer Once all of the variable characteristics have been properly setup click on save and then click on X at the top right of the setup window to close the variable dictionary for this example project User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 11 2 1 1 4 Creating The Example LD Program Once all of the variables have been properly declared you are now ready to create the example LD program To start this process click on the Create New Program icon and the New Program wi
356. l find the listl will automatically pop up when you open the debugger y SaGRAF TEST1 untitled List of variables File Edit Options Help DBA Sec Q Mame Comment CNTIO 100 CNT 1 101 send of list ISaGRAF TESTI Debugger File Control Tools Options Help Pull AST RUN ISaGRAF TESTI Programs f Workspace ati programi Move the lists to the right hand side ISaGRAF TESTI Programs File Make Project Toole Debug Optons Help D meal Oat zxr om Zee Begin Begin ST1 Structured Text User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 67 2 6 1 Assign Network Address No To Variable Array To assign Modbus Network address number that 1s used to exchange the data with the SCADA or HMI please refer to chapter 4 to the varable array Please assign the network address number to the first element For example No 1 assigned to CNT O And the using S_ MB_ADR function as below Inte zer Real Fariable x Name Network Address Comment NT Please assign the first number for the first element Uri please refer to section 4 1 for more information The number enter here is always in Hex format Attributes Format Internal Integer standard Input l Real Cancel C Qutput ia F Constant itia vale 0 Retain And then using S_MB_ADR to assign the other network ad
357. l is WP 8xx7 WP 5xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 iP 8xx7 or W 8x47 dual LAN and both LAN ports are enabled the controller will automatically switch to the other Ethernet port to send email if one is broken or damaged 7 If the sending email has one file attached this file must be stored or copied to the correct file path before it 1s sent WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 VP 25W7 WinCon 8xx7 file should be stored in the path of Email_ETHY for ex the Email_ETH A1 txt For your reference usage To copy the file into the path Email_ETH TMP F_copy Micro_SD B9 jpg Email_ETH B9 jpg After sending the email you can delete the file TMP F_delete Email_ETH B9 jpg iPAC 8447 8847 amp uPAC 7186EG uPAC 5xx7 file should be stored in the battery backup memory by the S_xxx functions like the s_ fl_int s_fl_avl s_m_r please refer to section 10 3 and appendix A 4 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 12 2 Please make sure if your ISaGRAF software in PC has installed the IsaGRAF c function of Mail snd Mail set and R_mb_ adr If not installed please visit http www icpdas com fag isagraf htm FAQ 067 076 to download the Demo program Then restore Mail snd uia Mail set uia and R_mb_adr uia to your ISaGRAF in PC by below steps A 18aGRAF Project Management O x
358. le eS wm Piece Adress Bau is Searching status COM Port p 1 Address User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 E Configuration fot 7050 Module Terson B104 Digital Output 0 O00 L56 CH 0 MB CH CETT Te T Power On Yalue of DO Sate Value of DO L56 CH 0 MSE CH 6 M O E TT yy ICP DAS 6 4 7050 gt Setting Communication Parameters OE x Then follow the steps to check the new setting pe i T Baudrate Checksum or Protocol OE Please do following steps tef i Disconnect INIT pin from GND ping or adjust the dipewitch to Normal sade etepe Power off then Power on the module steps Search the module again Note Remember to remove the connection of I 7000 s INIT and GND after the setting is well configured Then recycle its power For I 87K I O modules remember to switch the related Dip to OFF then recycle its power The I O modules cannot be used under the INIT state IMPORTANT NOTES regarding remote I 7000 amp I 87xxx Modules One I 8xx7 I 7188EG XG uPAC 7186EG uPAC 5xx7 1P 8xx7 and VP 2117 controller system can link up to a maximum of 64 pcs of I 7000 and I 87xxx modules However 255 pcs for WP 8xx7 WP 5xx7 X P 8xx7 Atom CE6 X P 8xx7 CE6 VP 25W7 23W7 It recommends on maximum 40 linked modules for one controller system Each I 7000 and I 87xxx module MUST have it s own unique address to properly link
359. le Total 4 rows each contains 5 REAL values 10 17 10 5 3 Wpdmo_55 Read 20 Integer values from a file Total 2 rows each contains 10 Integer values 10 19 10 5 4 Wpdmo_56 Retain values of 1 to 255 Real variable in CompactFlash card ccccccceeeceeeeeeeeeeeeeeeees 10 21 10 5 5 Record I 8017H s Ch 1 to Ch 4 voltage input in a user allocated RAM memory in the ISaGRAF PAC The sampling time is one record every 0 01 second The record period is to 10 minutes Then PC can download this record and display it as a trend curve diagram by M S Excel cccccccccccssssssssseeeeeeeeeeeeeeeeeeeaeaeeenees 10 31 106 CONTROLLER FAULT DE TBC HON mrocot a a a 10 32 CHAPTER 11 ISAGRAF PROGRAMMING EXAMPLES amp FAQ ssssessssssssssssessssssccsssscscssscescsesscssssessssssssseee 11 1 11 1 INSTALLING THE ISAGRAF PROGRAMMING EXAMPLES sssssesssssseeeeeessssssssssseserrreeeeeessssssssssseteeeeeeeseerssssssseerrreees 11 1 UZ ISAGRAF DEMO EXAMPEE FILES opereren E E EE E ES E E 11 3 DESCRIPTION OF SOME DEMO EXAMPLES renade aa E EEE EE AE EEEa 11 15 11 3 0 Demo_01A amp Demo_03 Do something at specific time cccccccecceeeececceeceeeeesseeeeeeeeeeeeeeeeeeeaaaaaeeeesees 11 15 HarD 0Sa Stop And Reset TI sea qacntesd en tanapedicadansinuan ices duleti eirounidcedeateescnoatenle 11 19 1132 Demo 17 R W Integer Value Fron To Th BE PROM ssi ccs cat arsccanciscvinuas a a O RE 11 21 11 3 3 Demo_29 S
360. le end input by a jumper For better usage you can set the proper Range setting for each channel If it set as 10 Ch you can measure 0 20 mA 4 20 mA 20 mA without an external resistor of 125 ohms just switch the Jumper When using I 87017W I 87019ZW I 87017DW to measure the Current it requires an external resistor of 125 ohms 2 The I 87018ZW or I 87019ZW is better than I 87018 and I 87018W in industrial application and more precise measured values 3 2 1 Setting range parameter and conversion functions for analog IO board The method to connect analog type I O boards to the controller system is very similar to that of connecting digital I O boards The ONE main difference is that you MUST define one parameter that defines the range for the analog board so it will operate as expected we ISaGRAF IO4LD 1 0 connection Ae ps File Edit Tools Options Help Click on here to a PBA 6 S see the on line o Jmosi A See rs DIS ne am Tange 8 DOS CT a _8040 32 CH Isolated DI C DOS ep 187017 t i 87024 L4 J Cs SS x DTT i_87017 8 CH Analog Input i i 87017 8 channel Analog Input Module Serial 170 Input type mV YV mA with external resistor parameters rang 16 bit resolution aef anv gt ov gt 10 32768 gt 0 32767 modbus val 8000 gt 0000 gt 7FFF 9 SY gt WV gt 5V To
361. lease do not always keep this file open Please close it later or the new modified data will not be saved That is because the file is open write operation is not allowed 2 Recycle the power of WP 8xx7 You will see the value keep at the last modified value when WinCon is boot up well 3 Edit a data56 txt file on PC as below by NotePad utility total 17 data 11 22 33 44 55 6 66 7 77 8 88 9 99 10 01 0 01 0 02 0 03 0 04 0 05 0 06 0 07 Then please download this data56 txt file to WP 8xx7 s System_Disk path by ftp utility Then set RE LOAD to become TRUE on ISaGRAF Spy list window You will see the related variable value is updated User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 30 10 5 5 Record I 8017H s Ch 1 to Ch 4 voltage input in a user allocated RAM memory in the ISaGRAF PAC The sampling time is one record every 0 01 second The record period is 1 to 10 minutes Then PC can download this record and display it as a trend curve diagram by M S Excel Please refer to Chapter 11 3 6 the fastest sampling rate is 25 Hz Please refer to Chapter 1 1 3 10 the fastest sampling rate is 100 Hz User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 31 10 6 Controller Fault Detection There is some event may cause controller fault happens For example value divided by zero or reading a floating point value from EEPROM or S256 or file wh
362. let INIT set to FALSE at the end of the first scan cycle In other word INIT will indicate this project is running in the first scan cycle or not TRUE first scan cycle FALSE other cycles User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 25 2 1 2 Connecting The I O The ISaGRAF Workbench software program is an open programming system This allows the user to create an ISaGRAF program that can operate a large number of different PLC controller systems It 1s the responsibility of the PLC hardware manufacturer to embed the ISaGRAF driver in their respective controller for the IsaGRAF program to operate properly The ICP DAS series ISaGRAF controllers have the ISaGRAF driver embedded creating a powerful and flexible industrial controller system Now that you have created the IsSaGRAF example program now you must connect the I O to the controller system A useful feature of the IsaGRAF controller system is that you can run program we have created WITHOUT having any I O boards plugged into the controller system The four pushbuttons on the I 8xx7 1P 8xx7 controller system can be used as four digital inputs and the three left LED s above the control panel pushbuttons can be used as outputs ISaGRAF SIMPLELD Programs l0j x Fie Make Project Took Debug Options Hep D MMSI O88 xXbr OH ABSA ISaGRAF SIMPLELD 1 0 connection Bj x File Edt Took Options Help pPsprsa L FA G 4
363. ll frames are sent reset FRAME NO to 0 M2 False and set M2 to FALSE to stop to generate M1 else FRAME _ NO FRAME _ NO 1 for next cycle end_if dif If some frames have not been sent yet plus FRAME NO by 1 to end_if send next frame when next M1 is generated User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 26 ST program end init Set INIT to False so that INIT INIT FALSE is only TRUE at the first scan cycle since it is declared with the initial value TRUE How to test Plug one I 87017 in the slot O of the I 8xx7 controller Download Demo_29 to the controller Prepare a RS 232 cable to connect Com3 of the controller to Com1 of your PC There is one ultilty named ComTest exe located in the ICP DAS s CD ROM Copy it to your PC Napdos ISaGRAF some_utility Comtest exe or you may obtain it from below site ftp ftp icpdas com pub cd 8000cd napdos isagrat some_utility BR WN 5 Execute ComTest and select the parameter to COM1 9600 No parity 1 stop bit and then click on Open Com Com Baud Parity Stop Opin Com Cc l i OM 1 bal Joe 10 be No pariy 1 stop bit Clom Com em C Write O Return You will receive 10 frames coming from the target controller every 75 seconds User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11
364. ll occupy 4 bytes however V4 and Y V5 only occupy 1 word Lowest word in the Modbus transportation formate User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 6 To read long word value of V1 is to read 2 words by using modbus function 3 or 4 please refer to section 5 1 Modbus address 0000 is associate with network address 1 of the variable Read 2 words s v 03 QO o0 o0 02 crcH ercL Req SONS Ans Slv 03 04 WH vL vH_ vL ercH_ ercL Mo No A Highest word To write long word to V1 is to write 2 words by using modbus function 16 L Z iS slv 10 joo o0 00 02 04 vH vL VH vL jrcH ercL NL _ A N_A Ans stv 10 00 00 00 02 _ crcH JercL_ Highest word Req To read write float 4 bytes is very similar to read write long word The difference is the variable should be declared as Real type and the next network address No should not be assigned to any other variable Intever Feal Variable Attributes Cancel standard Internal lil C Input C Output Next C Constant Initial value 0 See Previous Extended There is much available HMI software on the market You must be noted whether it supports the Modbus protocol Just be careful to assign the correct network address on ISaGRAF User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 7 4 3 Using I 8xx7 As A Modbus I O Or A Modbus
365. lpine A Ls LL jjaja als Aaa eeel Create a change window Function Key as former method to change to Window No 10 and Labeled as BACK _ m EERE oe pej rer lel E ront 16 l fe al eeii Rinie P Eln 2 e ri l al a T od rme py od pe j i boon ji b 4 s iz rE A kA 14 r X 4 i g i ad et Le j r A User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 28 Click on Set Word then set Device Type as 4x 4x is for short integer 4L is for long integer set Device address to 10 BIN and Set style to Set Constant and Set value 100 And then select the prefered shape and set label to Set to 100 ED El Et Wew Ona Daw Barts Library ET Window Help 18 x Osim ASe alele lilt alala EE 2 alel i f aj galale Sales EE Kez Yei 2 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 29 Click on Numerical Data set Device Type to 4x 4x is for short integer 4L is for long integer Device address to 10 BIN Number of words to 1 No above Dec to 7 No below Decimal to 0 Input low to 32768 Input high to 32767 And then select the prefered Font E Bile Edit ew Ga aw res Window Help 16 x oleja IES ee 5 amp 2 n2 m Erro ala ale
366. lu fonti 16 El a 5 f aj valaa AHAA se fr Description Read address Device type Device address No of words Decimal Single float Hex Double float C Raw data display NO above Dec f H No below Dec Input low f 32768 Input high 32767 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 30 Now we are going to add one another Numerical Data with conversion Click on Numerical Data set Device Type to 4x Device address to 10 BIN Number of words to 1 No above Dec to 5 No below Decimal to 0 Input low to 32768 Input high to 32767 check Do conversion set engineering low to 10 engineering high to 10 Convert 32768 32767 to 10 10 And then select the prefered font EFasyBuilder EBFril Window 11 Window 011 EB Bile Edit View Option Draw Parts Library Tools Widow Help 16 x oea Hee Font 16 A amp Ea HEY __ EE a EEE General Numeric Font Read address BL Device type Device address Mo of words Create Numeric Data Object E x General me Font Display Decimal Hex C Binary C Mask i oe float C Double float C Raw data display Do conversion User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 00 A oles BBEm
367. m Note 1 Please refer to Getting Started Manual for each PAC to know how to enable the Modbus RTU Slave port All the ISaGRAF controllers support Modbus TCP IP Slave protocol at its Ethernet port 1 8417 8817 and iP 8xx7 s COM1 RS 232 and COM2 RS 485 default supports Modbus RTU Slave 1 8437 80 8837 80 s COM1 RS 232 default supports Modbus RTU Slave protocol I 7188EG XG amp uPAC 5xx7 uPAC 7186EG s COM1 default supports Modbus RTU Slave protocol WP 8xx7 WP 5xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 VP 25W7 and VP 23W7 default no support Modbus RTU Slave port But their Ethernet port has enabled the Modbus TCP IP Slave OW N EN Nn 4 1 Declaring Variable Addresses For Network Access To make data from an ISaGRAF controller system available to other software programs or HMI devices you must first declare the variable with a Network Address The variable must be declared with a network address number that is in the Modbus format Other software programs or HMI devices will access the controller information through these network addresses Note 1 The valid network addresses for an I 8xx7 I 8437 80 I 8837 80 I 7188EG XG VP 2117 uPAC 5xx7 uPAC 7186EG and iP 8xx7 controller system is from 1 to FFF in hexadecimal 1 4095 Network address 5001 to 8072 is for word and integer arrays please refer to Section 4 5 NO The valid network addresses for the WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7
368. m the I 8000 CD ROM napdos isagraf CO For example this demo project is inside group spotligh and the project name is demo_37 then copy CD ROM napdos isagraf ICO to c isawin spotligh demo_37 If the ICO folder is not found in your CD ROM Please download it from the below site ftp ftp icpdas com pub cd 8000cd napdos isagrat C Get into the Spotlight editor Click on Simulate then click on Spotlight to open spotlight editor SaGRAF DEMO_37 Programs E joj x Fie Make Project Tools Debug Optons Help D HSA Ae xr OM Aga Beal Eas st init HE Demo end init End SsGRAF DEMO 24 Debugger File Contol Toole Optons Help hoo G ARN RUN A SpotLight window will appear as below E lsaGRAF DEMO _34 untitled Spotlight Fie Edit n rt Options Help B 0Rea muereteeal s lt dette at User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 4 D Add boolean Icons Click on Boolean icon then set the associated Name as Button1 Caption as Name Align as Top and then set the prefered ico file to display with FALSE and TRUE and un check Command variable EIkaGRAF DEMO 34 untitled spotlight Fie Edit n rt Options Help 8 DO Bls I mp a xedean R a dg 2 Boolean icon Ttem style Click to set the ico file to display If ico files are not found please re
369. means set it as Modbus RTU Master port Mbus_asc means set it as Modbus ASCII Master port First open the SaGRAF I O Connections window and double click on a slot number higher than 7 and the Select Board Equipments window will open From the Library click on the Equipments choice and then click on the Mbus Modbus Master selection choose Mbus_asc for ASCII and then click on the OK to complete the installation For using multi ports of Modbus Master needs to link more Mbus or Mbus_asc function and the port_no parameter for each function must be different It depends on model number like table 1 in the former page ow SaGRAF TEST 1 0 connec ic n File Edit Tools Options Help A PBrmh tl FR amp Select board equipment j x bus7000 1 7000 10s on Com3 or COM 4 fbus_m lt New gt Set as Fieldbus Waster fbus_s lt New gt Set as Fieldbus slave Cancel ABE eleleleisele i 87063 Isolated 4 CH DI amp 4 CH DO Library master Set as Fieldbus Master mbus Modbus master on COM3 or COM4 slave Set as Fieldbus slave xana_io Analog I Os for simulation xboo_to Boolean I Os for simulation xmsgq_io Message I Os for simulation z C Boards Equipments The description of Mbus and Mbus_asc Parameter port_no It defines which COM port the Modbus devices will communicate with the controller The port_no
370. mo_03 pia Variables Wday System Wday 1 Monday 6 Saturday 7 Sunday Y M H Mn Sec 3600 x hour 60 x minute sec every day Operation action 1 Monday Saturday L1 L3 09 00 00 18 00 00 ON 2 Sunday L1 13 00 00 20 00 00 ON 3 Other time L1 L3 are all OFF User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 16 Ladder program get_time set system date when ACT rising trom FALSE ta TRUE ACT SYSDAT W OKT e E 2 ne set system time when ACT rising from FALSE to TRUE ACT SYSTIM vl OK m D gt I HH HH_ WI hata SEC get system date SYSDAT_R en ero ef get system time oo TMF en end HH_ MM User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 17 ST program control time_val 3600 hour 60 minute second calculate time in sec set as False at the beginning of this ST program L1 False L2 False L3 False Monday Saturday L1 L3 09 00 00 18 00 00 ON IF Wday gt 1 AND Wday lt 6 THEN IF time_val gt 32400 AND time_val lt 64800 THEN L1 True L2 True L3 True END _IF END _IF Sunday L1 13 00 00 20 00 00 ON IF Wday 7 THEN IF time_val gt 46800 AND time_val lt 72000 THEN L1 True END _IF END _IF User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 18 11 3 1 Demo_02 Start Stop And Reset Timer
371. mple below 5 x a 1SaGRAF FBD_EXAM 1 0 connection File Edit Tools Options Help SB PBeh tl FR S aj oo rel 10 OUT High Alarm ol OUT 2 Low Alarm z eHelelblel E o show3led ic User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 47 2 3 2 Simulating The FBD Program You can now run the Simulate on the example FBD program by clicking on the Simulate icon in the TSaGRAF Programs window ISaGRAF FBD_EXAM Programs 10 xi Fie Make Project Tools Debug Options Help Bill WELLE Example FBD Program Begin Main Function Block Diagram When you click on the Simulate icon the ISaGRAF Debugger window the ISaGRAF Debug Programs and the I O Simulator window will now open If you double click on MAIN in the TSaGRAF Debug Programs window the ISaGRAF FBD LD Program window will open showing the state of the program Notice that because the A1 variable is less than 2000 currently set to 1000 in the example below that the OUT2 output is currently true and the OUT1 output is false ISaGRAF FBD_EXAM Debugger RRA E3 _15aGRAF FBD_EXAM Debug programs M 3 File Control Tools Options Help File Project Tools Options Help yim oO Ae owe oH Begin Example FBD Program 1SaGRAF FBD_EXAM MAIN FBD LD Program File Options Help AHS QQ File Tools Options Help L At
372. n 3 2 I 87017W Range ID Electrical Values on the channel decimal hexadecimal Range 0 432767 8 default 10V Bo S00mVv 500mV mV f 500m Ce 150mv150mV_ mV 150m The long word defined in the Modbus protocol of ISaGRAF controllers is like a signed long integer which occupies 4 bytes and range from 2 147 483 648 8000 0000 in hexa to 2 147 483 647 7 FFF FFFF in hexa It is normally used to describe the value of internal integer variables declared on ISaGRAF workbench All integer variables declared in ISaGRAF are signed 32 bit format however the integer variable which assigned with a network address will only occupies 1 word 2 bytes in the Mudbus transportation format Since a long word occupies 2 words 4 bytes to R W long word through Modbus the network address assigned to the integer variable must follow rules as below SaGRAF SA Global tutegers reals V1 is assigned to a network address 1 File Edit Tools Options Help If the network address 2 is not Oe Hef J rg assigned to any other variable V1 will SCY OCCUPY a long Word 4 bytes in the Booleans Integers Reals Timers Messages FB instances Defined words Modbus transportation formate Hame Addr Comment g However if 2 is assigned to one V2 another variable V1 will only occupy Vi one word 2 bytes in the Modbus v4 transportation format Vo Y6 In this example V1 V2 V3 V6 V7 and Vi V8 wi
373. n variables or Boolean constants RULE 2 Each integer package must have an attached identification number ranging from 1 to 128 This means that there is a maximum of 128 integer packages that can be exchanged across an Fbus connection Each integer package contains eight 32 bit integer values The integer values can range from 2147483648 to 2147483647 The integer values in the integer package can be assigned and exchanged with either Internal Input or Output integer variables or integer constants Rule 3 Each identification number assigned to a Boolean package or an integer package can only be written to by one controller system across the Fbus Each controller system CANNOT write the same identification number for either a Boolean package or an integer package across the Fous WRITTING A PACKAGE IS NOT SHARED with the other controller systems across the Fbus network User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 1 In this example there are five I 8xx7 I 7188EG XG controller systems communicating through an Fbus network and the controller systems are named S1 S2 S3 S4 and S5 respectively If the S1 controller system attempts to write a Boolean package with an ID of 1 and an integer package with an ID of 1 across the Fbus the other four controllers CANNOT write either a Boolean package or an integer package with the same number However the other controller systems could write
374. nd Curve 1 Please download saGRAF project whea 12 to Wincen 6S54 fs 47 or W855 iala 4 Please phg 1 8024 at slot2 1 6017H at slot 3 and wire 1 8024 s voltage output Ch 1 to 4 to i S017H s Ch 1 to 4 Operation state No Action now Total record number If recording is fished you may click on Download record File to download it to your PO and save it Current record number Download recore File Please Enter Interval and Period value and then chek Go to start recordi 8017H s Ch 1 te Ch4 Interval 40 to 10000 milli second ey Period 1 te 103 minute eh HMI Sample e ASAE F During the recording period the Current record number value will count up If it reaches the value of Total record number it means recording is finished Then the ISaGRAF program will store these records to a RAM file automatically You can see the progress in Saving state If all done please click on Download record File to download this record file to your PC E Eea x FE Oo fee ea oa E 15 le gt 48 curvel js AAU J cript Script File 65 6 EB REB 10 0 0 103 Fayed ATF l ee A Ata ae iee AAAA BE ea AAU PE E z Men TE FERRE TEA User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 43 6 Then please open this record file curverl js on M S Excel EJ Microsoft Excel Bookl O x a BAE RE WAO IBAD Aw ILA UREA HED AH _ Reese Ct N f X WAS S
375. ndow will appear Enter the Name as LD1 the name of our example program next click on the Language scroll button and select Quick LD Ladder Diagram and make sure the Style is set to Begin Main Program You can add any desired text to the Comment section for the LD program but it isn t required i SaGRAF SIMPLELD Programs a ol xj File Make Project Tools Debug Options Help SmS Go sXe mk RaR ereere New Program E xj AER EERE EEE EERE REESE EOE EE SESE EEE ESSE SEER ESESESESESEEESESEEESESEEESEESEEEESESESESESEESSSSESESESE RES EEE EE ES Comment Example LD Program Language Quick LD Ladder Diagram Style Begin Main program Cancel The LD1 program has now been created To open the LD1 program double click on the LD1 name ISaGRAF SIMPLELD Programs 5 x File Make Project Tools Debug Options Help D SM De Zxr mko Example LD Program Begin LD1 Ladder Diagram User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 12 2 1 1 5 Editing The Example LD1 Program When you double click on the LD1 name the Quick LD Program window will appear Click on Edit from the main menu bar and then click on Insert Rung as shown below it ISaGRAF SIMPLELD LD1 Quick LD Program PR fe x File Edit Tools Options Help Unda cz bt QQa HE F24 Cut Ctr X p FB II FS Fa Copy Ctrl C a Paste GE Paste special Delete Del
376. nheit 999990 sensor broken line C 16 01 TT 00 RR 00 AA 1 standard setting the input value will be 32768 to 32767 address 1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 14 6 4 Redundant Bus7000 Note 1 XP 8xx7 CE6 XP 8xx7 Atom CE6 is a better redundant system please refer to FAQ 125 or FAQ 138 http www icpdas com fag isagraf htm 2 The I 8437 80 I 8837 80 or 1P 8x47 can setup a Bus7000b redundancy system as the figure below Their CPUs are 80MHz The CPU speed is about 2 to 4 times of the I 8417 88 17 8437 8837 s CPU 40MHz 3 The 40 MHz I 8417 8817 8437 8837 and I 7188EG and I 7188XG are not good for Bus7000b redundancy system Please use the best solution of Item 1 or the solution of Item 2 I 8437 80 I 8837 80 Driver since v3 20 or later and 1P 8x47 supports Redundant Bus7000b The Ebus are for exchanging data between the Redundant Master amp Redundant Slave Please wire Ch 1 output of the redundant master s I 8054 to Ch 1 input of the redundant slave s I 8054 And also wire Ch 1 output of the redundant slave s I 8054 to Ch 1 input of the redundant master s I 8054 These two Status inputs are to indicate the other controller I am still alive I 8437 80 Bus7000 redundancy system COM3 RS485 Pin 1 D Pin 9 D D RS485 I 7000 I 7000 I 87K4 5 8 9 I O I O I 87K I O 1 8437 80 1 8837 80 slot 0 1 8054 Redundant Master
377. nselect V Use embedded SFC engind A RA E T e Deem jas oe Protect smni jas Optimize V Embed source code for upload Optimize x eiet Embed also 4 Optimize Project descriptor Optimize Password protection Build bin J gomments for not coi J History of modificatia Diary files Lists of variables and time diagrams Graphics icons and bitmaps Help Cancel zx VERY IMPORTANT NOTE Option Comments for not connected I O channels must be choosed if Directly represented variables is used in this project refer to section 3 4 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 3 After you have checked the Embed Source Code For Upload checkbox and clicked on the OK button you will need to recompile the project and download the project to the controller system ISaGRAF SIMPLELD Programs 3 Oj x Fie Make Project Tools Debug Options Help D mSv Aa SMe m aR Begin Exampl ELD Program Make application code IMPORTANT NOTE Once you have enabled the Upload option the code generated by the compiler will larger than the original code that has not been set the Upload function If the uploaded code size is larger than 64K bytes you will not be able to download the program to the I 8xx7 1P 8xx7 I 7188EG XG uPAC 5xx7 uPAC 7186EG and VP 2117 controller system The code size limitation is 512KB for W 8xx7 1 MB for WP 8xx7
378. nual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 17 Now the window will look like below Sie salsRAF sIKIPLELD LD I Quick LD F File Edit Tools Options Help Dal Yea we xB dd Pr Qgqak gf Fo 4B5 FS JHE Fd GH FS 40H F HE F7 J Fa EI Fo ta To add a new LD rung first move the cursor to the proper position below the first rung Then click on Edit Insert rung Bie SaGRAF SIMPLELD LDI Quick LD Program File Edit Tools Options Help Ba YOR Wel xb d P Qaan gf FO 4B F3 34E Fa Gel FS 4H F HE F 3H FS Il Fo Fn Be saGRAF SIMPLELD LD1 Quick LD Program File Edit Tools Options Help pos 0 5 B mo Ch E eal aaa g Fd C Chae 0 Fe W Fo F9 Copy CHC ee Essie reba Paste special i a GJTOT ail ui OTTO Insert nung I T1 ma met aymbol text Enter Change coilcontact type Space Find _ ao Find matching name AltF2 Find matching coil AlttFS Copy drawing metafile User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 18 We don t need the contact in the new rung move cursor to it then click on Cut ie sal RAF SIMPLELD LDI Quick LD F File Edit Tools Options Help Aa Yeer Hs xed PH QQell 2 Fo 4E F3 JHE F GH FS 1H F Ho Fe E Fe FS Now click on F6 Block on the left and then double click on inside the block to create a BLINK block Sie lhat RAF sSIKIPLELD LDI Qu
379. o provide our customers with the most reliable and accurate information possible regarding our products However ICP DAS CO LTD assumes no responsibility for its use or for any infringements of patents or other rights of third parties resulting from its use Trademark amp Copyright Notice The names of products are used for identification purposes only and are the registered trademarks of their respective owners or companies FAQ Please visit www icpdas com FAQ Software ISaGRAF for Frequently Asked Question or visit http www icpdas com fag sagraf htm Data Sheet Please visit http www icpdas com products PAC A 8000 isagraf htm click Data Sheet icon or visit http www icpdas com products PA C 8000 data 20sheet data 20sheet htm Copyright January 2002 by ICP DAS CO LTD All Rights Reserved User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 1 Table of Contents USER S MANUAL OF ISAGRAEG PAC ooer iono es a o E ai a Ea E aS E 1 TABLE OFCONTEN S on eE R E e EE 2 REFERENCE GUIDE caiene oe a a eE rea a Sa e Eo aR 7 PERFORMANCE COMPARISON TABLE 1 OF ISAGRAF PACS eescssececcceeeeccccccccccccceccecccccecceccccecccecececccececececceeeeee 8 PERFORMANCE COMPARISON TABLE 2 OF ISAGRAF PACS eeseeccseeceeccccccccccccccccccceccccceccccccececcecccececcececccecesesee 9 DOPAC WINE AC SERES WATE TPAC oir a a desc saempanandesesnas irons T E A 9 VIEWPAC SERIES FAC Giese a E dona p
380. o the project you have created open the SaGRAF Project Management window to select Tools from the menu bar then select the Archive option and then click on Projects gISOGRAF Project Management E File Edit Project Tools Options Help bottlef demo rfarray res aray management functions rfbars demonstrates graphic bra graphs rfbool demonstrates SFC boolean actions zj Reference Rf Tmr FB 4 Author CJ international m Date of creation 9 2 94 ES When you click on the Projects selection the Archive Projects window will open Click on the Browse button to select the drive and the sub directory where the demo files are located For example Napdos SaGRA F 8000 Demo on the I 8xx7 CD ROM Workbench Archive demo_01 demo_02 demo_03 demo_04 demo_05 demo_06 demo_07 demo_08 Backup Restore Close damn na Help File name Folders OK backup c desktop Sxx 7 demo ee ee Compress Wa 5 gt DESKTOP E 1 71 To install all of the Demo files click on the demo_0O1 file then press and hold down the Shift key continue to hold down the Shift key and use your mouse to scroll down to last file in the Archive window Click on the last file name from the demo file location and that will select the entire group of demo files Lastly click on the Restore button in the Archive Projects window and all of the demo files will be installed into the sub directory you have creat
381. o the same as the salve The valid value is ranging from 1 to 10 Set to other value will become a default value 1 wm leaSRAF EBUS_M_ DO connection File Edit Tool Options Help 2 PBeo trl FRA amp A ra ref 110 m Group No 1 1 N VO Board parameter Parameter Group No abe vau CJ Coe B Group n boo_pack w ana pack m P 11 Fleleeleletels User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 17 Configuring The Ebus Master Boolean Packages To begin configuring the Ebus Master Boolean Packages click on the boo_pack selection from the Ebus_m I O connection om baGEAF EBUS M_ 10 conection File Edit Tools Optons Help 2 gt BSean ELIFAS Only Package No 1 to 128 a pm ref 111 1 mw package 1 32 0 is available wma package 33 64 0 os package 65 96 0 6 sous package Sf 128 0 ous package 129 160 0 ous package 161 192 0 3 caus package 193 224 0 mm ebus mi ous package 225 256 0 Group n 7 B boo_pack ne ana_pack ne A zi The parameter package_xxx_xxx at Ebus_m boo_pack indicates the Boolean package number which is allowed to be written to or read from across the Ebus network The parameter value is given as a 32 bit integer in hexadecimal As an example if the package_1_32 is set to FFFFFFFF this will enable all the packages from number to number 32 to be written to or read from across the
382. odule depends on the module s type and function If there are more than one I O type in the module the time consumed will be longer than the above value For example the I 7050D is a 7 Ch digital Input plus 8 ch digital output module it will consume more than 20 to 40 ms If connecting 20 pcs of D I O modules the appromate I O scan time of all channels in these I O modules will be about 0 4 to 0 8 second If connecting 20 pcs of A I O modules the I O scan time is about 0 8 tol 2 second To have better shorter remote I O scan time here recommend not to connect more than 24 pcs of I O modules in the I 7188EG XG and I 8xx7 while 64 pes in the WinCon 8xx7 How to test this demo 1 To configure I 7018z and I 87018z please install DCON utility Version should be 4 4 3 or later version in your PC The new released DCON utility can be found in the 1 8000 CD ROM or at ftp ftp icpdas com pub cd 8000cd napdos driver dcon_utility setup folder 2 Please do initial configuration in I 7018z please refer to step 1 to 4 in chapter 6 1 Set I 7018z s Address as 1 baud rate as 9600 Format as 2 s complement Checksum disable And also set Ch 1 to Ch 6 type as 1A 0 20 mA while Ch 7 to Ch 10 type as OF T C K Type If initial setting is finished please switch the Dip Switch on the back of I 7018z to Normal and recycle its power 3 Please set the I 7188EG s IP as 192 168 1 3 re
383. ol while WinCon 8xx7 doesn t have this limitation The standard driver version for WinCon 8xx7 has supported the I 8090 and I 8091 3 Only one I 8091 board in I 8xx7 amp WinCon 8xx7 can do X Y dependent motion other I 8091 boards should be moving independent Moreover the I 8xx7 can support max two I 8091 and the WinCon can support max four I 8091 18 1 Install motion driver Restriction of the motion driver of I 8417 8817 8437 8837 The motion driver for I 8417 8817 8437 8837 doesn t support the Ethernet communication however W 8337 8737 desen t have this limitation The ISaGRAF demo projects of motion for I 8417 8817 8437 8837 are demo 27 demo_28 amp demo 46 They are located in the I 8000 CD ROM napdos isagraf 8000 demo or at ftp icpdas com pub cd 8000cd napdos sagrat 8000 demo The ISaGRAF demo projects of motion for W 8337 8737 8347 8747 are wdemo_26 wdemo_27 wdemo_28 amp wdemo_29 They are located in the Wincon CD ROM napdos isagraf wincon demo or at ftp ftp icpdas com pub cd wincon_isagraf napdos isagrat wincon demo User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 1 All functions that trigger I 8091 amp I 8090 are named as M_ Please refer to the On line help from the ISaGRAF Help Library C functions for names starting with M_ i SeGRAF Project Management 3 q O x
384. ompleted Please use M_intstp to test command of M_intIn2 M_intcl2 amp M_intar2 completed or not 2 One controller can only drive one I 8091 to move by M_intIn2 M_intcL2 M_intar2 command Two or more I 8091 cards in the same controller to use M_intIn2 M_ intcL2 M_ intar2 at the same time is not possible User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 28 M_intar2 Move a arc on X Y plane m_intar2 card This command will generate an interpolation arc on X Y plane It will automatically generate a trapezoidal speed profile of X axis and Y axis by state machine type calculation method Parameters card NO_ integer the card No has been set by M_regist valid is 0 19 X_ Y_ integer end point of arc relate to present position R_ integer radius of arc if gt O the arc lt 180 degree if lt 0 the arc gt 180 degree R_ must gt square root of X_ X_ Y_ Y_ 2 dir_ integer moving direction 0 CW 1 CCW speed_ integer 0 2040 acc_mode_ integer 0 enable acceleration deceleration profile 1 disable acceleration deceleration profile Return Q_ boolean always return TRUE NOTE 1 Only one of M_intln2 M_intcl2 amp M_intar2 command can be called at one time the other motion moving commands related to the same I 8091 card should not be called unless it is completed Please use M_intstp to test command of M_intIn2 M_intcl2 amp M_intar2 completed or not 2 One controller can only drive
385. on Com or COM4 i001 Ade 670170 0 CH Differential Al C Boards id 1 fd 0701 7DW 16CH Single Ended Afl 7 18717210 870172 10CH Differential A l Equipments NG O1 AW 20CH Single Ended Al OME A M TOF or rok E6 hMTCP User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 12 If using I 87017ZW and set it as 20 input channels please connect 18717z20 in related slot No in the IO connection window Notice it only for voltage measuring when the I 87107ZW s jumper is set to 20 channels so the range can not be set as Current type 07 OD and 1A Moreover the jumper JP2 JP11 on the board must be set as Voltage input wu SaGRAF CREATION VO connection File Edit Tools Options Help a S gt Seam rly amp o A muj ref 87017FC cows CH11_rang 8 am i8 17z20 cous GH12_rang 8 Al1_10 ms CH13_rang 8 B Al11_20 we tas CH14_rang 8 Nooo m CHI5_rang 8 cm GHITG select board equip ment m GHT _O 004w o ch Freg In or 4 8 Ch Cnt In OK 6 vans CH18_ i_87088w 8 Ch PWM 8 Ch D I or Counter 8 089 Master card of W sensors 7 me CHIS_ o 113d Carson Strain Gauage Input Cancel m GHO i 87117 8 CH WaveForm card s Ea a ATT 6711806 CH Waverorm card range 1E Mote 87181 Concrete Freg amp Temper input z o ATZO 87211w 87K GPS 1 0 board 41 3 lI I okdot 7000 ls on Coma or COM4 iB 701 78 6701706 CH Differential 4 I Library 4
386. on demo or ftp ftp icpdas com pub cd wincon_isagrat napdos isagrat wincon demo 4 PC run Internet Explorer I E version shoulde be 5 0 or later version Enter W 8xx7 IP If connecting well click on Enter E Login Microsoft Internet Explorer ERE RHO BRAO RREA IAM AU 10 0 0 103 E pz E gt PT 2 BaD PI Damm GaseR Qi Wincon The Web PAC Please click on Enter to login Enter GE 0 5 Then please enter proper Interval value Unit is 0 001 second 1 milli second For example if enter 50 it means to store one record every 0 05 second The Period is the time period to record Unit is minute Then please click on Go to start recording W 8xx7 will then output different voltage in I 8024 Ch 1 to Ch 4 If user has finished procedure listed in step 1 connect Ch1 to Ch 4 voltage output to Chl to Ch 4 of I 8017H the I 8017H Ch to Ch 4 s voltage input will also change during this period And they will be recorded User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 42 44 Welcome Microsoft Internet Explorer BRE HHE RAO BREA Tam HAH Gt Q x 2 AP at 2 D rom AbD E http 10 0 0 103 0gin al Q ez ee gt MMAdobe YF 2 Ba 5 tee Ta DARRAR QAFE CR E a o Gee Logout Wincon Web HMI Demo 12 Reord 4 Ch Voltage ma Web_Datal curvel js file m Wincon Then PC can download it and use M S Excel to draw a Tre
387. on the ISaGRAF I O Connection window since slot 0 7 are used to connect to real I 8xxxW and I 87xxxW I O boards Only one Bus7000b can be linked to one ISaGRAF controller system If you attempt to connect more Bus7000b to an ISaGRAF controller it will not work sm ISaGRAF CREATION 1 0 connection E loj ES File Edit Tools Options Help 2 PSrm fl RR S ee Select board equipment mo x bus 000 1 7000 10s on Com3 or COM4 a ibus 000b 7000 10s on Com3 or COM4 000 10s on Com3 or COM4 as Ebus Master fbus_m lt New gt Set as Fbus Master fbus_s lt New gt Set as Fbus slave i 188xq 1D amp 1D0 for the 7188 G 801 7a 8 CH Analog Input with Alarm 8042 Isolated 16 CH DI amp 16 CH DO A ae us Com_port 3 vas com_baud 9600 ww host_ watchdog 0 Checksum means to enable ma watchdog timer 1E the Checsum for all the connected ws chechsum 1 I 7000 amp I 87xxx modules Checksum 0 means Disable User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 6 The com_port parameter can have a value of 3 for COMS3 or 4 for COMA4 for the I 8xx7 1P 8xx7 controller while 2 COM2 or 3 COMS3 for the I 7188EG XG uPAC 5xx7 amp uPAC 7186EG while 2 COM2 for the WP 8xx7 WP 5xx7 VP 25W7 VP 23W7 and 3 COMS3 for the XP 8xx7 Atom CE6 XP 8xx7 CE6 This parameter defines which COM port
388. one I 8091 to move by M_intIn2 M_intcL2 M_intar2 command Two or more I 8091 cards in the same controller to use M_intIn2 M_ intcL2 M_intar2 at the same time is not possible User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 29 M_intstp Test X Y plane moving command To test the below 3 commands completed or not M_intln2 M_intcL2 M_intar2 It will return FALSE for interpolation command completed while return TRUE for busy not completed yet Return Q_ boolean TRUE busy FALSE completed NOTE 1 Only one of M_intln2 M_intcl2 amp M_intar2 command can be called at one time the other motion moving commands related to the same I 8091 card should not be called unless it is completed Please use M_intstp to test command of M_intln2 M_intcl2 amp M_intar2 completed or not 2 One controller can only drive one I 8091 to move by M_intIn2 M_intcL2 M_intar2 command Two or more I 8091 cards in the same controller to use M_intIn2 M_ intcL2 M_ intar2 at the same time is not possible User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 30 1 8090 encorder commands M _ r_ enco Reset I 8090 s encorder value to 0 Parameters slot_ integer the slot No where the 18090 is plugged O 7 axis_ integer l x axis 2 y axis 3 Z axis Return Q_ boolean always return TRUE Example demo_27 demo_28 demo_46 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 31 Chapter 19 Eth
389. only do it in Ist PLC scan if INIT then INIT FALSE No more Ist PLC scan cycle TMP COMOPEN PORT 9600 8 0 1 53 open COM2 9600 8 N 1 init value of CNT O 7 to 7 For ii 0 to 7 do CNT i 7 end_for end_if test all IN O 7 if rising from False to True for ii 0 to 7 do test 1f IN O 7 signal rising If IN ii True and OLD_IN ii False then set related CNT value to 3 when Input event is trigered if CNTT value is not 7 it means INPUT been trigered the CNT value will plus 1 every 1 sec past later except the related INPUT become False CNT ii 3 end_if if INPUT is cleared or if related INPUT become FALSE the related CNT value will reset to 7 No input event happens at that INPUT channel if IN 11 False then signal is becoming FALSE set related CNT value to 7 No input event happens at that INPUT channel CNT ii 7 end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 38 if Tickl then Tickl is generated as pulse True every second in LD1 program if CNT value is not 7 means the related input is trigered if CNT ii gt 7 then CNT ii CNT ii 1 plus 1 Tickl True means sec has passed Re ea I RT PE Ta ONO EON OE TE EE MIE Ye mT LCST DORI OY NAY oS TEN OT ee OTE TTT SRY RET RTE E INPUT event happens and 3 sec past send Ist
390. onnecting one or several I 7530 to link many CAN or CANopen devices and sensors QO OO Q What does it mean and how to fix it when the 7 segment LED shows error messages of Err00 Err02 Err03 Err90 or E 0001 after booting the PAC Q Function Modifications The W 8347 8747 uPAC 7186EG I 8x37 80 I 8xx7 and I 7188EG XG with 256 512 and X607 608 no longer support old retain method please change to use the better new retain method to retain variables 089 IQ Why my uPAC 7186EG unable to renew the driver and ISaGRAF application Q How to use I 7017Z module in ISaGRAF PAC Q How to use ISaGRAF PAC plus I 87089 the VW sensor Master card to measure the Vibration Wire frequency to calculate the stress of constructions 092 Q Setting uPAC 7186EG s and I 7188EG XG s COM3 or COM2 as Modbus RTU Slave port 093 Q New Hot Swap and Redundant solution for the WinCon 8347 8747 094 Q How to update the WinCon 8347 8747 s OS Q The WinCon 8xx7 supports Max 32 Modbus TCP IP connections since Its Driver 095 PP version 4 03 Q Release two C Function Blocks to read max 24 Words or 384 Bits from Modbus RTU ASCII devices Q How to modify the IP NET ID and Modbus RTU Slave port setting of the W 8347 8747 by an USB pen drive without Mouse and VGA 098 IQ Application Link Serial COM Port to the Modbus RTU device by COM functions Q How to get an average value of a Real or Integer variable which is samlped every fix
391. ontinusly hold in True for 30 seconds then send one more messge after every 30 second past to COM2 until the state of IN O 7 is falling to FALSE The string is for ex Alarm 3 30 sec past User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 36 How to test 1 Please download wdemo_24 to W 8xx7 slot 1 1 8077 or demo_70 for I 8xx7 slot 0 I 8077 2 Connect a RS 232 cable between W 8xx7 s COM2 to your PC s COM 1 Wincon COM2 PC COM1 2 RXD 2 RXD 3 TXD 3 TXD 5 GND 5 GND Or if you are using I 8xx7 s COM3 to your PC s COM1 I 8xx7 COM3 PC COM1 2 TXD 2 RXD 3 RXD __ 3 TXD 5 GND MM 5 GND 3 Open PC s Hyper terminal at COM1 with 9600 8 char size no parity 1 stop bit and No flow control And then please switch I 8077 s Inputl or 2 or from FALSE to TRUE and wait about three seconds If it works there should be a message Alarm displayed And then please hold this input TRUE more than 30 seconds there should be one another message Alarm 30 sec past displayed COM1_9600_8N1 EREHE Joj x BAED RHE WERO FUO PED AH Dle Does it display Alarm 4 SEAR 00 00 16 Babee Basel SCROLL CAFS NUM RA FIED User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 37 Program description LDI program Generate a pulse True to Tick every second BLINE LIN STI program
392. ontrols Designers Insertable Objects C Microsoft Shell Controls And Automation a Microsoft SysInfo Control 6 0 Microsoft Tabbed Dialog Control 6 0 5P6 Microsoft Windows Common Controls 5 0 SP Microsoft Windows Common Controls 6 0 CSPE Microsoft Windows Common Controls 2 5 0 CSF Microsoft Windows Common Controls 2 6 0 5P Microsoft Windows Common Controls 3 6 0 Microsoft Winsock Control 6 0 5P6 Mikctrl2 Actives Control module Modview File Transfer Control module LIMS Video Control 1 0 Type Library Browse MSFlexGrid Wizard m Selected Items Only Active Setup Control Library Location C WINDOW Stsystem32asctris o0cx a Projecti Microsoft isual Basic design File Edit View Project Format Debug Ron Querys Diagram Tools Add Ins Window Help s Ble Wi teedlon Mee wea im Project Form Form w YB 6 0 Modbus TCPAP Master protocol demo Winsock state Boolean No 1 to 8 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 IOIOIOIOIOIOL Please remember download SaGRaAF project vWidemo4 to controller first 11 65 ICP DAS ISaGRAF Project architecture SaGRAF DEMO 72 Programs ol x Fie Make Project Tools Debug Optone Help Begin STi structured Text Variables Variable array Dim as 6 addr as 1 To get the input value of I 7018z s Ch 1 to Ch 6 Temp 0 3 Integ
393. ools Option Help EEE e SUb program parameters a Parameters w_eep E x C Boolean Insert Analog Call Real f Retum Timer AN Name WEEP N e Mode Delete id Arrange User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 15 2 C Declare local variables We need a local boolean internal variable TMP in this example Ioj xj Eie Edit Tool Optons Help D a tas eel x 4 ek SB Local objects JOOP Comment H ame me S Metwwork Address OoOo f Comment SY So ae Cancel C Dutput Hest Constant set to true at init ml Sete Previous Extended Internal E rput D Enter function codes IF VI_ lt gt V2_ THEN if value changed ceo TMP EEP N W ADDR_ VI_ save it to the EEPROM File Edit Tools Optons Ha WeoEEP V1_ return the new value a 2 2 ENDIF IF UWUi_ lt gt U2 THEN if value changed gt IMP EEP_M_WCADDR_ Vi_ gt save it to the EEPROM gt i EFEP i Ud_ return the new value gt END_IF 5 E Verify the function ISaGRAF TB063 W_EEP STp o x File Edit Toole Options Help aal IF Ui_ ve ty program EN c if value changed gt IMP EEP_M_WCADDR_ Ui_ gt 5 t save it to the EEPROM b Y_EEF UWd_ 3 return the new value gt END_IF 5 Bl MES xE elg Code Generator E x Mo eror detected Do
394. or other GSM modems working or not Note Please REMOVE the password setting in SIM card then plug it nto GSM modem iP 8xx7 COM4 5 GSM cable of 7188EG XG COM3 4 GSM cable of W 8xx7 COM2 GTM 201 RS232 RS939 aoe 2RXD 2TXD RXD 2TXD 3TXD Mm 3RXD TXD 3RXD 5 GND 5GND GND 5GND 4DTR 4 DSR DTR or RTS 4 DSR TRIS e 7 CTS DTR or RTS 7 CTS User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 17 1 17 2 A SMS demo example The demo project is located at I 8xx7 s demo_43 please refer to section 11 1 to install it to your ISaGRAF workbench Or It can be downloaded at ICP DAS s FTP site ftp ftp icpdas com pub cd 8000cd napdos isagrat 8000 demo Moreover the demo_43a is an example for sending SMS to multiple cellphone can be obtained at the same ftp site above Variables Type _ Attribute Trigger to send an alarm message when K1 is pushed Boolean Internal Trigger to send a report message when a message is coming Boolean Input Pushbutton 1 connect to push4key Output Internal Message sending status temportary usage Project architecture Operation actions O x 0x 1 If KI is pushed an Alarm message will be sent If the user send a message in format PEUN HARALI for ex T0200 or T1500 to the S beie ae e controller the blinking period will change to 200ms and 1500ms And then the controll
395. ore these records to a RAM file automatically You can see the progress in Saving state If all done please click on Download record File to download this record file to your PC EIE E E i EEA E 1B ae i 8 curvel js ES Z540 J cript script File 65 6 EB wE 10 0 0 103 fase fee RABY E E hta Ra ep o ea EEE 6 Then please open this record file trend1 js on M S Excel Please refer to section 11 3 6 step 6 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 71 ISaGRAF project architecture SaGRAF WHMI 13 Programs ioj x Fie Make Project Toole Debug Optone Help Sa HSM Am xr me Agag Beyin Begin ST1 Structured Text Variables Init as True The ISaGRAF program will set this value to True to store records to a RAM Disk File How many chanels in I 8017H to record We use 4 A in this demo Ch 1 to 4 Recording state 0 No action 1 recording 2 finished How many records in this recording action This value is Total_record1 Integer Internal calculated by the ISaGRAF program automatically addr declared as 5 Current finished record count addr declared as 7 To use in for loops i8017H 0 7 Variable array Dim as 8 link to I 8017H s Chl to Ch 8 Variable array Dim declared as 8 VOA Aai The voltage value converted from 18017H 0 7 i8024 0 3 Output a array Dim declared as 4 link to I 8024 s Chl to Cu
396. ouch 510 and the ISaGRAF controller WOW CODY EasyBuilder aly Sal Window Help lej x alaini zii FE File Edit lt i Fle g L Es La ee jlevie Font 16 kue l Alien k Make Same Size Blip venical Blit Honeontal Rotate SU decrees arom Uinitrromp Redraw Window Select All Objects v Select select Hert abject hange ATI aa System Parameters H 145 30 5 PLC type should be set to MODBUS RTU Serial port set to RS 232 Data bits set to 8 Bits Stop bits set to 1 Bit Baud rate set to 19200 Parity set to None PLC station No set to be equal to the Net ID of the ISaGRAF controller set to 1 in this example eS a HMI model MT510T 640 x 450 Stop bits HMI station No PLC station No J ewan anes Multiple HMI Disable HM I HMI link speed 115200 PLO time out constant sec 3 0 PLO block pack lo Note 1 If using TouchS06TE s Ethernet to link to controller please set PLC type as MODBUS RTU TCP IP PLC I F port as Ethernet Local IP address as TouchSO6TE s IP Server IP address as controller s IP PLC station No as the same Net ID No of the controller default is 1 2 If the cable between the Touch 500 series and the controller 1s 2 wire RS 485 please set PLC type as MODBUS RTU RS 485 2W PLC I F port a
397. outputs double click on the 10 slot then click on the Show3led 3 indication LED on 8xx7 panel selection This will now associate the three LED s above the four control panel pushbuttons as the three outputs for the example program Your I O Connection window should now look like the screen below a SaGRAF SIMPLELD 1 0 connection File Edit Tools Options Help alegem itl FRIE Push4key amp Show3Led is only for the I 8xx7 and 1P 8xx7 If your controller is other model number you can also connect Push4key amp Show3Led for simulation however please mark them as virtual board _ Channel i a Close m push4key W vee Connect N Free ie show3led no Next Previous Oo Remember to click on the SAVE icon to save the I O connections that have been created for the example program And click on the X to exit the window om katk AF SIMPLELD 140 connection File Edit Tools Options Help 2 apBem tllRR E pas ref 10 al OUTO ol OUTO2 ol OUTO3 t pushdkey m t showdJled n IMPORTANT NOTE All of the variables with Input and Output attribute MUST be connected through the I O connection as described above for any program to be successfully compiled Only the Input and Output attributed variables will appear in the I O Connections window In this example we have only 3 boolean output variables t
398. ow Q PWM Can I generate D O square pulse up to 500Hz with I 8417 8817 8437 8837 7188EG amp 7188XG controllers How 14 Q Can I use 8K Parallel D I board to get counter Input up to 500Hz How Q How to output something at a time interval For ex Turn ON at 09 00 18 00 on Monday ON oe NO N to Saturday while 13 00 20 00 on Sunday Q How to determine a D I if it has bouncing problem 7 Q How to trigger something at some seconds later when one event happens Q ay Does the ISaGRAF 256 software have I O Tag limitation Why not using ISaGRAF L Large version 9 Q Why my I 8417 8817 8437 8837 or I 7188EG XG stop running Q How to search a variable name in an ISaGRAF project 2A IQ When closing my ISaGRAF window it holds for long time Why 9 Q How to use Proface HMI Touch panel to link to I 7188EG XG I 8xx7 and WinCon 8x37 73 Q How to reduce ISaGRAF code size How to directly Read Write IsaGRAF variables by OO ay using Network address User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 78 English ISaGRAF Ver 3 FAQ Q How to scale Analog Input and Output of 4 to 20 mA to my engineering format How to we ww scale Analog Input and Output of 0 to 10 V to my engineering format Q How to detect controller Fault Q New SaGRAF retained variable is better than old one Q How to link to Modbus ASCII Slave device Q Ho
399. ow level programming language consisting of a list of instructions Each instruction always relates to the current result or IL register and must begin on a new line and must contain an operator The operator indicates the operation that must be made between the current value and the operand The result of the operation is stored again in the result Instruction List IL programming requires adherence to a strict programming format that must be followed Each instruction must begin on a new line it must contain an operator completed with optional modifiers and if necessary for the specific operation one or more operands separated with commas A label followed by a colon may precede the instruction If a comment is attached to an instruction it must be the last component of the line Comments must always begin with and end with The following is an example of a comment in IL place comment here This section describes how to program an Instruction List henceforth referred to as IL program This IL program has the same program specification as the ST and FBD program as outlined in Section 2 2 ans Section 2 3 The first step is to create an IL project A 1SaGRAF Project Management E Ioj x Fie Edit Project Tools Options Help Bo Kea iB tg B Demm demo rol TP TON TOF QLD fbd_exam Example FBD Project Example ST Project zj Reference ST_Exam A Author ICP DAS USA Inc H Date of creation
400. p EB Bi 3200 Importtromlibrery m AR Be Begin ai Export to library End Functions E Auto scan L Begin demo Ladder Diagram C The Auto scan I O is divided into three area Original I O Connection shows the modules that already exist in your I O connection at the first eight slots of your ISaGRAF project Current Found I O Modules shows the I O modules that detected in your controller By RS 232 or TCP IP Auto Declare Variables shows what modules that you want Auto scan to automatically declare variables for you also g r m Bd ee Antolte E Would you like to atuo confie these M Modules 7 Original I Curent Found Connection PO Modules 0 wo isos i 87024 m l i8040 Wo2 19056 IV 3 i 8042 D4 i 87052 5 7 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 31 D In the Current Found I O Modules area The check box will be enabled only when an I O module is detected in the controller and the slot is not used by original I O connection E In the Auto Declare Variables The check box can be enabled only when one I O module is checked in the current found area F You can check the Select All to check all available boxes in the respective area What is necessary for Auto scan I O A Make sure the Link setup parameter is correct COM1 COM2 Ethernet etc B Plug in I O boards first before your IsSaGRAF can detect them Naming rules of au
401. p Bs Font 16 AL Tools Window Help _ x galanl Ee Alo cz BHAE LJ i A _ hf pee ma Windows OOS O 4 EL i Objects For Help press Fl fk 236 F 142 Go User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 23 Click on Toggle Switch then set all Device Type to 0x all Device address to 1 and select Switch Type to Toggle EasvEuvilder EBPril Window 10 Inital Screen EE Ble Edit View Option Draw Parts Library Tools Window Help 16 x Deal leae Sele l slam Ele zele General Shape Label Description Fead address Device type Attribute Switch style OM User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 24 By the same way as former to choose a prefered shape and label Create Toogle Switch Gbyect General hap Label M Use shape Use bitmap Font 16 Align Center Content I lke label Tracking EasyBuilder EBPril Window 10 Initial Screen EE Ble Edit View Option Draw Parts Library Tools Window Help 16 x Dem He Slee Alla sla Ele A else Font 16 a A am Eaj ER f BHAE 271 We cone E n r nis Windows Sa fe 293 F 190 4 ge Objects E E le a Lie For Help press Fl User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 25 By the
402. p 2012 Rev 6 3 ICP DAS Performance Comparison Table 2 of ISaGRAF PACs XPAC WinPAC Series with 1PAC XP 8xx7 CE6 WP 8x37 W P 8x47 iP 8447 ode iP 8847 1 I ae Per port Total Max Connecting 255 COM 3 or 4 2 or 3 or 4 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 ViewPAC Series PAC WinCE MiniOS7 VP 25W7 VP 23W7 VP 2117 Max 100 devices ________ Eer port _____ je otal nL 256 128 ee 10 ports ports _________ COM 2 3 5 14 5 ports 2 ports i 1 or 2 3 1 8191 1 4095 640x480 320x240 128x64 512 KB Oo CQ O Z N N Jo n ore Ebus Fbus Ebus P Yes Yes O Dn 7 AE support Etherne oy Yes ON Max Connecting 255 COM 2 or 3 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 T 8000 iPAC Series with WinPAC I 8417 8817 1 8x37 80 iP 8447 iP 8417 WP 8x37 iP 8847 iP 8817 WP 8x47 sal lt Max Connecting 64 COM 3 or 4 2 or 3 or 4 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 I 7188 uPAC Series PAC I 7188XG I 7188EG wPAC 7186EG uPAC 5xx7 U ASCII Master Total COM 2 or 3 Annotations 1 uPAC 5xx7 represents uPAC 5007 5 107 5207 5307 5507 I 8x37 I 8x37 80 represents the products of I 8437 8837 8437 80 8837 80 iP 8xx7 represents the products of 1P 8417 8817 8447 8847 WP 8x37 represents the products of WP 8137
403. p 2012 Rev 6 3 ICP DAS 3 18 3 2 8 Using the I 8024W The I 8024W is a 4 channel analog output board which can output signal of 10V and 0 to 20mA Each channel can have different range setting Please refer to http www icpdas com products PAC A 8000 8000_IO_ modules htm gt I 8024W The ouput speed of the I 8024W depends on the PLC Scan Time For example if PLC scan time is 10 ms then the ouput value will be ouput in about 10 ms However if PLC scan time is 100ms then the ouput value will be ouput in about 100 ms The speed of the I 8024W is faster than I 87024W Besides unlike the I 87024W the I 8024W can have different range setting in each channle All channels of I 87024W use the same range setting However I 87024W can use in slot 0 to 7 and also in the RS 485 remote I 87K4 5 8 9 or RU 87P4 8 expansion unit I 8024W can only plug in slot O to 7 of the controller The analg output value of the I 8024W is Current 0 to 32767 means 0 to 20 mA or Voltage 32768 to 32767 means 10 V to 10 V Range Code s Physical signal 20 0mA 00mA Analog output value 32767 33 10 0V_ 100V Analog output value 32767 32768 To program I 8024W please connect 1_8024 in the related slot No on the I O connection window Then set proper range setting Then connect related Integer Output variable to Ch 1 to Ch 4 an SaGRAF TESTI 140 connection O x Fie
404. p 2012 Rev 6 3 ICP DAS 9 18 9 11 Export Import Variable Declarations Via Microsoft Excel Variables can be defined in Microsoft Excel and then be imported to ISaGRAF workbench And also they can be exported from ISaGRAF to Excel To export to a text file with an extension name txt run Tools Export text from the dictionary window ISaGRAF TEST31 Global integers reals Export text o Depot teualtalse detintioms rt ieffales detinitien Select File and given a name to it int_1 txt in this sample Then click on Browse to select the directory where this txt file will be saved E xport variables User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 19 You may open and edit the file from the Excel Please make sure to save this file with an extension txt re es X Microsoft Excel mt_l txt Wiame Address Attribute Format Unit Conversion Comment COUNTE 16 0000 Internal Integer on B 1640000 memi mea oo m1 160000 npt teger O A2 160000 Input Integer CNL GAS 160000 mt eger O T A4 1640000 Input Integer CNI 0 OOo S S T T S T SESE A To import a text file to ISaGRAF with an extension name txt run Tools Import text from the dictionary window ImaGRAF TEST31 Global integers Heals Import text mporn tnetalse detinitions User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9
405. pia can be found at WP 8xx7 CD ROM napdos isagraf wp 8xx7 demo or ftp ftp 1icpdas com pub cd winpac 8xx7 napdos isagrat wp 8xx7 demo If functions of Msg_F Msg _N ARY_F_R AFY_F_W are not found in your PC ISaGRAF please download ICP DAS utilities For ISaGRAF at http www icpdas com products PAC 8000 sagraf htm gt Driver Then run setup exe to restore them to your ISaGRAF workbench The Wpdmo_54 program will read 20 REAL values from System_Disk data54 txt when the WP 8xx7 is just power up or user set the RE LOAD value to become TRUE at any time To read write file in the System_Disk take lots of CPU time please do not read write it frequently And please always close the file after the operation If user read write file in every PLC scan cycle the PLC scan time will become a very big time It will be a bad performance To test this sample program please edit a text file data54 txt in your PC by for example Notepad Please enter 4 rows each contains 5 Real values Then download this data54 txt to WP 8xx7 s System_Disk folder by ftp utility The content of the data54 txt looks like below 23 65 9 0 012 5 87 88 2 0 34 8 0005 2 0E8 4 08 5 32E 6 2 7 6666 8 456 07 1 01 34 0 7g 8 gt 9 Variables Variable array Dim is 20 The 20 REAL value Eoo Foe internal Index of for loops jj Integer
406. ple I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 M_stpy Stop Y axis m_ stpy Parameters ese E card_NO_ integer the card No has been set by M_regist valid is 0 19 Return Q_ boolean always return TRUE Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 m_stpall card E This command will stop X amp Y axes and clear all of commands pending in the FIFO M_stpall Stop X amp Y axes Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 Return Q_ boolean always return TRUE Example 1 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 19 Simple motion commands m_Isporg M_Isporg Low speed move to ORG a Low speed move and stop when ORG1 ORG2 limit switch is touched DIR_ ARIS Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 DIR_ integer 0 CW 1 CCW AXIS _ integer 1 X axis 2 Y axis Return Q_ boolean always return TRUE ORG Low speed V o M_hsporg High speed move to ORG High speed move and stop when ORG1 ORG2 limit switch is touched Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 DIR_ integer 0 CW 1 CCW AXIS _ integer 1 X axis 2 Y axis Return Q_ boolean always re
407. ppear IsaGRAF SIMPLELD Debugger File Conteol Tools Options Help m HH S Ae RUN allowed 0 current 4 16 15 09 0 application stopped maximum 6 overnlow 0 IhaGRAF SIMIPLELD Debug programs File Project Toolk Options Help B m om 34 HASSE E Eample LO Program end init handie INIT variable Enid Begin LDI Ladder Diagram RUNNING THE EXAMPLE LD PROGRAM You can observe the real time I O status from several ISaGRAF windows while you are running the example project One of the windows is the I O Connections window which shows each of the inputs and outputs as assigned Click on the I O Connection icon in the ISaGRAF Debugger window to open the I O Connections screen Another VERY helpful window you can open is the Quick LD Program window From this window you can observe the LD program being executed in real time Isat RAF SIMTPLELD Debug programs File Project Tools Options Help hall B BUI m pup y VANE SR Example LD Prograrn WO connection handle IMIT variable End Begin LOY Ladder Diagram User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 33 In the window below the OUTO1 thru OUTO3 is blinking in the first 15 seconds The Quick LD Program window shows the entire ladder logic program in REAL TIME and is an excellent diagnostic tool for development and troubleshooting om O GR AP SIRTPLELD A cenneeten File Tools Help o
408. pter 19 for more information about the Internet security User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 25 3 4 Directly Represented Variables If you have an ISaGRAF 256 or ISaGRAF L workbench you don t need to use the skill described in this section A very useful feature of the ISaGRAF Workbench program is the ability to create directly represented or internal variables Internal variables are program variables that can be used in an ISaGRAF program but they are not physically connected to any of the input or output variables There are four versions of the ISaGRAF Workbench program available with the ISaGRAF PAC ISaGRAF 32 ISaGRAF 80 ISaGRAF 256 and IsaGRAF L The number after ISaGRAF represents the number of I O variables that are allowed with that particular ISaGRAF Workbench program The ISaGRAF Workbench program comes with a hardware protection device dongle that plugs directly into your development computers parallel port Every time you compile a program in ISaGRAF the hardware protection device is read to make sure that you are not trying to connect to more program variables than are allowed with your particular copy of the ISaGRAF Workbench program that you purchased with your ISaGRAF PAC These directly represented henceforth called internal variables can be used in lieu of your real world inputs and outputs so you can create additional program variables that do not count against the amount of ISaG
409. r s manual User can apply below COM functions to operate other protocols or 3rd party protocols Please refer to Appendix A 4 of the ISaGRAF user s manual for description of these COM functions COMOPEN Open Serial COM Port without Flow control parameter OMOPEN2 Open Serial COM Port with Flow control parameter not for I 8xx7 COMREADY Test if any byte come in COMARY_R Read all bytes which already come in to a byte array COMARY_W Write many bytes in a byte array to COM Port COMREAD Read one bytes Please call COMREADY to test first if there is data then COMREAD can be called COMCLEAR Clear all received bytes in the receiving buffer COMARY_NW Write one signed long Integer to COM Port format is Binary 4 byte COMARY_WW Write one signed Word to COM Port format is Binary 2 byte COMSTR_W Write one string to COM Port COMWRITE Write one byte to COM Port COMCLOSE Close Serial COM Port Note E The default shipping of I 8xx7 controller has set its COM1 and COM2 COM2 RS 485 is only for I 8417 8817 as Modbus RTU Slave Port User can choose to switch off the COM1 Modbus RTU Slave function to become a freely used COM port by the above listed COM functions Please refer to Appendix C 1 To use I 8xx7 s COM5 to COM20 Please refer to Chapter 1 8 to install I 8112 8114 8142 8144 serial expansion boards 2 W 8xx7 8xx6 s COM2 COM3 can be switched ON as a Modbus RTU Slave Port Or Switch
410. r TSTART TSTOP ST QLD 1888 Move down in i stem date amp time SYSDAT_R SYSDAT W SYSTIM_R SYSTIM TE bss en ee eee A Pan N a demo 05 Project PPPE anes demo_06 Ct f Reference sim p Author Comment JA Simple LD Program Date of creation 12 Version number 1 E Description ance User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 8 Create an empty program No control logic in this program Example ImaGRAF CREATION Programs File Make Froject Tools Debus Options Help Ey ai 3 Fen Zxr mk 2ee Create new program Mew Frogram Language LEMM AEn E Jooo yle Begin Main program g Connect I O modules You may refer to section 3 1 Example ISaGRAF IO4LD Programs E xj Make Project Tools Debug Options Help HST Oba Xb aw 205 GD Hello Reset amp Set Each whe File D Begn CP TINY contrat Outputs VO connection Howdy Ladder Disg am Helen wisisis is bis b E g Name Of VO Name Of Connected Board Variables YO Romae _ Associated With Each V O Board User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 9 Declare Variables associated with the channels of connected I O modules You may refer to section 2 1 1 3 Example SaGRAF SIMPLELD Programs 5 x File Make Project Tools Debug Options Help olyen ono syr me see SES See ia See eee ANANS i ISaGRAF SIMPLELD Global boolean
411. r to display YALI OLEC RUN Cl User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 3 N coil Coil with N type means it will be set to a pulse TRUE when the left status is just falling from TRUE to FALSE Left status t ee 2 N coil o o o Retrun To return from the excution 1f the left status is TRUE that is the reset LD rungs of the program below this return will not excute when the left status is TRUE 2 1 1 Programming LD HN Starting amp Running The ISaGRAF Workbench Program Click on the Windows Start button then click on Programs then click on ISaGRAF 3 4 then click on Projects as shown below ISaGRAF 3 4 Jasc Software gt R Diagnosis Logitech MouseWare gt Em Libraries Macromedia Dreamweaver 4 EMEN B All Macromedia Extension Manager b B Read Me Master Converter b Y Report Matrikon OPC MCSD Training Microangelo ED EL EL Microcim Micro IDE Microsoft NET Framework SDK us Microsoft Developer Network Doctimant JA Microsoft Office Tools G Microsoft Press Settings A Microsoft Visual Studio 6 0 A Microsoft Web Publishing Morpheus Help E MSDN HelpDesk Sample F NC3 1 A NetZero Internet New Visio Drawing US Norton Antivirus Corporate Edition GAstart e EN A NT Service Toolkit Windows Update Programs Search Run Shut Down he Ae NG Ae I F oo T oo E o E oo As Ni E o User s Manual Of ISaGRAF PAC
412. ray to COMS3 Or COMSTR_W may be used for 5 seconds later first jump to an empty step3 sending string string length is max 255 then go to step 2 to send next data bytes there should be no O value in the string because 0 is string end byte SFC program will operate error if jumping to however character 0 is Ok in the the same step after it is finished So we should string jump to an empty step first The ISaGRAF compiler generate no erro if not jumping to an empty step first But its result will be error User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 24 4 24 4 Controller send data when event happens Please refer to Chapter 11 3 5 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 24 5
413. re current input of 20 mA 0 20mA and 4 20mA without an external 125 ohm resistor Please configure their format as 2 s complement by DCON utility The A4_20_to function can be used to convert the analog input value to user s engineering value please refer to Appendix A 4 Range type Physical value by DCON Utility Te 4 20mA I 7017RC 87017RCW Analog Input value Decimal 32767 po DE 20mA 20mA OmA mA O 20mA OmA 20 mA 87017R en 14ADR_ NIT 16 15RANGE_ NI2_ To use 1_87017R and 1_7017RC Please assign the same Range Type setting here as they are configured in the DCON utility 7017 RCO Q en 2ADR_ NIT 16 D4 RANGE_ NI2_ NIS_ Nl4_ NIS_ NIB NIZ User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 A10 A11 n12 AIS a1 4 ATS 16 OKA If connected well return as TRUE If abnormal return as False Please program 1_87017R for using RS 485 I 87017RCW module 8 Internal Integer variables should be used here 8 AI channels for I 87017RCW OK2 ICP DAS 6 9 IMPORTANT NOTES Note for Using RS 485 Remote I O to Measure the 4 20 mA Current If the current input sensor is 4 to 20 mA user may be better set the range type of analog input module to D 20 mA or LA 0 20mA set as 7 4 to 20 mA is not good The reason 1s If setting the range type as 7 4 to 20 mA
414. reate can be called only once in the ISaGRAF program TMP v ARcreate 1 500000 if TMP v lt gt 1 then Msg1 Parameter error or can not allocate memory by ARcreate function end_if TMP PLC_mode 1 Set W 8xx7 ISaGRAF driver running at fatest mode end_if If stop command is gived if Stopl then Stop1 False STEP1 0 0 no action TStop T1 stop T1 T1 T Os Msg User stop recording save_cntl 0 end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 74 If start command is gived if Gol then Gol False STEPI 0 no action 1 recording 2 recond finished if STEP1 1 then Itis still recording now Msg It is still recording now Please wait else Check interval valid or not we assume 10 to 10000 ms is valid in this example If your average PLC scan time is larger for example near 10 ms Please use Interval larger than 10 ms Or the record time won t be correct if Intervall lt 10 or Intervall gt 10000 then Msg1 Wrong Interval value it should be in 10 to 10000 milli second Check period valid or not we assume 1 to 10 minute is valid in this example elsif Period1 lt 1 or Period1 gt 10 then Msg1 Wrong Period value it should be in 1 to 10 minute else parameter is correct start recording total_record1 Period1 60000 Interv
415. rev max speed 3000 rpm speed resolution 2 rpm The required max pulse rate PRmax 3000 rpm 8000 60 400 000 pps The maximum output pulse Np 3000rpm 2rpm 1500 pulse number The DDA cycle can be calculated by follow equation OND PRmax DDAcycle 1 1 024ms 150 400 000 DDAcycle 1 1 024ms DDA cycle 3 High Speed 1638 pulse 400 000 4 0 001024 The above results means that maximum speed is 3000rpm when send command 18091_SET_VAR Q 3 2 2 1638 to I 8091 card 18 3 Hardware 18 3 1 I 8000 hardware address The hardware address of I 8000 main system is fixed as following table There are 4 slots I 8000 and 8 slots I 8000 S0 Slot 1_ Slot2 Slot 3 Slot4 Slot 5 Slot _ Slot 7 _ I 8000 4 slot 0x080 OxOA0O OxOCO OxOEO address I 8000 8 slot 0x080 OxOA0O OxOCO OxOEO Ox140 0x160 0x180 Ox1AO address Fig 3 I 8000 hardware address User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 5 18 3 2 LED Indicator power ORGI X axis s original limit switch for machine home position LS11 LS14 X axis s negative and positive limit switches ORG2 Y axis s original limit switch for machine home position LS21 LS24 Y axis s negative and positive limit switches EMG system s emergency signal input ORG1 LS11 LS14 ORG2 LS21 LS24 EMG Fig 4 I 8091 LED indicator 18 3 3 Hardware Configuration Limit switch configuration Because the
416. roller is just powered up TMP G_DATA end_if At run time Set user data to F_VALI TMP S_DATAC User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 25 At run time test any value of F_VALI is modified for ii 0 to SIZE1 1 do if Old_F_VAL1 ii lt gt F_VALI1 ii then if any value is modified Flag_to_save TRUE now save command is given Old_F_VALI ii F_VALI 0 Update Old_F_VALI if itis modified end_if end_for if save command is given it means value is modified if Flag to save then TMP save fl save data to file if save file failed keep this save command if TMP FALSE then Msg1 Can not save data to file May be file is open now by WinCon screen Save Ok cancel this save command else Flag_to_save FALSE Set as No save at the beginning end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 26 ST functions G_ data If any name of Datal to Datal7 is modified or value of SIZE1 is modified User must modify the below code Datal F_VALI 0 get variable value from F_VAIL 0 16 Data2 F _VALI 1 Data3 F_VALI 2 Data4 F_VALI 3 DataS F _VALI 4 Data06 F_VALI 5 Data07 F_VALI1 6 Data08 F_VALI 7 Data09 F_VALI 8 Datal0 F_VALI 9 Datall F_VALI1 10 Datal2 F_VAL 11 Datal3 F_VALI 12 Datal4
417. rrent saving record amount in the RAM disk File addr Save_cntl Integer Internal declared as 9 File name Len is 64 initas Web_Datal curvel js Web HMI support only RAM Disk Filein Web_Datal If File_name1 Message Internal the file is in CompactFlash File Web HMI support only in CompactFlash Temp HTTP Data Please refer to Chapter 11 2 Whmi_08 demo Operation state message Len is 255 init as No Action Len is 255 internal use Save_filel Boolean Internal User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 72 IO connection ow SaGRAF WHHMI 12 I O connection O x File Edit Tools Opton Help B gt SBrPrmn tl FAE o aj m ref 6024 m CH1_ rang 33 EJ i_8024 com m CH2_rang 33 t i 01th ru cma CH3 rang 33 4 cae CHA rang 33 ol i8024 0 6 ol 180241 18024 2 ra oy i8024 3 EE a ow ISaGRAF WHHI_12 140 connection IO x File Edit Tools Options Help B PBen tL ER o aj j ref 8017 wwa CH1 rang 8 mm i 8024 ro ma CH2 rang amp ED i_8017h we mm CH3 rang 8 coe CHA rang soe CHS rang cos CHB rang 6 coe CHY rang woe CHG rang 6 nuan auan nuan Noise Filter Max 32766 Noise Filter Min 32767 sample Number 1 801 FH O variable array Dim 8 ol 801 7HP1 t variable array Dim 8 1801 7H P variable array Dim 8 4 S i801 7H 3 variable array Dim 8
418. rver IP and the sender email box address 8 Num_ value less than 1 or larger than 10 9 The given attached file name doesn t exist or file path name gt 64 characters or its size exceeds the allowed file size User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 12 8 R_MB_ADR 1 9995 is to get the email sending state sent by Mail_snd The return value of R_ MB_ADR 1 9995 will remain until next calling Mail_snd Return QO Sleep No action 1 Busy one email is still sending now 21 Email is successfully sent through Mail server 1 22 Email is successfully sent through Mail server 2 lt 0 Error happens 1 Can not connect to the Mail server 2 Sender setting is rejected by the Mail server 3 Time out 4 Ethernet socket error 5 receiver setting is reject by the Mail server R_MB_ADR 1 9994 is to get the current email sending progress sent by Mail_snd Calling R_MB_ADR 1 9994 can not get the Error No when error happens Please use R_MB_ADR 1 9995 to get it If error happens while sending email the return value will stay at its last value until next calling Mail snd y Return O0 No action 1 Connecting to Mail server 1 2 Mail server 1 connected Sending HELO 3 Sending MAIL FROM to Mail server 1 4 Sending RCPT TO to Mail server 1 5 Sending DATA to Mail server 1 6 Connecting to Mail server 2 7 M
419. s File Edit Tools Options Help Cd BROOM Olea d Ka Booleans IntegersReals Timers Messages FB instances Defi Mame Attrib Addr Comment Quick declaration INIT internal o000 Flag to indicate first scan cycle or not a internal gjd i MS pulse Quick declaration i Attributes Internal C Constant Other M Retain Format Integer Real Length e When you click on the OK button all three outputs will be immediately added to the Global Boolean window Lastly click Save to save the settings Ty IaGEAF SIMPLELD Global booleans Fie Edit Tools Options Help ee el Tee Booleans lIrteqersiReal ae Messages FB instances Defined words Kame py ee Addr Comment INIT internal gogg Flag to indicate first scan cycle or not MJ internal 0000 M3 pulse OUTOT output oo00 OUTO output ogag QOUTOS Output o000 S OUTO1 BO000 output false true User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 9 To declare the timer T1 variable used in this example program click on the Timers tab in the setup screen Double click on the colored area and enter the Name as T1 set the Attributes to Internal the Initial Value to T 1s then click on the Store button InaGRAF SIMPLELD Global timers Comment Pxtended L Mame Attrib Addr Comment ro internal ogg User s Manua
420. s RS 485 2W Other setting is the same as RS 232 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 16 Click on Text to add a text Select the prefered Color Font Align for the text and then enter the Content And then place it to the proper position Attribute Clr f Ls Font 22 Align Center X 1 li l Welcome To Touch 510 gt y Edit Mew A Libary Jools Window Help 1 x User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 17 Click on Function Key to add a change window button Click on General then select Change Window and set Window No to 11 EasyBuilder EBPril Window 10 Initial Screen EE File Edit View ption pelma j Create Function Key General Shape Label Description C ENT C ES C ELR OAE C ASCI C Hard Copy AnD ULES a Nadenar C Return to Preview C Popup Window C Close Window C JOG FS Window i f Change Tee Common Window Window User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 18 Click on Shape then select Use shape and the click on Shape library Create Function Key Object General Shape Label Select the prefered Shape library and then select one item and click on OR shape Library Shape library gE 0 Untitled 2 Untitled 3 Un
421. s oj x Fie Edit Tools Options Help a o e exnd xe Booleans integers Reals Timers Messages FB instances Defined words ee Ae Gonen ISaGRAF SIMPLELD Global booleans Attrib Addr Comment Quick declaration EF i as E 77 ii rad F Retain Format Integer Real Length i User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 10 Link Variables to the associated channels of connected I O modules You may refer to section 3 1 2 Example a 1SaGRAF IO4LD 1 0 connection File Edit Tools Options Help awa wie ole xe 15 x o am i_8055 ref 11 0e Die mS ER DOS am i_87055 DIB DOS 2 i_87017 3 i_87024 Free KI Pellet EB push4key 9 show3led Assign the linked Variable a network address No You may refer to section 4 1 Example a imo Connect 1 0 channel 1 x Channel OOOO Close Connect Free Next Previous ISaGRAF ST_INTER Programs x File Make Project Tools Debug Options Help S ISaGRAF ST_INTER Global booleans File Edit Tools Options Help Quick declaration Modbus SCADA addressing map Import text Export text Import true false definitions Sort Renumber addresses 1 0 connection DY itRe Conversion tables 0005 fir Cross references User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 qe Dmm sxe mg Dictionary F SUM OGle
422. s Help S eis Om zxr oe Aes abel end init handle INIT variable Begin LOY Ladder Diagram The Target Slave Number is the Net ID address for the I 8xx7 controller as defined by the DIP Switch settings outlined in Chapter 1 Section 1 3 1 The Net ID DIP Switch is located in the bottom right portion of the I 8xx7 controller If your I 8xx7 controller is the first one the Net ID address should be set to 1 The Communication Port is the serial port connection on your development PC and this is normally either COM1 or COM2 The Net ID setting for the I 7188EG XG uPAC 7186EG uPAC 5xx7 1P 8xx7 WP 8xx7 WP 5xx7 VP 25W7 23W7 XP 8xx7 Atom CE6 and XP 8xx7 CE6 please refer to their getting started manual Default Net ID of the ISaGRAF PAC is 1 PC PLC link parameters If using the RS 232 RS 485 port to connect Target Slave Number OD YY OK you Can choose COMI 9 If using Ethernet you can choose Ethernet ommunication port Cance 5 i e oes and click Setup to fill out the Port number as l l Setu 502 and the PAC IP ex 192 168 255 1 Kuki eee Note The PC and PAC must in the same Retries E LAUPER network segament ex PC 192 168 255 15 Cancel Baudrate Parity Format Flow control The communication parameters for the target controller MUST be set to the same serial communication parameters for the development PC For I 8xx7 I 7188EG XG con
423. s a boolan AND Function Block Diagram ate 2 November 1994 CJ International Conversion tunctions call pl p2 boolean values return boolean AND of both inputs result FBsample booll bool prototype B Create an new function and given Name as W_EEP_N Language as Structured Text ISaGRAF Libraries E ioj x Fie Edit Tools Options Help Functions jet Aasa s description language Function Block Diagram creation date November 1994 author mee T Create new element Cancel User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 15 6 C Define input and return parameters sA SaGR AF Libraries E 0 x Fie Edit Tools Options Help name description C Boolean Analog i Real Call C Return Message D Add codes S3CGR AF Libraries E O x Fie Edit Tools Options Help hat enja name description language IF V1I_ lt gt V2_ THEN 1f value changed ie TMP EEP N W ADDR_ V1_ save it to the EEPROM File Edit look W EEP N V1_ return the new value amp x ENDIF IF Ui_ lt gt U2_ THEN if value changed gt TMP EEP_N_WCADDR_ Vi save it to the EEPROM gt EFEP_ NM f Ui_ return the new value gt END_IF 5 EO E User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 15 7
424. sagraf wincon WebHMI_Demo whmi_13 folder or ftp ftp icpdas com pub cd wincon_isagraf napdos isagrat wincon webhmi_demo Ther are 7 Files plus 2 folder should be copied to WinCon s CompactFlash Temp HTTP WebHMI Main htm menu htm index htm login htm main dll login dll whmi_filter dll img amp msg folder 3 Download ISaGRAF project whmi_13 to W 8xx7 If using Web HMI as HMI please finish procedure listed in step 2 first then do step 3 The Whmi_13 pia can only run in WinCon 8xx7 8xx6 It resides at W 8xx7 CD ROM napdos isagraf wincon demo or ftp ftp icpdas com pub cd wincon_isagraf napdos isagrat wincon demo User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 69 4 PC run Internet Explorer I E version shoulde be 5 0 or later version Enter W 8xx7 IP If connecting well click on Enter E Login Microsoft Internet Explorer BRO HE MAG BREA IAM HAW O O GO pee frame OO o Ja 3 BER Bez see gt Adobe WY 2 Bab BD TI CARUS QaseR eR gt Wincon The Web PAC Please click on Enter to login Enter x EIER ORRAK 5 Then please enter proper Interval value Unit is 0 001 second 1 milli second For example if enter 10 it means to store one record every 10 ms The Period is the time period to record Unit is minute Then please click on Go to start recording W 8xx7 will then o
425. same way as former create one another Toggle Switch however set all Device address to 2 and Switch style to Momentary Click on save to save the project Toggle Switch Obyect s Attribute General Shape Label Profile Read address Device ty Attribute Switch style OM hi EasyBuilder EBFril Window 10 WA Screen 48 Ble Edit View Option Draw Parts Library Tools Window Help lElx am ele A ol ee Welcome To Touch 5148 ma Windows il Objects E r For Help press Fl e F hoe a By pe eu Lie User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 26 We are going to design another window Click on Windows 11 then click the right button of the mouse and select the Create mm EFasyBuilder EBFril Window 10 Initial Screen EE Ble Edit View Option Draw Parts Library Tools Window Help 16 x Dll ta laln elel al 6 2 Font 16 J BHAE a aalala 6 Welcome amp Ezd HEH Zi 7 Delete _ Bening Name ite Window No fi Start Pos X lo Y lo Size Width 640 Height 480 Style Tracking L Monopoly M Clipping l Coherence security Level Lowest Color ee cater ee v Filled Pattern color ES cancel User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 27 Double click on Window 011 PEPEE sleaiga lel a
426. se errors To configure a Conversion Table open the SaGRAF Programs window and click on the Dictionary icon This will open the ISaGRAF Global Variables window select Tools from the menu bar and then click on Conversion Tables ISaGRAF SIMPLELD Programs q O x File Make Project Tools Debug Options Help DMSA Abo vel mk Rgs Ptssssssssssssssosssesss Dictionary ISaGRAF SIMPLELD Global booleans File Edit Tools Options Help Quick declaration Modbus SCADA addressing map Pes a a FFARR EEE EERE EERE EEE EERE EERE EERE EEE EERE EERE EERE REESE EERE EERE EERE EEE EE EEE EEE EE EEE EEE EERE EE EEE EEE TEE E EEE EEE EEE EEE EEE EEE EEE TEETER EEE EEE TEETER Ree ROTO Import text Export text OUTO2 Import truejfaise definitions OUTO3 SW Sort SW Renumber addresses SHUT Shutdown Emergency Stop Type I O connection Conversion tables Cross references K 01 o000 o User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 16 When you click on the Conversion Tables selection the Conversion Tables window will open Next click on the New button and then the Create Table window will now open In the Create Table window enter the name for the conversion table you are creating Conversion tables Eo x Rename Delete Help Create table x Cancel a To properly create our example Conversion Table at least t
427. se The ISaGRAF PAC plus I 87113DW the master card of the Carlson Strain Gauage Inputs 129 Q How To Connect The ICP DAS Power Meter PM 2133 and PM 2134 By The ISaGRAF PAC 130 Q How to automatically synchronize the time of WP 8x47 VP 23W7 over a network 131 Q Soft GRAF Create A Colorful HMI in The XP 8xx7 CE6 and WP 8xx7 and VP 2xW7 PAC paper version 1 3 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 82 Q How to program ISaGRAF PAC to support SQL Client to write data to or read data from Microsoft SQL server Q HART Solution IsaGRAF PAC plus I 87H17W Q How to connect to remote server and send network package via GPRS with uPAC 5000 series controller No 132 133 134 135 136 137 Q How to program an XP 8xx7 CE6 redundant system with I 87K8 expansion base or Modbus I O or other I O Q How to install use ISaGRAF 3 55 Demo Version and its limitations 140 Q How to communicate between InduSoft local HMI and ISaGRAF PACs via Modbus TCP protocol 141 138 Q 1P 8xx7 uPAC 7186EG I 8xx7 I 8xx7 80 provide the Flash memory write protect feature Q How to protect your SaGRAF program from used by the unauthorized people Q How to Make ISaGRAF WinCE PAC to Connect to the Internet and Send Data by 143 GPRS Dial up Q A new function block Mbus12w to write max 12 words to Modbus salve devices Q Soft GRAF Studio Create a Colorful HMI in the XP 8x
428. se modify it TMP MAIL_SET 100 go_mao hotmail com Sender please modify it TMP MAIL _SET 101 168 95 4 211 Mail server 1 s IP please modify it ome of the Mail Server required to login before sending mail so the user need to set these two S f the Mail S quired to login bef ding mail so th d to set these t commands below If Mail Serverl and Server2 no need to login please do not set these commands TMP MAIL_SET 104 MY_ACCOUNT The account has been registered on Mail Server TMP MAIL_SET 104 MY_PASSWORD The password has been registered on Mail Server User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 12 5 Then re compile it and then download it to the controller to run The below windows will show up Please set to send as TRUE to trigger to send one email Few seconds later value of Email state will be 21 or 22 if succeed However value of Email state will be less than 0 if failed When Email progress reach value of 100 it means the email data is 100 sent y SaG RAF WDOEMO 62 LI5T1 List of variables Ioj x File Edit Options Help AA He Q Mame Value Comment magi Remember to assign the Gateway IP to controller EMAIL state z 0 Sleep 1 Busy 21 serverl 22 server2 succeed lt 0 Error EMAIL progress 100 progress Oho action 1 10 connecting 11 100 percent Year ZOU Month Fi Day 4 WeekDay 3 Hour 13 Minu
429. ser s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 21 The following ST programs are all declared as functions They are read_f1 save_f1 G_data and S_data They all return a Boolean value Please refer to below figure to declare function s return value type more description in the Chapter 15 SaGRAF WDEMO 56 Programs _ STOR r Xe Cn TF me oe AA he Te Oe ae ae ys et ee es r a Tania Tig Ens E PLU AL Ay Jeu AYU a read fi Read retained data from file cela mT a lata Get a from F Wl 461 E ISaGRAF WDEMO 56 5 SAVE FI ST program This function me lue F_ ALI 0 19 to fii save _f1 as TRIE Ok n FALSE Error Parameters save fl User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 22 The read_f1 and save_f1 program use local variables as below read_ fl Index of for loops Index of for loops Boot itera nema Index of for loops Index of for loops To declare local variable please double click read_f1 to get into this program Then get into the Dictionary window Then click on Local objects to declare them ISaGRAF HDEMO_56 Programs File Make Project Tools Debug Options Help BA BSW Oot y mk zeae Begin ST1 Functions Read retained data from file save_F1 Write retained data to file C5 FE EM SaGRAF WDEMO 56 READ Fi S
430. set as 16 200F If any converted value of the Temp 0 to Temp 3 returns 999990 it means the related channel s temperature input sensor is break If the I 7018z is connected well OK1 will be True 7018Z OK1 en Q z NEE TYP1_ NI2 PRR Nia TYP3_ Nl4_ TYP4_ NISL TYP5_ NIB_ TYP6_ NIIF_ TYP _ Ma TYPS_ NI9_ TYPS_ NI10_ IO connection a ISaGRAF DEMO_72 I O connection 5 x File Edit Tools Options Help a2 PB t FA S o z bmj ref A ww com_port 2 mj com_baud 9600 3 sss host_watchdog 0 4 sss watchdog _ timer 1E 5 ww chechsum 0 Ls z Lz am bus7000b B remot we s zi User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 67 11 3 10 Whmi_13 Recording I 8017H s Ch 1 to Ch 4 voltage input in a user allocated RAM memory in the WinCon 8xx7 The sampling time is one record every 0 01 second The record period is 1 to 10 minutes Then PC can download this record and display it as a trend curve diagram by M S Excel Note This demo also apply to WP 8xx7 WP 5xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 and VP 25W7 V P 23W7 the difference is the required contents and files both are similar but different with WinCon CD are on respective CD Moreover the WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 and VP 25W7 VP 23W7 do not have the path CompacFlash Temp HTTP WebHM the WP 8xx7 WP 5xx7 and VP 25W7 VP 23W7 use the path Micro_SD Temp HTTP WebHMI and
431. similar as below Type in your prefered password for the Modem station controller The password can contain up to 12 characters amp can t use character and lt Then re compile it and download it to the Modem station controller User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 13 2 Note User can write Visual Basic program to acess to the I 8417 8817 8437 8837 via Modem Please download VB6 demo source code at ftp ftp icpdas com pub cd 8000cd napdos isagraf vb_demo or I 8000 CD ROM napdos isagraf vb_demo om Isa RAF TEST 40 connection File Edit Toole Optons Help BS SBrn telRFR amp A a ret ar run Passw Li JA A IO Board parameter a modem ps Value ED Cancel ta Password mu h Very Important If you don t assign the Modem password to the Modem station controller anyone who has the phone No of your Modem station controller can link to it to do anything Be very careful Now we are going to download and monitor the program of faraway controllers Click on Link setup select Modem Link and then click on Setup kRaGRAF TEST Programs File Make Project Toole Debug Options Help BSE Oe Oe Xie MAD J Begin PC PLC link parameters Cancel Communication port COM Control COM Setup Time out seconds ETHERNET Retnes User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 13 3
432. t Caption as Name Value Align as Top and un check Command variable BISeGRAF DEMO _34 untitled Spotlight File Edit Insert Option Help B D B le tebe we Unipolar bargraph Eutton1 Item style A de Stet a po Cancel Style Scale Caption Align SS Back none Command variable Click and hold on the left button of the mouse to change to the prefered shape as below Save it anytime Color BIsaGRAF DEMO 34 untitled spotlight Fie Edit Insert Options Help 8 D BASNI plea xE doe PTB tH Button1 Button2 Button3 Button4 0 6 L1 L L3 E E VAL OUT 500 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 14 9 F Add Single text Click on Single text set the associated Name as VAL_OUT Caption as Name Align as Top BTsaGRaAF DEMO 34 untitled Spotlight File Edit Insert Options Help B D Rea Boeke ae e xe get ss a Single text Pah rs Buttoned Button Item style E4 Nome CR L1 Style Single pence Color L B Back aL oun E irectons To the top E Balse 4 ue Caption Font Align Color T Back an a Keep it checked for VAL_OUT Move it to the prefered place and save it BIeaGRAP DEMO 34 fontitled spotlight File Edit Insert Options Help 8 DBAs repisa xeda tA Button 1 Buttan Buttons
433. t GQ SLAVE_ 1000 is the COM Port No SLAVE_ 1000 is the Net ID of device Here 2001 means using COM2 device ID 1 If the ACTION input keeps at the status of TRUE it will continue to write this B1 many times to that Modbus device until it is reset to FALSE If you just want to write one time you can write a LD program similar as the following The act1 is declared as an internal Boolean variable If set actl to TRUE the below MBUS_B_W will write once and immediately reset act1 to become False MBWS By stat Q User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 8 6 To write Modbus command periodic user can use below similar code Here write once every 10 second BLINK RUN MBUS BE W stat Q 2001 SLAVE_ 1000 is the COM Port No SLAVE_ 1000 is the Net ID of device Here 2001 means using COM2 device ID 1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 8 7 Modbus Example Function 3 Mbus_r1 Below example use Modbus function code 4 device NET ID 1 to read 8 word values starting at device s Modbus address No 100 every second via controller s COM4 The first four Word values are stored in Word to Word4 variables The fifth and sixth word values are converted to become a REAL value stored in REAL_1 variable The 7th and 8th word values are converted to become a long integer value 32 bit signed
434. t 1 Analog I O demo I 87024W The related demo project name wp_vbO01 pia Slot 2 I 87017HW wD vb03 Read Write ISaGRAF internal integers timers amp real variables i The related demo project name wp_vb03 pia wp_vb02 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 13 WP 8xx7 Web HMI example program Web HMI example program WinPAC 8xx7 CD ROM napdos isagraf wp 8xx7 wp_webhmi_demo or ftp ftp icpdas com pub cd winpac 8xx 7 napdos isagraf wp 8xx7 wp webhmi demo Related ISaGRAF program WP 8xx7 CD ROM napdos isagraf wp 8xx7 demo or ftp ftp icpdas com pub cd winpac 8xx7 napdos isagraf wp 8xx demo Name Description WP 8xx7 Web HMI IO board sample A Web HMI sample No I O board examplel wphmi_01 wphmi_02 wphmi_03 wphmi_04 A simple example listed in Chapter 4 Display controller s date amp time DI amp DO demo Read Write Long float amp Timer value Read Write controller s String l Multi Pages demo l wphmi_05 Pasemenrisonthe len Slot 0 I 87055W sonia Sa Multi Pages demo penn Page menu is on the Top wphmi_06 AIO demo scaling is in ISaGRAF wphmi_07 AIO demo scaling is in PC wphmi_08 download controller s file to PC pop up an alarm window on PC wphmi_09 wphmi_11 Trend curve Record 1 to 8 Ch I 8017HW s volt every 50 ms and draw trend curve by M S Excel Record 1 to 4 Ch I 8017HW s voltage every 10 ms and draw trend curve b
435. t I O I 8KE4 8 MTCP http www icpdas com products PAC 1 8000 1 8KE4 8KE8 MTCP htm WinCon SaGRAF driver http www icpdas com products PAC i 8000 isagraf link htm NS 205 NS 208 http www icpdas com products S witch industrial ethernet_switch htm 22 1 Induction of the I SKE8 MTCP I O One W 8x47 8x46 can connect max 24 nodes of I 3KE4 MTCP and I 8KE8 MTCP The Ethernet I O scan time of the 3000 6000 I O Channels is about 30 to 40 ms If connecting less than 10 nodes of I 8KE4 8 MTCP the Ethernet I O scan time is about 20 ms However it still depends on how big complex of your logic program The Ethernet I O scan time of one W 8x36 8x37 is about twice of the W 8347 8747 That means W 8x36 8x37 is slower than W 8347 8747 when connecting Ethernet I O Configurel W 8347 8747 Dual Ethernet version connecting Modbus TCP IP I O in a safe local private network PC HMI SCADA Advantage Modbus TCP IP I O are in local amp private network Not accessible by other machine in the public network W 8x47 8x46 Two Ethernet version NS 205 To public network Please connect Modbus TCPIIP I O to LAN1 as Pp lint S 1 a LAN2 dna LAN1 ere Ns 208 Modet I 8KE4 MTCP G the r Oty see Model I 8KE4 MTCP G Model l 8KE4 MTCP G Model I 8KE8 MTCP G One Wincon can connect up to 24 nodes of i 8KE4 MTCP or i8KE8 MTCP User s Manual Of ISaGRAF
436. t of check 2nd byte STEP 1 check if 2nd byte valid or not 16 3F 2nd byte is STEP 2 for next STEP NUM 2 plus valid received byte number by 1 TMP Array_w 2 NUM byt save 2nd valid byte to byte array 2 else if CMD 16 4D or CMD 16 6D cmd is M m and byt gt 16 31 and byt lt 16 33 then l 3 STEP 10 for next step NUM 2 plus valid received byte number by 1 TMP Array_w 2 NUM byt save 2nd valid byte to byte array 2 Elsif CMD 16 54 or CMD 16 74 cmd is T t And byt gt 16 30 and byt lt 16 39 then 0 9 STEP 10 for next step NUM 2 plus valid received byte number by 1 TMP Array_w 2 NUM byt save 2nd valid byte to byte array 2 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 30 else STEP 0 not valid data reset STEP to 0 TSTOP tout stop ticking tout tout T Os reset tout NUM 03 reset NUM end_if end_case gt STEP 2 after receive 2 byte check if 3 byte is lt CR gt if byt 16 0D then check 3rd byte is lt CR gt or not STEP 21 complete command is received send answer to Com3 2 case CMD of R l NAD 16 4D 16 6D M orm a i TMP ComWrite 3 16 4D M py TMP ComWrite 3 Mode 16 30 Mode TMP ComWrite 3 16 0D lt CR gt 16 54
437. t once then set this Check1 as 1357246 to start the program as below User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 3 Then you can add the Check1 condition into the first row of the Ladder program t If Check is not equal to 1357246 exit this program to run next program Then you can add the Check condition into the first row of the ST program If Check1 is not equal to 1357246 you may write some code to set some safe and initial value to those retain variables or exit this program to run the next program if Checkl lt gt 1357246 then return end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 4 Old Retain Method If the controller doesn t find the battery backup SRAM in the back plane of the controller I 8xx7 S256 S512 I 7188EG XG uPAC 7186EG X607 X608 WinCon 8xx7 256 S512 The I 8xx7 and I 7188EG XG uPAC 7186EG supports old retain variable while WinCon supports no retain variable There is a 31 byte NVSRAM in the I 8xx7 amp I 7188EG XG uPAC 7186EG s CPU board Up to six Integers Reals signed 32 bit and sixteen Booleans can be retained with this 31 byte NVSRAM To enable the old retained function click on Retain for each associated variable BaGRAP SA Froerams File Make Project Tools Debug Options Help A Bee Deg xe Oe aes b SaGRAF SA Global integers reals File Edit Tools Options Help
438. ta total 57 bytes 1 2 3 4 5 6 7 8 9 10 comma lt SP gt amp lt Tab gt are all acceptable lt 0 123 gt lt 456 789 gt lt 100 gt lt 2 3E3 gt Example Please download demo_44 to one I 8417 8817 8437 8837 Then edit a text file as below 1 1000 250 100 sTART The 1000 means the blinking period of L1 is 1000 ms The 250 means the blinking period of L2 is 250 ms The 100 means the blinking period of L3 is 100 ms Then run UDloader exe You will see something change on the led of the controller de ICPDAS UDloader e ioj x Upload SRAM MODULE 512 FileID Fil Name Begin Head Tail End Upload ie Nat Used E a 1 1 Upload 1 2 Not Used as ae Upload 2 J Not Usd pooo a a Upload 2 4 NotUsed FE plead 5 NotUsed fl pla 5 6 Not Used FL FE pled T NotUsed Rf Upload T 8 NotUsed M Lf pla 8 Click Link Setup to set proper Upload All communication parameters Link Setup Destination Folder CADocumel Click Set Load File to indicate B which text file to operate TOWE Download I File Name C Documents and Settings Administrator at E eet Load File _ WDloader d tet Cancel Help Wrong Sting found at lne d Error sti Click Download to start to download 230 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 12 10 3 4 Operation Functions for the battery backup SRAM The below f
439. ta trom a file Data 1 User data be retained total ic SIZE1 name can be different Dataz z User data be retained total is SIZE1 name can be different Datas 3 User data be retained total is SIZE1 name can be different Data 0 User data be retained total is SIZE1 name can be different Datas 0 User data be retained total is SIZE1 name can be different Data 0 User data be retained total ic SIZE1 name can be different Datel 0 User data be retained total is SIZE1 name can be different Datel 0 User data be retained total is SIZE1 name can be different Datang 3 User data be retained total is SIZE1 name can be different Data 0 10 User data be retained total ic SIZE1 name can be different Data 1 0 User data be retained total is SIZE1 name can be different Datal 2 0 User data be retained total is SIZE1 name can be different Datal 3 0 User data be retained total is SIZE1 name can be different Datal 4 14 User data be retained total is SIZE1 name can be different Datal 5 0 User data be retained total is SIZE1 name can be different Datal 6 16 User data be retained total is SIZE1 name can be different Datal z 6547 9 User data be retained total is SIZE1 name can be different lt end of list You may modify any value of USER Data Datal to Datal7 Then the new value will be saved once into file of System_Disk data56 txt Then you can open this file on the WP 8xx7 s monitor screen by double click on the file name You will see the related value is modified P
440. te 20 second ag mail subject Testing Email Mo 1 Email subject Max 1268 character lan be local language mail data SOOT 13 20 27 PUDSUATHIS message is Email datal Max 255 character Can be local language mail datas More message Email data Max 255 character Can be local language TMP 1 return value of Mailsndt 1 Ok s0 error to_ send FALSE Set as TRUE to trigger to send an email Email_ Priority J 1 High 3 Mormal 5 Low send of list User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 12 6 Below is the description of the three ISaGRAF functions for sending email MAIL _Set CMD_ MSG_ Parameters CMD_ Integer Can be the following value 1 2 to lO 100 101 102 103 Set receiver for example TMP Mail_set 1 chun_tsai icpdas com Max receiver length can not exceeds 48 characters Set receiver 2 to 10 if they exist Set the sender for ex TMP Mail_set 100 senderl icpdas com Max sender length can not exceeds 48 characters Set the mail server 1 s IP address for ex TMP Mail_set 101 168 95 4 211 Set the mail server 2 s IP address if it exist a new TCP port No for sending email Default is 25 SMTP protocol eR Since the following IsaGRAF driver version support CMD_104 105 and 106 UPAC 7186EG ISaGRAF driver Ver 1 14 or later UPAC 5xx7 Since it is released 1P 8xx7 ISaGRAF driver Ver 1 10 or later WP 8
441. te first scan cycle or not MIT Flag to indicate first scan cycle or not OOOO internal false true TRUE NOTE You MUST make sure that the variable you have declared has the desired Attribute assigned If you decide that you want to change a project variable s attribute just double click on the variable name and you can reassign the attribute for the variable Using the same method described above declare the additional Boolean variables for this example program M3 When you have completed the Boolean variable assignments the Global Boolean window should look like the example below SaGRAF SIMPLELD Global booleans File Edit Tool Options Help Jla OMG See 4 Xe Booleans InteyersiReals Timers Messages FE instances Defined words Mame attrib Addr Comment Flag to indicate first scan cycle or not MS pulse There are three outputs used in this example program named OUTO1 OUTO2 and OUTO3 ISaGRAF provides a quick and easy way to declare like variables that are sequentially ordered To begin this process click on the Quick Declaration icon and enter in the output number that you will start with in the Numbering from and To field this example uses from to 3 Enter the Symbol name for the output variables being declared and lastly set the attribute to Output User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 8 Ty InaGRAF SIMPLELD Global boolean
442. te temperature input module to get clear Degree Celsius or De ores Fahrenheit Input ValUG ataroni e a a r E A rE OR 6 13 6 4 REDUNDANT E US70OU siminer n O E E O ESEE 6 15 CHAPTER 7 CONTROLLER TO CONTROLLER DATA EXCHANGE eseseccccccccccccccccccccecsesccsesssssssssssssso 7 1 LE BASC FBUS ROLES omoare a E E a E A E 7 1 7 2 CONFIGURING THE ISAGRAF PAC To BE A FBUS MASTER OR SLAVE sscccccccesssseeccceceeeaeeseeeceecesaaaeeeeeseeeas 7 3 1 3 PROGRAMMING FBUS PACKAGES crainn n a a A a eN 7 7 TAS ANE BUS DATA XCHANGE EXAMPLE ee aa cade e T atee vues sudy sia Cal denutudatea Cuduricn a 7 10 T9 PROGRAMMING THE EBU cassia secctesieacneieseuu ues Vanaea ase uiaesaualesanuaeaeup ols ease cosas E ud asl ones uous a eo eoanees 7 15 EE eam bee E E E SOD en RR OR E E OR Sn RRR Ne SIRT MOY EE PRERENDER on AT RP COMED RNR ER SHER NE E 7 15 7 5 2 Configuring the ISaGRAF PAC To Be A Ebus Master Or Slave cccccccccssssseeeeeseeeeeeeeeeeeeeeeeaaaeeeeeeees 7 17 Poe Propran BP OUS PACK ACES an a E uve brea A T len luutanas ieeaeaentee veg te edna 7 19 CHAPTER 8 LINKING THE MODBUS RTU ASCH DEVICES sssssesssececcecccccssssssessccceecoccsossssssessseeceeesssso 8 1 8 1 CONFIGURING THE CONTROLLER TO BE A MODBUS MASTER ccccssssssseceecceeeesseccccecsaaesescecceesaausseceecessaaaaeeeees 8 2 8 2 PROGRAMMING MODBUS R TU MIASTER isinira esa n a O R 8 4 8 EINKING THEM 000 VO MODULE Seison a a S a Gla nasi leh ect lavas
443. ternal Input or Output integer variables or integer constants Rule 4 Each number assigned to a Boolean package or an integer package can only be written to by one controller system across the same Ebus Group_No network Each controller CANNOT write the same identification number for either a Boolean package or an integer package across the same Ebus Group_No WRITTING A PACKAGE IS NOT SHARED with the other controller across the same Ebus Group_No network In this example there are five controllers communicating through an Ebus Group_No network and the controllers are named S1 S2 S3 S4 and S5 respectively If the S1 controller attempts to write a Boolean package with an ID of 1 and an integer package with an ID of 1 across the Ebus Group_No the other four controllers CANNOT write either a Boolean package or an integer package with the same number However the other controllers could write a Boolean package with an ID of 3 and an integer package with an ID of 2 There is no limitation on how many controllers can read the same number package across the same Ebus Group_No network Any of the S2 S3 S4 and S5 controllers can read the Boolean package with an ID of 1 and the integer package with an ID of 1 if desired Rule 5 ONLY ONE controller in the same Group_No can be configured as a Ebus Master all the others controller in the same Group_No MUST be configured as a Ebus Slave The master
444. teway server in ISP company Send Command or Time Synchronization A Location C i 7000 WO Auto Report Location B wi P Q 3 oe i 7000 I O es S T 9 Modbus RTU device i 87K VO User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 19 3 UDP Recv To receive message from remote PCs or controllers please use udp recv function For example test if message is coming from UDP Msg1 is declared as Message variable if return empty message that means no message coming Msgl udp_recv Note 1 The receiving buffer size for WP 8xx7 WP 5xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 VP 25W7 23W7 and W 8xx7 is 8192 bytes include one extra message end byte in each message While for I 7188EG uPAC 7186EG uPAC 5xx7 and iP 8x47 is 2048 bytes 2 If the receiving buffer is full the oldest received message will be overwritten UDP Send To send message to remote PCs or controllers please use udp send function For example TMP is declared as Internal Boolean Ist parameter To which connection defined in IO connection udp_ip can be to 4 2nd parameter the message to send out Return True Ok False sending buffer is full or connection not defined well in udp 1p TMP udp send 1 Alarm Note 1 The sending buffer size for WP 8xx7 WP 5xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 VP 25W7 23W7 and W 8xx7 is 204
445. the Fbus master and you CANNOT configure a controller system to be both a Fbus master and a Fbus slave oe SaGRAF TEST 1 0 connection File Edit Tools Options Help 2a PBeh TL FA S a T J ui i B rate 0 If you configure a controller system as an Fbus slave only one parameter needs to be set and that is the baud_rate parameter The baud rate parameter can be set to 2400 4800 9600 19200 38400 57600 or 115200 baud rate The default baud rate value is 19200 for the controller system All controllers on the same Fbus network MUST be set to the same baud rate User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 Select board equipment i xj bus7000 1 7000 IOs on Com3 or COM4 fbus m lt New gt Set as Fieldbus Master fbus s lt New gt Set as Fieldbus slave i8042 Isolated 16 CH DI amp 16 CH DO i 87054 Isolated 8 CH DI amp 8 CH DO i 87055 8 CH DI amp 8 CH DO i 87063 Isolated 4 CH DI amp 4 CH DO master Set as Fieldbus Master FS gt ua ref 106 ss baud rate 19200 1 4 Cancel a Note Library C Boards Equipments File Edit Tools Options Help 2 PSP tL FR S ous baud rate 19200 4 I O Board parameter x Parameter baud_rate ICP DAS There is a digital input channel associated with the fbus_s rate equipment If the Fbus connection has been establishe
446. the I 3KE4 8 MTCP by using below functions please refer to Appendix A 4 ISKE _B Set Boolean variable as an I SKE4 8 MTCP Ethernet I O I8SKE BA Set Boolean Variable Array as several I 83 KE4 8 MTCP Ethernet I O s ISKE_ F Set REAL variable as an I 8KE4 8 MTCP Ethernet I O ISKE F A Set REAL Variable Array as several I 8KE4 8 MTCP Ethernet I O s ISKE_N Set Integer Variable Array as an I 3KE4 8 MTCP Ethernet I O s ISKE N A Set Integer Variable Array as several I 8KE4 8 MTCP Ethernet I O s Example program Wdemo_30 amp Wdemo_31 at W 8xx7 CD ROM napdos isagraf wincon demo or ftp ftp icpdas com pub cd wincon_isagrat napdos isagrat wincon demo User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 22 9 Chapter 23 Connecting the Fast FRnet Remote I O uPAC 7186EG since its driver version 1 06 WinCon 8xx7 since its driver version 3 42 1PAC 8447 8847 since its driver version 1 01 VP 25W7 23W7 since its driver version 1 02 WP 8xx7 XP 8xx7 Atom CE6 and XP 8xx7 CE6 since its released driver version 1 01 support the FRnet Digital I O I 8xx7 40MHz I 8437 80 I 8837 80 and I 7188EG XG don t support the FRnet I O WP 8xx7 VP 2xW7 iPAC 8xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 and W 8xx7 required an I 8712W to connect to the FRnet I O uPAC 7186EG required a FX 016 x board to connect to the FRnet I O Please visit below web site for more information I 8172 I 8172W and FRnet I
447. the IsaGRAF variable minus one For ex Modbus address O is associate with ISaGRAF Network address 1 Modbus address FFE 4094 is associate with ISaGRAF Network address FFF 4095 Function 1 Read N Bits Function reads n number of bits nbi in Boolean starting from Modbus address addH addL Request Siv 01 adanadat 00 abi orcH orck answer sv Jorne vo Vi enjet VO V1 are the bit fields of number of bytes nbb using the following format Bit 8 Bit 1 vo ioo T vi oomi bit nbi we lololol iII Bit 1 corresponds to the Boolean value of the variables with the Modbus address addH addL Bit nbi corresponds to the Boolean value of the variable with the Modbus address addH addL nbi 1 If the value of the Boolean variable is True then the corresponding bit will be set to a 1 If the value is False the corresponding bit will be set to a 0 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 5 2 Function 2 Read N Bits Function 2 has the same exact same format as function 1 Function 3 Read N Words Function 3 reads the number of words nbw in signed 16 bit integer format starting from the Modbus address addH addL Request sv 03 add addi 00 mbv orc orc Answer iv 03 ob va vi eE oe The number of bytes nbb is the total number of bytes from word value high byte vH to word value low byte vL inclusive IMPORTANT NOTE About Function 3 Integer values can
448. the inverted command as below the first byte should be the Module s Address number It can be 01 to F7 And then click Go If the response is 01 46 29 it means command succeed Power off this M 7000 modules And it is well configured F Single Line Terminal 01 46 2901 e Command 01 46 29 01 Response jar 46 29 00 FF 9D 01 462701 3E 4D a 01 46 2900 FF SD 4 fine The first byte is the M 7000 s Module Address It can be 01 to F7 Modbus RTU Function Description Fc Read multiple coils status Ose for CO Met ID Station number Filo 01 Byte 2 3 Reference number Byte 4 5 Bit count User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 5 21 2 Writting program to connect to I 7000 modules Important If your M 7000 is M 7041 or M 7044 or M 7050 or M 7053 or M 7060 or M 7063 or M 7065 or M 7041D or M 7044D or M 7050D or M 7053D or M 7060D or M 7063D or M 7065D please follow the former section s Step5 to invert their digital input channels To program Modbus RTU Master please connect mbus in the ISaGRAF IO connection windows as below Please set proper port no baud amp timeout timeout setting default is 500 ms you can specify 250 ms if connecting only M 7000 I O modules aw aGRAF CREATION I O connection Ioj x File Edit Tool Options Help SPSemn tl FAS o a manj ref 107 oma port no 3 ban ba
449. tilities for SaGRAF 9 MBICP i ka EF Modbus Utility Choose Controller xi Please choose controller paua sa 885 E i j F i ba i 4 B it N E 1 E B L x D amp Modbus TCP Important Noticed Every I 8KE4 8 MTCP with new plugged IO board should be configured at least once by Modbus utility If the 2nd amp 3rd Leds below the Five 7 Segment Led is always blinking it means this I 8KE4 8 MTCP is not configured well by the Modbus utility User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 22 5 Enter the correct IP of the I 8KE4 8 MTCP on the Modbus utility and then click on Connect If the I 8KE4 8 MTCP is well connected You will see the Modbus address assigned in the I 8KE4 8 MTCP For example D I starting from 0 to A I starting from 0 to Modbus Utility Yer 1 6 8 i oj x File Windows Chenttook setting Help F Tal B 2 ff fa L z z z F 7 ey status Load DAVE Monitor Log ocale Exit Controller a Communication Mode Disconnect Hf Modbus Utility Yer 1 6 8 O x File Windows Clenttoole Setting Help Status A 7 qA Modbus firmware version v1 6 6 Aug 10 2006 Exit t SK 8 7K Diaital DI Config PowerOn Value Safe Value a 5 I 8KE4 NetliD 1 10 0 0 109 Connect Online Mode Ethernet Disconnect B T Cho M Chi e gq M Chd gq l Ch
450. titled J A Untitled 5 Untitled 6 Untitled 7 Untitled Background gt Select Lib New Lib Unattach Lib Delete shape Place CANCEL User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 19 Click on Label then select the prefered Color Font Align and set Content to GOTO S11 and make sure Use label is selected Create Function Key Object General Shape Label Attribute Color Font 16 Alien Center State lo Content Click on Bit Lamp EBasyBuilder EBFril Window 10 Initial Screen EE Ble Edit View Option Draw Parts Library Tools Window Help 16 x Disia Lela alee 21 1 algal le 2a Font 16 AL BHAE 271 ru wu BS LEB LEL EEL BRIE OJE F EES Pe d WI pec ma Windows A EL Objects Bit Larap object fe 334 99 o User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 4 20 Click on General then select Device type to 0x Ox is for boolean variables then set Device address to 1 this value is associated with the network address value of the variable in the I 8xx7 And then set Function to Normal Create Bit Lamp Object ni Shape Label escription Fead address Device type Ox Device address fi N Attribute Function HATENE By the same way as former select prefered
451. to an ISaGRAF controller system In the Dcon Utility the default Checksum setting is disabled and each I 7000 and I 87xxx modules must set to the same baud rate as the controller system If the type for I 7000 and I 87xxx I O module is Analog Input please configure the format as 2 s complement by DCON utility Like these AI modules I 7005 I 7013 I 7015 I 7016 I 7017 I 7017R I 7018 I 7018R I 7019 I 7019R I 7033 I 87005W I 87013W I 87015W I 87015PW I 87016W I 87017W I 87017RCW I 87017ZW I 87017DW I 87018W I 87018RW I 87018ZW I 87019RW and I 87019ZW etc If the type for I 7000 and I 87xxx I O module is Analog Output please configure the format as Engineer Unit by DCON utility Like these AO modules I 7021 I 7022 I 7024 I 87022W I 87024W and I 87026W User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 5 6 2 Opening The Bus7000b Function To create a link between the ISaGRAF controller system and an J 7000 and I 87xxx module you need to connect the Bus7000 function or Bus7000b the Checksum can be set as Enable or Disable but the Bus7000 can only be used when the Checksum is Disable through the ISaGRAF I O Connection window The Bus7000b function is considered a virtual board and must be selected from the Equipments section of the Select Board Equipment window The Bus7000b MUST be connected to slot number 8 or higher
452. to the Cancel CD ROM drive where the Workbench CD is installed se then double click on the install bat file listed on the SSE rer wier bareh ISaGRAF CD Select the language Recommend to use English because this manual If the install bat file is not found on your ISaGRAF uses English version CD then double click on the SaGRAF exe file to MEE start the installation process ISa GR RAF is a trademark of ICS TRIPLEX 15 aGARAF User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 1 1 To begin the ISaGRAF 3 x software program click on the Windows Start button then on Programs and you should see the ISaGRAF program group as illustrated below fm ISeGRAF 3 5 a a Projects as Read Me p Report 1 1 1 The hardware protection device dongle amp USB Key Pro You must install the hardware protection device dongle provided with the IsaGRAF software on your computers parallel port to for the IsaGRAF program to achieve fully authorized functionality ISaGRAF 32 E amp ISaGRAF 32 C DO NOT need dongle or USB Key Pro While using ISaGRAF and the dongle 1s plugged well if the Help About says Maximum number of IO variables 32 it means ISaGRAF workbench cannot find the dongle well Please reset your PC and then check the Help About again A SaGRAF Project Management File Edit Project Tools Options Maii Ey Cy Ge mm 1 ae User s guide
453. tomatically declared variables Name format Type_Slot_Channel Type Digital Input DI Digital Output DO Analog Input Al Analog Output AO Slot one digital slot number Channel two digital channel numbers For ex DI_0_02 Digital Input channel at channel No 2 of slot 0 AI_5_06 Analog Input channel at channel No 6 of slot 5 DO_2_12 Digital Output channel at channel No 12 of slot 2 AO_1_03 Analog Output channel No 3 of slot 1 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 32 3 7 PWM Output The scan time of the IsaGRAF controller depends on the IsSaGRAF program and the hardware driver For normal usage the scan time is about 5 to 40 ms It may go up to 100 ms sometime when the user s ISaGRAF program is very complicated It is not easy to generate a precise periodic pulse output because the scan time of ISaGRAF is always varying for example a square curve of 2 ms OFF amp then 1 ms ON To achieve this kind of application IsaGRAF provide PWM output functions Note please refer to http www icpdas com fag isagraf htm gt FAQ 105 for more about the high speed PWM such as I 8088W I 87088W or I 7088W Only parallel Output boards are supported the PWM function As follows I 8037W 8041 W 8042W 8054W 8055W 8056W 8057W 8060W 8063W 8064W 8065W 8066W 8068W 8069W The PWM function is not fit for Relay output because the response time is too slow For I 7188EG XG pPAC 7186EG onl
454. tore 1200 Short Int Every 75 sec amp Send To PC Via Com3 ccccccccceeeeceeeeeeeeeeeeeeeeeeeeeees 11 23 11 3 4 Demo_33 R W User Defined protocol Via Com3 RS 232 RS 485 oo cccccccsssesssessseeeeeeeeeeeeeeeeeaaaaeeeeeees 11 28 11 3 5 Wdemo_24 Send string to COM2 when alarm 1 to 8 happens cccsssssseeeeeeseeeeceeeeeeeeeeaeeeeeeeeeees 11 36 11 3 6 Whmi_12 Recording I 8017H s Ch 1 to Ch 4 voltage input in a RAM memory in the WinCon 8xx7 The sampling rate is one record every 0 05 second The record period is 1 to 10 minutes Then PC can download this record and display it as a trend curve diagram by M S Excel ccccccccsesssssesseeeeeeeeeeeeeeeeeeeeeseeeeeees 11 40 11 3 7 Demo_71 Recording I 8017H s Ch 1 to Ch 4 voltage input in S 256 512 in I 8437 80 or I 8837 80 The sampling time is one record every 0 05 second The record period is 1 to 10 minutes Then PC can download this record and display it as a trend curve diagram by M S Excel cccccccccccssssssseseeeeeeeeeeeeeeeeeeeeeaeeeeees 11 53 11 3 8 How to do periodic operation in ISaGRAF controllers 00 0 0 cccccccccccccccccccccceecasseeesseeeeeeeeeeeeeeeeeeaeaaaaeeeeses 11 61 11 3 9 Demo_72 Connecting I 7018z and I 7188EGD to get 6 channels of 4 to 20 mA input and 4 channles of Thermo couple temperature input And then also display the value on PC by VB 6 0 program 11 62 11 3 10 Whmi_13 Recording I 8017H s Ch 1 to Ch 4 voltage input in
455. toward inside from motor This command provide parameters to define the rotating direction of motor Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 defdirX_ integer X axis direction definition valid is O 1 defdirY_ integer Y axis direction definition valid is O 1 0 normal direction 1 reverse direction Return Q_ boolean always return TRUE Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 M_s_ mode Set output mode Parameters card NO_ integer the card No has been set by M_regist valid is 0 19 modeX __ integer X axis mode valid is 0 1 modeyY _ integer Y axis mode valid is 0 1 0 CW_CCW 1 PULSE_DIR Return Q_ boolean always return TRUE CW i Pe Mode 0 CW_CCW CCW Pulse Mode 1 PULSE_DIR Direction Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 17 M_s serv Set servo ON OFF Parameters card NO_ integer the card No has been set by M_regist valid is 0 19 sonX_ integer X axis servo hold on switch valid is O 1 son Y _ integer Y axis servo hold on switch valid is O 1 0 OFF 1 ON Return Q_ boolean always return TRUE Example I 8417 8817 8437 8837 demo
456. troller fault type fault_type R_MB_ADR 1 9998 if is_fault 1 then Do action here when Local Fault happens 3 Only for WinCon 8x37 Stop program running amp reset all output in slot 1 to 7 tmp Stop_APL To clear the value in Network address 9999 amp 9998 when Local fault happens tmp W_MB_ADR 1 9999 0 tmp W_MB_ADR 1 9998 0 end_if User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 10 33 Chapter 11 ISaGRAF Programming Examples amp FAQ When you receive the ISaGRAF controller system ICP DAS has created a number of ISaGRAF programming examples for them These example programs are useful for understanding how to program the controller system with the ISaGRAF Workbench software program 11 1 Installing The ISaGRAF Programming Examples The ISaGRAF programming examples are installed on the same CD ROM which the ICP DAS Utilities For ISaGRAP resides The CD ROM is delivered with the product You will find the programming example files in the below sub directory in the CD ROM I 8xx7 I 8000 CD ROM napdos isagraf 8000 demo I 7188EG uPAC 7186EG I 8000 CD ROM napdos isagraf 7188eg demo I 7188XG I 8000 CD ROM napdos isagraf 7188xg demo 1P 8xx7 I 8000 CD ROM napdos isagraf iP8000 demo VP 2117 I 8000 CD ROM napdos isagraf vp2k demo XP 8xx7 CE6 XP 8xx7 CE6 CD ROM napdos isagraf xp 8xx7 ce6 demo XP 8xx7 Atom CE6 XP 8xx7 Atom CE6 C
457. trollers serial port communications and the default parameters for COM1 RS 232 and COM2 RS 485 ports are Baudrate 19200 Parity none Format 8 bits 1 stop Flow control none User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 31 IMPORTANT NOTE It may be necessary to change the COM port settings for the development PC Depending on which computer operating system you are using you will need to make sure that the COM port can properly communicate to the ISaGRAF controller system DOWNLOADING THE EXAMPLE PROJECT Before you can download the project to the controller you must first verify that your development PC and the controller are communicating with each other To verify proper communication click on the Debug icon in the ISaGRAF Programs window as shown below ISaGRAF SIMPLELD Programs File Make Project Tools Debug Options Help P wee tet gxr mk aes end init handle INIT variable Begin LO1 Ladder Diagram If a program is already loaded in the controller system the name of the project will be displayed with the word Active following it If the message in the SaGRAF Debugger says Disconnected it means that the development PC and the controller system have not established communications with each other The most common causes for this problem is either the serial port cable not being properly configured or the development PC s serial port communications DO NOT match that of
458. turn TRUE ORG high speed V Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 Note The lower DDA cycle is given the smaller delay time between ORG1 ON and X_STOP ON or ORG2 ON and Y_STOP ON when using M_hsporg amp M_Isporg command For ex DDA_cycle_ set to 4 the delay time is about 5 to 13 ms User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 18 20 M_Isppmv Low speed pulse move Low speed move a specified pulse Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 AXIS _ integer 1 X axis 2 Y axis Pulse_ integer number of pulse to move if gt 0 move toward CW FW dir if lt 0 move toward CC W BW dir Return Q_ boolean always return TRUE pulseN oo Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 M_hsppmv High speed pulse move High speed move a specified pulse Parameters card_NO_ integer the card No has been set by M_regist valid is 0 19 AXIS_ integer 1 X axis 2 Y axis Pulse _ integer number of pulse to move if gt 0 move toward CW FW dir if lt 0 move toward CCW BW dir Return Q_ boolean always return TRUE high speed pulseN Example I 8417 8817 8437 8837 demo_46 demo_27 demo_28 W 8337 8737 wdemo_26 wdemo_27 wdemo_28 wdemo_29 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3
459. ty Yer 4 4 2 File COM Port Search Run Ternmal Help pejal o ee Module fdhs Baudrate Checksum Description Coo 9600 Disable Al Universal m m VT hernocouple DCON Running 00 00 frre 7 rick N 0000 4 00 00 Eke po fF A froo00 eK ype i 00 00 4 mF N ekee A po FF N TEk 7 00 00 4 Iv m w z Iv Iv Iv Iv Step 4 Power off M 7000 Remove connection between INIT and GND Then power it ON again Run DCON utility to search amp then check if the setting is correct or not If the setting is not correct modify them and click on setting again If this M 7000 Module is M 7041 or M 7044 or M 7050 or M 7053 or M 7060 or M 7063 or M 7065 or M 7041D or M 7044D or M 7050D or M 7053D or M 7060D or M 7063D or M 7065D please go to step 5 If the module is not in the above item numbers then this M 7000 is well configured Note 1 Every M 7000 must be configured to a unique Address number 1 to 247 and the same Baudrate and other proper setting before using it 2 User may refer to the attatched manual in the product box or visit http www icpdas com products Remote_IO m 7000 m 7000_list htm to get each M 7000 Module s Manual to find their Analog Input Type and Data Formate Table Type code setting User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 21 3 Important Step5 After the initial configuration is completed Step 1 to 4 pl
460. uble click on 1 on the right hand side of the SaGRAF I O Connection window With the Connect I O Channel 1 window now open click on the Connect button to create the link between the variable K1 and channel number 1 of the Push4Key input an ISaGRAF IO4LD 1 0 connection aT BS File Edit Tools Options Help a reeeltt Fis o am i_ 8055 ae e DIG ix 4 n Jz nz 1 em i_87055 DIB nel a Dos COE xi 2 i_87017 s eerozq Channel a o oe e 4 Free S 6 Connect k EB push key Biz Next Previous User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 5 If you connect an input or an output variable to the wrong or undesired I O location double click on the I O point you wish to remove The Connect I O Channel x will open then click on the Free button to remove that variable from the I O point Click on here to see the on line help EELEE g i When you click on the Free button you will see that the variable is removed from the I O point in the TSaGRAF I O Connection window and the variable is placed in the Free portion of the Connect I O Channel x window Connect 1 0 channel 4 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 6 3 2 Linking Analog Type I O Boards Note 1 The I 87017ZW is better than I 87017 and I 87017C in industrial application The I 87017ZW can be set as 10 Ch Differential input or 20 Ch Sing
461. ud 9600 scons char 6 4 oe parity 0 oma stop bit 1 6 sat timeout 250 i 5 m mbus com_port ne I Then please create an Ladder program or function block program to access to each M 7000 I O channels ICP DAS ISaGRAF controllers can access to M 7000 modules by using Mbus r Mbus rl Mbus b w Mbus wb amp Mbus n w 1 Read max 12 word value 32768 32767 using Modbus function call 4 to read M 7000 Analog input channels or read D I counter value And it can also used to read six 32 bit int value 2 147 483 648 2 147 483 647 using WD_LONG function block to convert two Word to one 32 bit interger 2 Read max 192 bit value using Modbus function call 2 to read M 7000 Digital input channels Using WD_Bit function block one Word to 16 Boolean value Same as Mbus_R but with one extra setting Period It can be set as 1 600 Read words or bits with a specified period time unit 1s second write 1 word using code 6 write 2 4 words using code 16 BUS_B_W Write max 4 bit value using Modbus function code 5 or 15 to witre M 7000 Digital output channels write bit using code 5 write 2 4 bits using code 15 MBUS_ Write max 16 bit value using Modbus function code 15 to witre M 7000 Digital output channels MBUS_N_W_ Write max 4 word value 32768 32767 using Modbus function code 6 or 16 to witre M 7000 Analog output channels M User s
462. ue and both OUTIL and OUT2 turn on and off together and Mode2 is false 2 sfc_enam mT Fie Tools Options isi ISaGRAF SFC_EXAM Debug programs E oj x File Project Tools Options Help Sequential Main active e Model active eS Mode2 inactive u Begin SelMode Ladder Diagram When K2 is on Mode2 is true OUTIL will turn on while OUT2 is off and then they will alternate where OUT2 will turn on and OUT1 will be off and Model is false ISaGRAF SPC_EXAM Debug programs Pile Pras Took Options Help Ladder Portion OF SFO Program Main active Model inactive Mode active TETTETETT adol xi ile Edit Options H li Ple Edit i Help Sequeritial D sic_exam a jojxi Pile Tools wiebe nan User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 64 2 6 Using Variable Array If your ISaGRAF Workbench is version of 3 4 or 3 5 you can declare variable array in the ISaGRAF dictionary And then program them in each language ST LD FBD SFC IL amp FC Please close all ISaGRAF windows first and then add two extra lines in your ISaGRAF workbench root EXE directory normally in the c isawin exe In the C ISAWIN EXE MISA INT adds two extra raws on the top of this file DEBUG arrays 1 And then re open the ISaGRAF workbench you will find there is one more Dim column in the ISaGRAF dictionary The number entered can be 1 to 255
463. ule 1 7000 M 7000 9600 9600 115200 Disabled Not defined Disabled DCON Protocol Modbus Protocol DCON Protocol The initial state after initiation I O Module 7000 series 1 7000 and M 7000 a E Disabled Disabled DCON Protocol DCON Protocol Step 3 Select COM port and baud rate to search Execute the DCON Utility from Start programs DAQPro DCON Utility fg DAQPro fan DCON Utility F DCON Utility A Reinlendar NAPOPC E Uninstall DCON Utility Intemet Explorer YCE_Pro A DCON_Support_Module_List 7 OpenOffice org 2 0 b m PDFCreator gt Version_Information 1 Click COM Port menu to select the COM port and baud rate to search You can select multi baud rate protocol or checksum conditions if you do not know the module s setting but it will spend more time to scan the network After selection click OR User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 6 3 2 Click gt Start Search icon to begin search module Click m when it is found F DCON Utility Yer 4 4 2 Gort sean l The Found Out 1 F000 8000 module _ Run Iermimal Help paa SC ela Module fse Baudrate Che Searching status S27 600 460800 23040 v F M M E Soet an Clr Step 4 Click Searched module ID and give the new configuration Ej DCON Utility Yer 4 4 2 File COM Fot Search Run Termina The Found Out 40 modu
464. ult No 114 Please refer to Chapter 10 6 To write a value to the EEPROM should remove the protection of the EEPROM first and then write operation is possible The following functions can be used EEP_EN Remove the protection of EEPROM then write operation is allowed EEP_PR Set the protection of EEPROM then write operation is not allowed EEP B W Write one boolean EEP_BY_W_ Write one byte Byte 0 to 255 EEP_WD_W Write one word 2 bytes signed 32768 to 32767 EEP_N_W _ Write one integer 4 bytes signed EEP F W Write one REAL 4 bytes float Note 1 EEP_F_R EEP_N_R EEP_N_W and EEP_F W all use the same EEPROM memory please DO NOT operate the same EEPROM address as Integer and also as REAL at the same time 2 Ifthe related data saved in the EEPROM is not REAL format using EEP_F_R to read it may generate a controller local fault No 114 Please refer to Chapter 10 6 Bytes words and integers will be stored to the same memory area in the EEPROM Be careful to arrange their address before using the above write functions For different PAC use the different memory size of the EEPROM For I 8xx7 amp I 7188EG XG there are total 1 512 bytes and the addressing No of bytes is range from 1 to 1 512 while words is 1 to 756 and integers is 1 to 378 The following No will use the same memory address in the EEPROM For I 8xx7 amp I 7188EG XG Byte 4n 3 4n 2 4n 1 4n n 1 2
465. unctions are for the SaGRAF controller to access to the volatile SRAM More information listed at Appendix A 4 S_FL_INI Init one file s name amp location for the volatile SRAM S_FL_AVL Set one file s current available byte No for the volatile SRAM S_FL_STS Get file s Status end byte No that has been load by PC for the volatile SRAM S_FL_RST Reset file s Status to Not been load by PC yet for the volatile SRAM SBR Read one Boolean TRUE FALSE S_BY_R Read one Byte 0 255 S_WD R Read one Word 32768 32767 S_N_R Read one Integer 32 bit signed S_R_R Read one Real 32 bit float If the data in related address of the battery backup SRAM is not a REAL value using S_R_R to read it may generate a controller local fault No 102 please refer to Chapter 10 6 SM R TAT Read one String Write one Boolean TRUE FALSE Write one Byte 0 255 Write one Word 32768 32767 Write one Integer 32 bit signed Write one Real value 32 bit float Write one String Enable the download permission for PC to download data to the volatile SRAM Disable the download permission for PC to download data to the volatile SRAM Get PC s Download Status for the volatile SRAM Reset the Download Status to 1 No action for the volatile SRAM copy data in the volatile SRAM 10 4 Using I 8073 MultiMediaCard to store data The I 8072 8073 is not support by ISaGRAF PAC User s Manual Of ISaGRAF PAC Sep 2
466. ut a value fromS MMI INPIOLED Show3Led I 87017 Display analog input value to S MMI I 87024 Push4Key Fbus_m Fbus Master NET _ID 1 Push4Key Show3Led Fbus_s Demo_llb Fbus Slave NET_ID 2 Push4Key Push4Key Demo 05 Blinking output TP Blink Show3Led Demo 10 Demo lla Simulate I 8417 as a modbus device for Demo_15a to link to this Demo_15b None project 11 6 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS EEEEEE EE REGIE E UPEN Demo 16 Demo 17 i Demo 18 Demo 21 Demo 22 Demo 23 Demo 27 Demo 27a Demo 28 Demo 29 Demo 30 Demo 33 Demo 35a Demo 35b p Demo 37 re Demo 38 ammm Demo 39 Demo 40 Demo 41 Demo 42 Demo 43 Demo 43a Demo 44 MMMM Demo 46 ee EECC E TECERE EREE Send Modbus command to device once every second Read Write EEPROM PID control by PID_AL This program can not simulate in PC None please download to controller Push4Key Send string to Com5 and Com6 Show3Led Receive data from Com5 or Com6 RS 232 and echo back Show3Led Receive user defined protocol from PC Show3Led I 8091 l l 1 8090 Slot1 I 8090 Napdos ISaGRAF 8000 Driver motion pdf Show3Led To move some pulse at x axis of I 8091 of slot 1 I 8091 Motion control x y axes slot0 I 8091 slot1 I 8090 Napdos ISaGRAF 8000 Driver motion pdf Store 1200 short integer values ev
467. ut module by ISaGRAF 113 Q Linking ISaGRAF PAC to Modbus TCP IP Slave Devices By Modbus TCP Master Protocol 114 Q How to avoid garbled content when printing IsSaGRAF PDF documents 115 Q Working eLogger HMI with ISaGRAF SoftLogic in the WP 8xx7 VP 2xW7 and XP 8xx7 CE6 PAC the document version is 1 03 released on Jul 15 2010 116 Q How to enable the second to fifth Modbus RTU slave port of the WP 8xx7 and VP 2xW7 without modifying the ISaGRAF project 117 Q How to install the ISaGRAF Ver 3 on Windows Vista or Windows 7 118 Q A M S VC 6 0 Demo Program To Connect One WP 8xx7 by Modbus TCP Protocol Q How to implement the communication redundancy between the central control station and the local stations 119 120 Q How to calculate the moving average value of a variable by c functions Aver_N or Aver_F 121 Q How to install or remove the ISaGRAF development platform properly Q How To Solve The USB Freeze Problem Of The W 8x4x How To Update The 122 W 8x4x s OS Image 123 Q How to move the InduSoft picture faster in the W 8xx6 WP 8xx6 VP 25W6 XP 8xx6 CE6 124 Q A Web HMI Example for ISaGRAF Professional XPAC XP 8xx7 CE6 PRO by FrontPage 125 Q XP 8xx7 CE6 And 1DCS 8000 Or ET 7000 Or Modbus TCP Slave device Redundant System 126 Q How to use the WP 8847 to connect ET 7018Z and ET 7044D and develop the HMI program by InduSoft VS2008 C and VB NET 128 Q How to u
468. ut will never stop unless the pwm_dis command is given Then the returned number of pwm_sts2 will become 0 1 2 to 2 147 483 647 and then go back to 0 1 2 Example I 8xx7 iP 8xx7 demo_63 W 8xx7 Wdemo_22 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 36 3 8 Counters Built in Parallel D I Boards Only parallel input boards plug at slot 0 are supported D I counters XP 8xx7 Atom CE6 XP 8xx7 CE6 slot 0 As follows I 8040W 8042W 8051W 8052W 8053W 8054W 8055W 8058W 8063W For I 7188EG XG uPAC 5xx7 and uwPAC 7186EG only the X xxx boards with digital input channels are available with D I counter For pwPAC 5xx7 WP 5xx7 only the XW board with digital input channels are available with D I counter Note please refer to http www icpdas com fag isagraf htm gt FAQ 100 for more about the high speed Counter Frequency such as I 8084W or I 87084W The max channel amount of parallel D I counter available in one controller is up to 8 And the max frequency of counter input is up to 500 Hz with minimum NO and OFF width gt 1 ms The below c function block is for getting reset D I counters at slot 0 Parameters RSI_ RS8_ boolean Reset the associated D I counter when rising from False to True Return Q_ boolean work ok TRUE If Q_ is FALSE it means No parallel D I module found at slot O CN1I_ CN8_ integer DI Counter value of channel No 1 to 8 Valid value is ranging from 0 to 2 147
469. ut with one extra setting Period Unit is second can be set as 1 600 Read words or bits with a specified period time Read max 120 word value or 60 integers 32 bit or 60 reals 32 bit Refer to http www icpdas com faq isagraf htm gt FAQ 101 Read 8 word value 32768 32767 using Modbus function code 3 It will ask eight Word for each Modbus command If the device can t support so many word or it just support Modbus function code 4 please instead to use Mbus_R Same as Mbus_N_R but with one extra setting Period Unit is second can be set as 1 600 Read 8 words with a specified period time Read 8 bit value using Modbus function code 1 It will ask eight bit for each Modbus command If the device can t support so many bit or it just support Modbus function code 2 please instead to use Mbus_R Same as Mbus_B_R but with one extra setting Period Unit is second can be set as 1 600 Read 8 bits with a specified period time Write 12 word 32768 32767 to Modbus device Refer to http www icpdas com faq isagraf htm gt FAQ 144 1 Write max 4 word value 32768 32767 using Modbus function code 6 or 16 When NUM_W 1 using Modbus function code 6 When NUM_W 1 using Modbus function code 16 to write one word When NUM_W 2 4 using Modbus function code 16 Write 1 2 integers 32 bit to Modbus device Using LONG_WD block to conv
470. utility wait TCP IP Client W 8xx7 requesting to connect and then receive message from it and then reply a same message back to the TCP IP client The ISaGRAF demo program is Wdemo_32 pia amp Wdemo_33 pia amp Wdemo_60 pia It can be download at ftp ftp icpdas com pub cd wincon_isagraf napdos isagrat wincon demo User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 19 7 Chapter 20 Redundancy Solutions 20 1 XP 8xx7 CE6 Redundant System Please visit http www icpdas com fag isagraf htm gt FAQ 138 for more information Advantage more than the WP 8xx7 redundant system the PC HMI SCADA just need to connect to one IP address the active_IP1 address of the XP 8xx7 CE6 XP 8xx7 Atom CE6 redundant system The Active_IP1 address will auto switch to the active XP 8xx7 CE6 XP 8xx7 Atom CE6 s LANI or LAN2 port On the other hand the PC HMI SCADA need to connect to two IP address of the WP 8xx7 redundant system and they need auto switch to the second IP Active IP2 if the first IP is disconnected For many SCADA software some are impossible and some are not easy need to create two sets of data tag to do that The first configuration is using two XP 8xx7 CE6 XP 8xx7 Atom CE6 PAC to connect one or more I 87K8 expansion base each I 87K8 base can have max eight I 87xxxW I O cards in it One or more stations can join together as the following figure Each station contains one or two NS 208 or RS
471. utput different voltage in 1 8024 Ch 1 to Ch 4 If user has finished procedure listed in step 1 connect Ch1 to Ch 4 voltage output to Chl to Ch 4 of I 8017H the I 8017H Ch1 to Ch 4 s voltage input will also change during this period And they will be recorded As figure below User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 70 Microsoft Internet Explores SED SHO PAD SHARO IAD Reese O O 4 aN fame Oan 8 3 E ip 7100 0 104topn dl PLE wa Wineon Web HMI Demo 13 Reord 4 Ch Voltage in a RAM Space and then save to Web_Datal carvel ys file in Wineon Then PC can download it and use MLS Excel to draw a Trend Curve L Please download ISaGRAF project when 13 to Wincon B34 7 2747 of W 2337 8737 2 Please phag 8024 at sotz 1 B017H at slot 3 and wwe t 8024 s voltage output Ch 1 to 4 to 8017H s Ch ito 4 Operahon state Record is faushed You may download the record file to your PC now Total record number 12000 I recording is finshed you may chck on Download record File to do Jit to you X Current record ma rus AWN sts Download recore File Please Enter Interval and Pepet Interval 10 to 10000 Period 1 to 10 minute Hallo Wakane i the Web BME Sawple TITT Oami E During the recording period the Current record number value will count up If it reaches the value of Total record number it means recording is finished Then the ISaGRAF program will st
472. value not a false B4_ at the first value variable value false false false al ae Set the other non used falseBe values in this package to FALSE The ISaGRAF LD Project For The SB Controller FBIS hv e i Read boolean package No 1 to get the first value to internal boolean variable ZZ Write integer package No 1 to Fbus Variable WW Fbus_n_w always return TRUE these 2 blocks can link together is included at 1 value User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 13 The ISaGRAF LD Project For The SC Controller FAUS_ AR er Ail _ 14 PACK_NO_B2 B3 B4 Read boolean package No 1 to get the first value to B amp L internal boolean variable ZZ B5 FAUS_ N_R en end 1A PACK _NO NT Mt Read Integer package No to get the first value to internal integer a variable WW Ma Mo ME MFL User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 7 14 7 5 Programming The Ebus Ebus is a software mechanism which allows controllers to access data to each other through the ethernet port Ebus is only working on the local area That means exchanging data through a gateway is no possible Fe Fa a 1 8437 8837 Eai aM TT cM Ethernet Mm rat L786 The I 8437 80 I 8837 80 controllers support Ebus since its driver version of 2 15 and the I 7188EG support Ebus since its driver version of 1 08 And the uwPAC 7186EG uPAC 5xx7 iP 8x4
473. vou want to esit the Code Generator now 7 Continue User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 15 3 F Call it in other programs in the same project Global variables used in the project Attribute INIT initial value at TRUE TRUE means 1 scan cycle Connect to 1 ch Of push4key press it to get Val New value wish to save to the EEPROM Old_Val Old value Val Read back value of the EEPROM Project architecture ISaGRAF T8063 Programs o O x Fie Make Project Toole Debug ptons Help D eee det xr MH AOS End Functions end init W_EEP Save an integer to the EEPROM Begin demo Ladder Diagram ST program end_init in the End area IF INIT TRUE THEN INIT FALSE END_IF LD program demo Remove protection ofthe EEPROM IMIT A Read EEPROM INIT User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 15 4 G Set Compiler Options and compile the project I aGEAF T8063 Programe e 0 x File Make Project Tools Debug Options Help Moke application ie MH Reel Begin Verity Eng Touch Func integer to the EEPROM Application mn time Options AEREE DE Compiler options Resources Compiler options x Targets gt SIMULATE Workbench Simulator Select ISA68M TIC code for Motorola Ps S48 pM TIC code for Intel Unzelect CCS6M C source cod
474. w program Hame Begin LOT Ladder Diagr Comment Language ST Sti Tx i gt Cancel Style Now we have two programs inside this project ISaGRAF SIMPLELD Programs File Make Project Tools Debug Options Help HO Dem Axe mk Aes mA LD Example LO Program TAME handle INIT variable End end ink Structured Text ISaGRAF will run these two programs one time in each PLC scan cycle Programs in the begin area will run first then the Sequential area and last the End area An ISaGRAF cycle run in the way as the below scheme Scan all inputs Process Sequential area ISaGRAF Cycle Process End area Reflash all outputs User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 2 24 Double click on end_ init program to edit it Click on save and then exit when you finish it Any character inside between and is the comment hal RAF SIMPLELD Programs File Make Project Tool Debug Optons Help A HB Oem axr mk zoel Begin w LDV Example LD Program End handle INIT variable w SaGRAF SIMPLELD END INIT T program OF x Ent File Edit Tools Options Help XDA MS xE Elg fn ST demo program An ST demo program IMIT TRUE then INIT FALSE INIT FALSE end_if if Since INIT is declared with an initial value TRUE this ST program will
475. w to use multi port Modbus Master in the WinCon 8037 8337 8737 amp WinCon 8036 8336 8736 Q How to send receive message from ISaGRAF PAC to remote PCs or Controllers via Ethernet UDP communication Q Setting special range parameter of temperature input board to get clear Degree Celsius or Degree Fahrenheit input value For ex 1535 means 15 35 degree 25 26 27 NO NO U U U Z Q Setting a special ADR parameter of remote I 7000 amp I 87K temperature input module to get clear Degree Celsius or Degree Fahrenheit input value For ex 8754 means 87 54 degree Q How to access to ISaGRAF variables as array A demo program of sending string to COM2 or COM3 when alarm 1 to 8 happens Q Setting up more Modbus RTU Slave ports in WinCon ISaGRAF PACs Compiling error result in different IsaGRAF version Q Slow down ISaGRAF driver speed to work better with InduSoft software in ay 32 33 34 Nn W 8036 8336 8736 amp W 8046 8346 8746 Q Redundancy Solution in WinCon 8xx7 Q I 7188EG XG support remotely downloads via Modem Link Q Setting I 7188EG XG s COM3 as Modbus RTU Slave port 39 Q ISaGRAF version 3 4 amp 3 5 now supporting Variable Array Q Setting I 8437 I 8837 I 8437 80 I 8837 80 s COM3 as Modbus RTU Slave port 4 Q How to connect PC HMI to a Redundancy system with a single IP address Q How to use WinCon connecting to Ethernet I O
476. with new plugged IO board should be configured at least once by Modbus utility If the 2nd amp 3rd Leds below the Five 7 Segment Led is always blinking it means this I 8KE4 8 MTCP is not configured well by the Modbus utility User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 22 8 Step 3 Please connect 18ke I O complex equipment in your ISaGRAF project Please enter the IP address of the related I SKE4 MTCP or I 8KE8 MTCP If the WinCon has connected more than one I 8KE4 8 MTCP you should connect more i8ke as below on SaGRAF T3 140 connection E iol x File Edit Tools Options Help B PBPrn tll rk amp o 4 mnj ref 25F m IP_ address 192 168 2 0 mmj Station No 1 mmj Reserved 0 4 m Reserved 0 nus Reserved 0 6 mm Reserved 0 mon Reserved 0 am ike sms Reserved 0 C ETH_10 me j EE am ike The only one boolean input channel of the i8ke indicates ETH_IO n its communication state True means Wincon connecting this 8KE4 8 MTCP well while Fasle means communication timeout or break If the i8ke i8ke_b i8ke_n i8ke_f i8ke_b_a 18ke_n_a i8ke_f_ais not found in your SaGRAF please visit http www icpdas com products PAC 8000 sagraf htm to download ICP DAS Utilities For SaGRAF zip to install it again to the ISaGRAF workbench Step 4 Please map ISaGRAF internal variables to the related Modbus I O address of
477. wo values must be defined The Electrical field means the original value BEFORE conversion and the Physical field is for the value AFTER conversion The two points defined in this example are 32768 10000 lower limit and 32767 10000 upper limit Click on the STORE button to save each entry Conversion table CH 1 Foints Electrical 32768 Physical User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 9 17 When you have completed entering in the two value points click on the OK button to save the entered values The last step is to assign the conversion table CN1 to a program variable that will be used in an ISaGRAF program ISaGRAF SIMPLELD Global integers reals File Edit Tools Options Help OOS He KES ris Booleans Integers Reals Timers Messages FB instances Defined words OR a OE comment input integer 000A _ Internal pro tele am variable for anal 1 Internal program variable for analog input conversion 0000 inputinteger Used conversion CN1 Integer Real ariable 4 ef Network Address Internal program variable for analog input conversion COO Conversion fom i l Retain Previous Extended Note Only integer variable declared as input or output attribution can be assigned a conversion table The user can use Bin2Eng to convert the internal variables please refer to A 4 User s Manual Of ISaGRAF PAC Se
478. x 8 x 16 256 ch of digital output plus max 2 x 8 x 16 256 ch of digital input uPAC 7186EG FX 016 supports max 128 ch D I plus 128 ch D O You may plug up to 8 pcs of I 8172W max 2048 ch D I plus 2048 ch D O in the WinPAC 8847 depends on your application Max 4 pcs of I 8172W can plug in the 1PAC 8447 8847 it supports max 1024 ch D I plus 1024 ch D O Note ISaGRAF 3 x can program FRnet I O by using I 8172 for 1P 8xx7 WP 8xx7 W 8xx7 or Frnet86 I O complex equipment for uPAC 7186EG amp fr_16di fr_16do amp fr_b_a functions If your ISaGRAF doesn t support them please visit http www icpdas com products PAC i 8000 isagraf htm gt Driver to download ICP DAS Utilities For ISaGRAF zip to install it again to the ISaGRAF workbench Or refer to Appendix A 2 of the IsaGRAF User s Manual to restore c function fr_b_a and c function block fr_16d1 fr_16do and IO complex equipment 1_8172 frnet86 into your ISaGRAF Workbench Below is a demo program show you how to program FRnet I O This IsSaGRAF example program can be download at www icpdas com gt FAQ gt Software gt ISaGRAF gt 082 or visit ftp ttp icpdas com pub cd winpac 8xx7 napdos isagrat wp 8xx7 demo to download wpdmo_70 pia For WP 8xx7 iP 8xx7 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 23 4 23 2 Programing the FRnet I O Step 1 Connecting
479. x7 1 01 nhPAC 7186EG 1 01 VP 2117 1 01 7 1 Basic Fbus Rules Any I 8xx7 I 7188EG XG amp uPAC 7186EG 1P 8xx7 VP 2117 controller system can access data from another I 8xx7 I 7188EG XG through the Fbus data exchange system While the XP 8xx7 CE6 XP 8xx7 Atom CE6 WP 8xx7 WP 5xx7 VP 25W7 23W7 doesn t support Fbus it supports Ebus only Please refer to section 7 5 There are 2 types of data that can be exchanged through the Fbus protocol they are Boolean and integer If you want to exchange Real data please refer to appendix A 4 to use Int_Real and Real_Int block The Fbus driver first creates a packet of eight Boolean values to form a Boolean package and then creates a packet of eight 32 bit integers to form an integer package Both of the Boolean packages and integer packages can be distributed on the Fbus to allow the data to be exchanged from one controller system to another or more controller system The Following Fbus Rules MUST Be Observed RULE 1 Each Boolean package must have an attached identification number ranging from 1 to 128 This means that there is a maximum of 128 Boolean packages that can be exchanged across an Fbus connection Each Boolean package contains 8 Boolean values and these Boolean values can only have the value of either True or False The Boolean values in the Boolean package can be assigned and exchanged with either Internal Input or Output Boolea
480. x7 driver ver since they are released VP 2117 driver ver since they are released WP 8xx7 driver ver since they are released WP 5xx7 driver ver since they are released VP 2xW7 driver ver since they are released XP 8xx7 CE6 driver ver since they are released XP 8xx7 Atom CE6 driver ver since they are released The 1P 8xx7 VP 2117 WP 8xx7 VP 25W7 23W 7 XP 8xx7 Atom CE6 and XP 8xx7 CE6 have built in the 512 KB battery backup SRAM no need to purchase the S 256 5 12 If battery backup SRAM is found in the back plane of the controller I 8xx7 S256 S512 I 7188EG XG X607 X608 WinCon 8xx7 S256 S512 the maxinum number of retained variables for new retain function are listed as below New retain variable is supported by below ISaGRAF C function Target 1 uPAC 7186EG I 7188EG XG X607 608 I 8xx7 S256 512 iP 8xx7 VP 2117 Target 2 W 8xx7 S256 512 with new WinCon back plane released in 2006 WP 8xx7 VP 2xW 7 XP 8xx7 Atom CE6 and XP 8xx7 CE6 Retain_B retain Boolean variable Target 1 max 256 variables Target 2 max 1024 Retain_N retain Integer variable Target 1 max 1024 variables Target 2 max 4096 Retain_F retain Real variable Target 1 max 1024 variables Target 2 max 4096 Retain_T retain Timer variable Target 1 max 256 variables Target 2 max 1024 Retain_X retain variable by using its Network address Retain_A retain variable array by using its Network address Refer
481. x7 CE6 amp WP 8xx7 amp VP 2xW7 PAC Q How to use the VPD 130 to read the uPAC 7186EG s system date and time via RS 485 149 Q How to make the ISaGRAF WinCE PAC play a sound 150 Q ISaGRAF Tutorial Video 151 Q How to use FTP Client to upload log files to remote FTP Server on PC 152 Q How to control the IR module IR 210 IR 712 with the ISaGRAF PACs Q How to use the ISaGRAF PAC to communicate with a far away Modbus TCP server or a ftp server by the 3G or 2G wireless GPRS 146 153 Q How to save the value of ISaGRAF variables to the Flash memory or Micro_SD memory in the WP 5xx7 XP 8xx7 CE6 WP 8xx7 and VP 25W7 VP 23W7 PAC 155 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 83 Chapter 12 Sending Email WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 XP 8xx7 CE6 VP 25W7 VP 23W7 WinCon 8xx7 UPAC 7186EG uPAC 5xx7 and iPAC 8447 8847 can send email via its Ethernet port since its following ISaGRAF driver version WP 8xx7 WP 5xx7 since it 1s released XP 8xx7 CE6 XP 8xx7 Atom CE6 since it is released VP 25W7 VP 23W7 since it 1s released WinCon 8xx 8xx6 3 42 1PAC 8447 8847 since it 1s released UPAC 7186EG since it is released These controllers must reside at a local network which can connect to the Internet or sending email is not possible For sending Email or TCP UDP data via 2G 3G wireless communiction please refer to http www icpdas com faq isagraf htm gt FAQ
482. x7 CE6 or I 7018z VP 25W7 VP 23W7 I 7018Z by Modbus TCP IP protocol to display temperature information Please refer Chapter 11 3 9 Demo_6 PC run VB 6 0 program to link to I 8437 80 8837 80 Slot 1 8024 1 8024 amp I 8017H by Modbus TCP IP Slot3 L8017H Please refer Chapter 11 3 7 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 3 uPA C 7186EG I 7188EG XG example program uPA C 7186EG I 7188EG CD ROM napdos isagraf 7188eg demo or ftp ftp 1cpdas com pub cd 8000cd napdos isagraf 7 1 88eg demo I 7188EG CD ROM napdos isagraf 7188x g demo or ftp ftp 1cpdas com pub cd 8000cd napdos isagraf 7 188x demo name Demo 01 Receive data and send to Com2 and Com3 Demo_02 Send one string to COMS and COM6 in X503 board Demo 03 eee inessage Ang then Pa to Com6 or Com7 using x503 oe Comary_r and Comary_w Demo_04 Linking remote I 7000 and using X107 board Demo_05 Timer control TP TON TOF I O board used X503 4 5 6 X503 Bus7000b X107 X304 Demo_06 Display a value to S MMI by VALIOLED X304 Demo_07 Using X107 and remote I 7060D Relay I O Demo_08 control Diital Output Demo U and Reset to O PID control by PID_AL This program can not simulate in PC please download to controller Demo_21 Write one string to Com3 and Com4 Demo_22 Receive message and send to Com3 and Com4 Receive command from PC and return a Integer value
483. xx6 One of COM2 and COM3 To use echo_tim please connect it at slot 8 or larger slot No The first Delay __COM setting is the COM port No to be delay I 8xx7 iP 8xx7 can be 1 2 or 3 W 8xx7 can be 2 or 3 The second Delay_time is the milli seconds to delay It can be 1 to 10000 unit is ms 0 001 second It means Ok if Channel returns FALSE If it returns TRUE something wrong for example setting wrong COM port No The below example set I 8xx7 s COM1 Modbus RTU Slave port to delay 50 ms 0 05 second before responding WinCon just can delay COM2 or COMS3 we SaGRAF TESTI I O connection 5 x File Edit Toole Options Help 2 SPBeam tL EFA S o aj mmj ref 120 rn Delay COM 1 sot Delay time 50 4 a 6 Lg Er echo_tim n i Why Modbus RTU Slave port need to delay For example there is some application applying some communication equipment like radio modem which needs some time to switch the sending receiving state When PC HMI send Modbus RTU request to I 8xx7 iP 8xx7 and W 8xx7 via this radio modem the I 8xx7 1P 8xx7 and W 8xx7 should not reply immediately They should delay some milli seconds to wait this radio modem to complete its switching to send receive state then reply User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 23 3 3 4 Using RTU_Slav to expand more Modbus RTU Slave ports in WP 8xx7 WP 5xx7 VP 25W7 XP
484. xx7 1P 8xx7 VP 2117 VP 25W7 VP 23W7 WP 8xx7 WP 5xx7 XP 8xx7 Atom CE6 amp XP 8xx7 CE6 controller system and the ISaGRAF Workbench software to operate properly it is imperative that each is setup correctly This chapter covers the details of how to setup the controller system and the IsSaGRAF Workbench software in a minimum of time Before you can start programming the ISaGRAF PAC system with the ISaGRAF software program you must first install the IsaGRAF Workbench software program on a target PC Hardware Requirements A Personal Computer With At Least A Pentium 133 MHz Or Faster Processor 32 MB Memory Preferably 64 MB RAM A Hard Drive With At Least 128 MB Of Storage Space Preferably Larger At Least One RS 232 Serial Port Software Requirements One of the following computer operating systems must be installed on the target computer system before you can install the ISaGRAF Workbench software program o Windows 98 Windows 2000 or Windows XP Windows NT Version 3 51 or Windows NT Version 4 0 Windows Vista or Windows 7 refer to FAQ 117 Steps To Installing The ISaGRAF Workbench Program AN If your PC OS is Windows Vista or Windows 7 32 bit refer to 1 1 4 If your PC OS is Windows 7 64 bit please refer to 1 1 5 Insert the ISaGRAF Workbench CD into your CD ROM drive If your computer does not have the auto start install j Language ieee O install feature active use the Windows Explorer and go
485. xx7 8xx6 ISaGRAF driver Ver 1 37 or later WP 5xx7 5xx6 Since it 1s released VP 25W7 23W7 25W6 23W6 ISaGRAF driver Ver 1 29 or later XP 8xx7 CE6 XP 8xx6 CE6 ISaGRAF driver Ver 1 17 or later XP 8xx7 Atom CE6 XP 8xx6 Atom CE Since it is released 104 105 Set the user_account for the Mail Server which required to login before sending mail For example TMP Mail_set 104 my_account Set the user_password for the Mail Server which required to login before sending mail For example TMP Mail_set 105 my_password If Mail Serverl and Server2 no need to login please do not set CMD_104 105 106 Set Timeout unit is second the value can be 30 180 the default value for the driver version listed above is 60 second the old version is 20 second MSG_ Message the related message setting according to the Ist parameter CMD_ Return Q_ Boolean True Ok False the related setting is not correct or the CMD_ value is not correct User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 12 7 MAIL_snd Start_ Num_ Subject_ Prio_ Datal_ Data2_ Attach_ Parameters Start_ Integer Starting receiver No Can be 1 through 10 Num_ Integer Number of receivers Can be 1 through 10 Subject_ Message Subject of the email Max length is 128 characters For ex Alarm of plant 1 Prio_ Integer Set Email Priority symbol Value can be 1 High 3 Normal 5 Low default sett
486. y DCON utility Then please program a I_7018n block The I_7018n block request all 8 channels by one single command however the I_7018 block need to send 8 commands for 8 channels F018 COMM OKTS en i gt qx If connected well return as TRUE Address of I 7018 or 7018R _p 4 AG 8 Internal Integer variables should be used nF here The other RS 485 I 7000 and I 87K I O all use the similar way Note If RS 485 remote I 7000 and I 87xxx I O module s type is Analog Input please configure the format as 2 s complement by DCON utility Like I 7005 I 7013 1 7015 I 7016 I 7017 I 7017R I 7018 I 7018R I 7018Z I 7019 I 7019R I 7033 I 87005W I 87013W I 87015W I 87015PW I 87016W I 87017W I 87017RCW I 87017ZW I 87017DW I 87018W I 87018RW I 87018Z I 87019RW I 87019ZW and so on If RS 485 remote I 7000 and I 87xxx I O module s type is Analog Output please configure the format as Engineer Unit by DCON utility Like I 7021 I 7022 I 7024 I 87022W I 87024W and I 87026W Below table is for the I 7017 7017R 87017W 87017RW These modules need an external 125 ohm resistor when using D 20mA If you don t want to use it please choose I 7017RC or I 87017RCW or I 87017Z or I 87019ZW I 7017 87017 Physical value Analog Input value Decimal 32767 10V Range tyep by DCON Utility 5V 500mV 500mV 500mV 150mV 150mV 150mV 20mA
487. y M S Excel wphmi_12 wphmi_13 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS slot O I 87055W slot 2 I 87024W Slot 3 I 8017HW Slot 2 I 87024W Slot 3 I 8017HW Slot O I 87055W Slot O I 87055W slot 2 I 87024W Slot 3 I 8017hW slot 3 I 8017hW slot 2 8024W Slot 3 I 8017hW Slot 2 I 8024W 11 14 11 3 Description Of Some Demo Examples 11 3 0 Demo_01A amp Demo_03 Do something at specific time Demo_01A Do something at some seconds later when an event happens Location I 8000 CD ROM napdos isagraf 8000 demo demo_Ola pia Variables Attribute push K1 to start running motor pushbutton 1 on the I 8xx7 Output True means to run motor False means to stop motor Output True means to open gate False means to close gate event generated at 5 sec later when K1 is pushed event generated at 15 sec later when K1 is pushed event generated at 18 sec later when K1 is pushed Push K1 to starting running motor ET motor Hee n S T To generate Mi pulse at 5 sec later when K1 is pushed Open gate when Mi pulse happens wi gate n L a e T Close gate when W2 pulse happens hl gate He gt Stop motor when Ma pulse happens Wia motor s L n B e _ _ User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 11 15 Demo_03 Do something at specific weekday amp some time interval Location I 8000 CD ROM napdos isagraf 8000 demo de
488. y the X board with digital output channels are available with PWM function For pPAC 5xx7 WP 5xx7 only the XW board with digital output channels are available with PWM function Note 1 Max 8 PWM outputs can be used at the same time 2 I 7188EG XG uPAC 7186EG must connect the Xxxx board at slot 0 the WP 5xx7 requires the XW board or the PWM function will not work om IsaGRAF 41 10 connection E O x File Edit Tools Options Help SS ePBeaml rel r amp EH 4 El m REF 7107B r PWM_dis Disable PWM output Parameters SLOT_ integer Which slot 0 7 CH_ integer Which channel 1 32 Return Q_ boolean TRUE Ok FALSE wrong input parameters too many PWM outputs been enabled or the associate output channel is not found Note 1 After calling PWM_dis the associate output will then be controlled by the ISaGRAF cycle engine 2 Max 8 output channels can call PWM_en PWM_en2 pwm_ON pwm_OFF at one controller Example I 8xx7 iP 8xx7 demo_63 WinCon Wdemo_22 User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 33 PWM en Enable PWM to output until PWM_dis is called Parameters SLOT_ integer Which slot 0 7 CH_ integer Which channel 1 32 OFF _ integer Off time scale is 1 ms ON_ integer On time scale is 1 ms I 8xx7 I 7188EG XG uPAC 7186EG uPAC 5xx7 1P 8xx7 1 32 767 WP 8xx7 WP 5xx7 XP 8xx7 CE6 XP 8xx7 Atom CE6 VP 25W7 2 32766 it must be set as mult
489. z 8 Ch 100 Hz 16 Ch It depends on the PLC scan time The bigger scan time the samller sample rate ea V mA Co 4 8 Ch counter or Frequency Input I 8088W 8 Ch PWM output Motion control I 8092F I 8094 I 8094F only supprot XP 8347 CE6 and XP 8747 CE6 Encoder XP 8147 Atom CE6 XP 8347 Atom CE6 and XP 8747 Atom CE6 Please refer to http www icpdas com fag isagraf htm gt FAQ 132 I 8091W 2 Axes Pulse output I 3090W Encoder only support 1P 8xx7 WP 8xx7 VP 25W7 and XP 8xx7 CE6 I 8093W Encoder only support 1P 8xx7 WP 8xx7 VP 25W7 and XP 8xx7 CE6 CANopen Master I 8123W only support XP 8xx7 CE6 XP 8xx7 Atom CE6 WP 8xx7 VP 25W7 and VP 23W7 Please refer to http www icpdas com faq isagraf htm gt FAQ 145 FRnet Master card I 8172W 2 port FRnet it has to be used with FRnet I O Please visit User s Manual Of ISaGRAF PAC Sep 2012 Rev 6 3 ICP DAS 3 1 Ps lO frnet frnet list htm or http www icpdas com faq isagraf htm FAQ 082 Expansion serial I 81121W 2 Ch RS 232 I 81141W 4 Ch RS 232 communication ports I 81421W 2 Ch RS 485 422 I 81441W 4 Ch RS 485 422 I 8xx7 1P 8xx7 can expand max 16 ports at slot O through slot 3 WP 8xx7 VP 25W7 can expand max 10 ports at slot O through slot 2 XP 8xx7 CE6 and XP 8xx7 Aton CE6 can expand max 28 ports at slot 1 through slot 7 The following I 87K parallel I O can be used in slot O 7 1 97037W I 87040W I 87041W I
Download Pdf Manuals
Related Search
Related Contents
Manuel d`installation de ZDUE-MOD-PLUS V Zanussi ZCE 7400 Owner's Manual Guide pour agir - Oui au Bio dans ma Cantine DSM480LAN Samsung M1711N Felhasználói kézikönyv Dyson DC17 Vacuum Cleaner User Manual D - CONRAD Produktinfo. E17 User manual (EN) V01.cdr 取扱説明書 お客さまへ Copyright © All rights reserved.
Failed to retrieve file