Transcription

ClassificationWin-GRAF English FAQ-011AuthorEva LiVersion1.0.0DateJan. 2016Page1 / 12How to Enable the Win-GRAF PAC as the Modbus TCP/UDP Masterto link ET-7000 I/O Modules?Click the link for more Win-GRAF FAQ1.1. Enabling the Win-GRAF PAC as a Modbus TCP/UDP MasterApplication Diagram:The Setting Steps:1. Click the tool icon “Open Fieldbus Configuration” to open the “I/O Drivers” window.ICP DAS Co., Ltd. Technical Document

ClassificationWin-GRAF English FAQ-011AuthorEva LiVersion1.0.0DateJan. 2016Page2 / 122. Click “Insert Configuration” icon in the left side of the “I/O Drivers” window, and then click “MODBUSMaster”, then click “OK” to enable a Modbus Master.Note: One “Modbus Master” can set up multiple Ports (see the next step), can set as a ModbusMaster RTU/ASCII Port or a Modbus Master TCP/UDP Port or can set up not to enable thesetting.3. Click the tool icon “Insert Master/Port” in the left side and open the setting window. Then, select the“MODBUS on Ethernet” and set up the related items, and then click “OK”.After received an answer,wait for 10 ms, and thensend the next request.If not need the TCP/UDP Portsetting, check “Disabled”.ICP DAS Co., Ltd. Technical Document

ClassificationWin-GRAF English FAQ-011AuthorEva LiVersion1.0.0DateJan. 2016Page3 / 12Address: Fill in the IP Address of the Modbus Slave device (e.g., “192.168.1.100”).Port:TCP port Number of the Slave device.Protocol: If as a Modbus TCP Master, select the “TCP – Open MODBUS”.If as a Modbus UDP Master, choose the “UDP – Open MODBUS”.Delay:Fill in the delay time (e.g., 10 ms, can be 0 10000).1.1.1. Read AI Data1. Click the icon “Insert Slave/Data Block” in the left side to create a “Data Block”.2. In the “MODBUS Master Request” setting window, set up the following items, and then click “OK".abIn this examplea. Slave/Unit:Fill in the Net-ID of the Slave device(Usually is “1”).b. MODBUS Request:Select “ 4 Read Input Registers”.cc. Base address:Default to start from 1.Nb items:The AI numbers to read (here is 4).dIt‘s not suitable for “Read” commend.eICP DAS Co., Ltd. Technical Document

ClassificationWin-GRAF English FAQ-011AuthorEva LiVersion1.0.0DateJan. 2016Page4 / 12Note:If want to change the “Base address”, please use mouse to right-click the “MODBUS Master”, and thenselect “MODBUS Master Addresses” to change the value.d. Activation: the sending way of Modbus Request.Periodic:Send request periodically. In this case, itsends request every 1 Sec. “on error” meansthat when an error occurs, the next sendingtime (in this case, 15 seconds).On call:It will send the request once when aprogram calls it.On change: It will send the request once when data ischanged.e. Timeout:Set up the max. time to wait for the response. If exceeds it, that means an error.(For Modbus TCP/UDP, recommended: 1000 3000 ms; this example is 1000 ms)3. Open the “Variables” window, set up the variables want to use.Tips:press “F1” key to see the settingmethod for MODBUS Master.Double click to open.Please follow the table to set up 4 WORD (16 bit) variables.Variable NameData TypeDim.DescriptionWord 1 Word 4WORD---Used to read the AI data (16 bit)StatusDINT5Used to record the read/write statusICP DAS Co., Ltd. Technical Document

ClassificationWin-GRAF English FAQ-011AuthorEva LiVersion1.0.0DateJan. 2016Page5 / 12After setting up, it will show as the picture below (if not familiar with the method, refer the Win-GRAFGetting Started Manual - Section 2.3.1).4.In the “I/O Drivers” window, drag the variables (“Word 1 Word 4” and “Status”) from theVariables area to the “Symbol” area of the Data Block.Notice: This example shows “Status” is an Array variable. When drag it to the “Symbol” area, it willbecome “Status[0] Status[4]", please press “Delete” key to delete “Status[1] [4]".5. Set the “Operation” of the “Status[0]” to “Error report” (If reading data fails, its value is an “ErrorCode”; when reading data OK, it will reset to “0”.)Note: Press the “F1” key to view the setting descriptions for the Modbus Master. In the title of“Status and command variables”, you can find the details about this commend and “ErrorCode”.ICP DAS Co., Ltd. Technical Document

ClassificationWin-GRAF English FAQ-011AuthorEva LiVersion1.0.0DateJan. 2016Page6 / 126. Select "Word 1 Word 4” and click “Iterate property” to set up the “Offset” value (From: 0; By: 1).89Now, we have finished the setting to read AI data. In the following section, we will describe how toread/write the DI, DO, and AI data of the ET-7000 module. You can also refer the FAQ-009 to know theconfigure way to read/write the DI, DO, AI and AO data.ICP DAS Co., Ltd. Technical Document

ClassificationWin-GRAF English FAQ-011AuthorEva LiVersion1.0.0DateJan. 2016Page7 / 121.2. Connecting ET-7000 Series I/O ModuleICP DAS ET-7000 is a series of I/O module supporting Modbus TCP Slave protocol. The Win-GRAF PAC canenable the Modbus TCP Master to connect the ET-7000 modules. The maximum recommend the amountof the connecting ET-7000 modules depends on the PAC model, such as the XP-8xx8-CE6 and WP-5238CE7, recommends a maximum of 200; the WP-8xx8, VP-22x8-CE7 and VP-42x8-CE7 is recommended thatno more than 32.For more information about the ET-7000 series products, please visit the website:http://www.icpdas.com/en/product/guide Remote I O Module and Unit Ethernet I O Modules ET-7000 ET-72001.2.1. Use Internet Browser to Set the ET-7000 ModulesBefore the first time using the ET-7000, you must set up the ET-7000 by using the Internet Browser.When the ET-7000 shipping from the factory, the settings are: IP address 192.168.255.1; Mask 255.255.0.0. Please set the IP of your PC in the same network (e.g., set the IP to 192.168.255.100, Mask 255.255.0.0), then open the browser (such as IE), and enter the IP of the ET-7000 to connect it.Notice: The Dip Switch on the rear of the ET-7000 must stay in the “Normal” position.Username: AdminPassword: Admin(Case sensitive)ICP DAS Co., Ltd. Technical Document

ClassificationWin-GRAF English FAQ-011AuthorEva LiVersion1.0.0DateJan. 2016Page8 / 12Click “Configuration” “Module I/O Settings” to set up the range of channels as below, and then click“Submit”.Set as “ON" toenable it.Set “AI Data Format”to “ON” (Engineer),means: 2.5: -25000 25000 1 : -1000 1000258: 25.8 ( )Users can set the ET-7018Z‘s "AI Data Format" to "ON" (Engineering) for more convenient usage.For example:Type CodeRange04-1 1 V05-2.5 2.5 V18Type MThermocouple-200 100 CData FormatMinimumMaximumEngineering2’s comp HEXEngineering2’s comp HEXEngineering-100008000h-250008000h-20000 100007FFFh 250007FFFh 100002’s comp HEX8000h4000hICP DAS Co., Ltd. Technical Document

ClassificationWin-GRAF English FAQ-011AuthorEva LiVersion1.0.0DateJan. 2016Page9 / 121.2.2. Restore/Open the Demo ProjectThis paper provides the following Win-GRAF demo projects, you can click the Win-GRAF menu bar "File" "Add Existing Project" "From Zip" to restore/open/check the demo projects.Demo ProjectFile NameDescriptionET-7060demo ET7060.zipRead 6 DIs, write 6 DOsET-7018Zdemo ET7018z.zipRead 10 AIs1. Click the tool icon “Open Fieldbus Configuration” to open the “I/O Drivers” window.2. Double click “Open Modbus: IP:502” to open the “MODBUS Master Port” window.Notice:All demo projects in this chapter can enable the Win-GRAF PAC as a Modbus TCP Master. Fill in thecurrent IP address of your ET-7000, and set "Port" to "502” and "Protocol" to "TCP - Open Modbus".Enter the current IP addressof your ET-7000.ICP DAS Co., Ltd. Technical Document

ClassificationWin-GRAF English FAQ-011AuthorEva LiVersion1.0.0DateJan. 2016Page10 / 121.2.3.Connecting the ET-7060 (6 DI, 6 Relay)The ET-7060 is a 6 DI and 6 Relay channels Ethernet I/O module. The Win-GRAF demo project for thissection is "demo ET7060.zip". Please refer Section 1.2.1 to set up the module channels using theInternet Browser, and restore/open the demo project.Demo Description:This demo creates two Data Blocks, one is used to read 6 DI data, the other is used to write 6 DO data.1. Double click the first Data Block ( 2 Read Input Bits) to open the setting.Note: (See the figure above)The “Offset” value starts at “0” andthe Modbus address of variable isequal to the “Offset” value plus 1(Base address). Moreover, if you setthe “Operation” as "Error report”,the “Offset” value for the mappingvariable (Date Type: DINT) must setto “0”.The Net-ID of the Slave Unit(ET-7000) is fixed to "1".Read DI dataStart from the address 1to read 6 items.Read once every 50 ms. If anerror occurs, wait 5 s to sendthe next commend.If no responds in 500 ms, means error.ICP DAS Co., Ltd. Technical Document

ClassificationWin-GRAF English FAQ-011AuthorEva LiVersion1.0.0DateJan. 2016Page2. Double click the second Data Block ( 15 Write Coil Bits) to open the setting window.The Net-ID of the Slave Unit(ET-7000) is fixed to "1".Write DO data.Start from the address 1to write 6 items.Write data, if data is changed.If no responds in 500 ms, means error.ICP DAS Co., Ltd. Technical Document11 / 12

ClassificationWin-GRAF English FAQ-011AuthorEva LiVersion1.0.0DateJan. 2016Page12 / 121.2.4.Connecting the ET-7018Z (10 AI)The ET-7018Z is an 10 AI channels Ethernet I/O module. The Win-GRAF demo project for this section is"demo ET7018z.zip". Please refer Section 1.2.1 to set up the module channels using the InternetBrowser, and restore/open the demo project.Demo Description:This demo creates one Data Block to read 10 AI data.1. Double click the first Data Block ( 4 Read Input Registers) to open the setting window.Note: (See the figure above)1. The “Offset” value starts at “0” andthe Modbus address of variable isequal to the “Offset” value plus 1(Base address).The Net-ID of the Slave Unit(ET-7000) is fixed to "1".2. If you set the “Operation” as"Error report”, the “Offset” valuefor the mapping variable(Date Type: DINT) must set to “0”.Read DI dataStart from the address 1to read 10 items.3. If AI range is -32768 32767,please declare the data type as"INT" for the variable.Read once every 50 ms.If error occurs, wait 5 s tosend the next commend.If no responds in 500 ms, means error.ICP DAS Co., Ltd. Technical Document

1.2.2. Restore/Open the Demo Project This paper provides the following Win-GRAF demo projects, you can click the Win-GRAF menu bar "File" "Add Existing Project" "From Zip" to restore/open/check the demo projects. Demo Project File Name Description ET-7060 demo_ET7060.zip Read 6 DIs, write 6 DOs