Home

Modbus Slave OPC Server Manual

image

Contents

1. Properties Delete Stop Connect Start New Open Save E49 Data Access pbsModbusSlave_OPCSrv 124726020 pbsModbu reg Al2 100 GOOD 13 03 29 653 pbsModbu Group amp reg Al3 GooD 12 47 26 020 pbsModbu Group reg Al4 0 GooD 12 47 26 020 pbsModbu Group reg AIS 0 GOOD 12 47 26 020 pbsModbu Group amp reg AIG GOOD 12 47 26 020 pbsModbu Group teg Al 1000 12 47 26 020 pbsModbu Group reg AlB 0 GOO0D 12 47 26 020 pbsModbu Group www pbsControl com Page 23 Modbus Slave OPC Server Manual For testing Modbus Slave OPC Server you need to have a Modbus Master Software In product CD you can see demo version of ModScan32 software Run ModScan32 and make following setting File Connection Setup View Window Help Disa ejes Sle aa salm ModScal Device Id Address 0001 Length 8 For Hi FL Length 8 DevicelD 2 2 MODBUS Point Type 04 INPUT REGISTER im Reset Ctrs Number of Polls 0 Valid Slave Responses 0 Modbus Point Type Input Register In Connection Menu use following remote Modbus TCP Server IP address 127 0 0 1 Port 502 Click on OK Connect Using Remote modbusTCP Server gt IP Address 127 0 0 1 Service Port aoz r Configuration Hardware Flow Control 34 Boud Fate 57600 T Wait for DSR
2. Tag Address 1 Namez reg AI1 Type Al Init 0 gt Tag Address 2 Name reg Al2 Type Al Init 0 gt Tag Address 3 Name reg Al3 Type Al Init 0 gt Tag Address 4 Name reg Al4 Type Al Init 0 gt Tag Address 5 Namez reg AI5 Type Al Init 0 gt Tag Address 6 Name reg Al6 Type z AI Init 0 gt Tag Addressz 7 Name reg Al7 Type Al Init 0 gt Tag Address 8 Name reg Al8 Type Al Init 0 gt Tag Address 10 Namez FI1 Type SFI Init 0 gt Tag Address 12 Namez FI2 Type SFI Init 0 gt Tag Address 14 Namez FI3 Type SFI Init 0 gt Tag Address 16 Name FI4 Type SFI Init 0 gt Tag Address 18 Namez FI5 Type SFI Init 0 gt Tag Address 20 Name FI6 Type SFI Init 0 gt lt Tag Address 22 Name FI7 Type SFI Init 0 gt Tag Address 24 Namez FI8 Type SFI Init 0 gt lt Tag Address 30 Name INTI1 Type SINTI Init 0 gt lt Tag Address 32 Name INTI2 Type SINTI Init 0 gt lt Tag Address 34 Name INTI3 Type SINTI Init 0 gt lt Tag Address 36 Name INTI4 Type SINTI Init 0 gt lt Tag Address 38 Name INTI5 Type SINTI Init 0 gt lt Tag Address 40 Name INTI6 Type SINTI Init 0 gt lt Tag Address 42 Name INTI7 Type SINTI Init 0 gt lt Tag Address 44 Name INTI8 Type SINTI Init 0 gt Tag Address 50 Name UINTI1 Type SUINTI Init 0
3. gt lt Tag Address 52 Name UINTI2 Type SUINTI Init 0 gt lt Tag Address 54 Name UINTI3 Type SUINTI Init 0 gt www pbsControl com Page 18 Modbus Slave OPC Server Manual Tag Address 56 Name UINTI4 Type SUINTI Init 0 gt Tag Address 58 Name UINTI5 Type SUINTI Init 0 gt lt Tag Address 60 Name UINTI6 Type SUINTI Init 0 gt lt Tag Address 62 Name UINTI7 Type SUINTI Init 0 gt lt Tag Address 64 Name UINTI8 Type SUINTI Init 0 gt Tag Address 1 Name DO1 Type DO Init False gt Tag Address 2 Name DO2 Type DO Init False gt Tag Address 3 Name DO3 Type DO Init False gt Tag Address 4 Name DO4 Type DO Init False gt Tag Address 5 Name DO5 Type DO Init False gt Tag Address 6 Name DO6 Type DO Init False gt Tag Address 7 Name DO7 Type DO Init False gt Tag Address 8 Name DO8 Type DO Init False gt Tag Address 1 Name AO1 Type AO Init 0 gt Tag Address 2 Name AO2 Type AO Init 0 gt Tag Address 3 Name z AO3 Type AO Init 0 gt Tag Address 4 Name A04 Type AO Init 0 gt Tag Address 5 Name z AO5 Type AO Init 0 gt Tag Address 6 Name AO6 Type AO Init 0 gt Tag Address 7 Namez AO7 Type AO Init 0 gt Tag Address 8 Name AO8 Typez AO Init 0 gt lt Tag Address 10 Name Group1 FO1 Type S
4. 3 Name D2_LEVEL Type DI Init false gt Address 4 Name D3_LEVEL Type DI Init false gt Address 5 Name HIGH_LEVEL Type DI Init false gt Address 6 Name LOW_LEVEL Type DI Init false gt Address 7 Name STOP_LEVEL Type DI Init false gt Address 8 Name P1_STATUS Type DI Init false gt Address 9 Name P2_STATUS Type DI Init false gt Address 10 Namez P3 STATUS Type DI Init false gt www pbsControl com Page 9 Modbus Slave OPC Server Manual lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag Address 11 Name DEWA_SUPPLY Type DI Init false gt Address 12 Name FIRE_ALARM Type DI Init false gt Address 13 Name P2_Seal_Failed Type DI Init false gt Address 14 Name KIOSK_DOOR Type DI Init false gt Address 15 Name P1_EARTH_LEAKAGE Type DI Init false gt Address 16 Namez P1 Over Current Type DI Initz false gt Address 17 Namez P1 High Temp Type DI Init false gt Address 18 Name P1_Starter_Power Type DI Init false gt Address 19 Name P2_EARTH_LEAKAGE Type DI Init false gt Address 20 Namez P2 Over Current Ty
5. Writing Floating point from Modbus master to OPC In OPC Browser select group1 and add all tags In Modscan do following setting In setup menu of Modscan Display Option change to Swap FP Address 10 Length 16 Holding register Device ID 2 File Connection Setup View Window Help olea ejes S ei aaae cafes eal Properties x Delete X Stop Connect Start Device Id 2 Numb f Polls 1471 pbsModbusSlave_OPCSrv Address 0010 MODBUS Point Type Number of Polls 147 Length 16 03 HOLDING REGISTER Reset Ctrs GOOD 5 467885E 06 GOOD 9087 908 GOOD 0 GOOD 12 67 GOOD OPC Servers DA Browse DA Items AE Ev www pbsControl com Page 26 Modbus Slave OPC Server Manual 5 Product Specification OPC Standard DA2 0 Number of Modbus tags no Limitation Modbus TCP Protocol Support YES Modbus RTU protocol support YES ModbusASCII Protocol Support NO Number of OPC Server instance 4 instance in the same time pbsModbusSlave_OPCSrv ee 3735447B 3737 4241 452D 453546412D 34 pbsModbusSlave OPCSrv pbsModbusSlave_OPCSrvl2 3243357B 3245 4336 362D 313943312D34 pbsModbusSlave_OPCSrvl2 pbsModbusSlave_OPCSrvl3 1231457B 4537 4237 332D 434244412D 34 pbsModbusSlave OPCSr l3 pbsModbusSlave OPCSrvl4 3934397B 4446 3245 41 2D 363537382D 34 e pbsModbusSlave_OPCSrvl4 When using as M
6. gt lt Tag Address 62 Name UINTO7 Type SUINTO Init 0 gt Tag Address 64 Namez UINTOS Type SUINTO Init 0 gt lt OPCSrvTags gt Step 2 Run pbsModbusS_OPCSrv exe application You will see following page il pbsControl OPC Server for Modbus Slave V1 0 1 Instance1 Read Parameter gt Protocol ModbusTCP 8 29 2012 4 47 26 PM Read Parameter gt StatusListNum 256 8 29 2012 4 47 26 PM Read Parameter gt COM 8 29 2012 4 47 26 PM Read Parameter gt BaudRate 57600 8 29 2012 4 47 27 PM Read Parameter gt DataBit 8 8 29 2012 4 47 27 P Parity None E PM Modbus Slave OPC server Booted 8 29 2012 4 47 30 PM In Status list you can see all parameters and status of OPC server OPC server will automatically minimize You can connect to OPC server by any OPC client or Browser In pbsModbusSlave CD you can see a free OPC Browser After you run OPC Browser you can connect to Modbus Slave OPC server www pbsControl com Page 20 Modbus Slave OPC Server Manual File Edit Session View DO EO M New Open Save Propertie Stop Connect Start Local H E Data Access V1 f Data Access V2 Kepware Communications Server 5 5 pbsControl DNP3_OPC1 pbsControl DNP3_OPC2 pbsHMIViewOPCSrA1 0 9 pbsModbusSlave 11 e e e EE E EH SDG OPC Data Access Simulator OPC DA Server TMW OPC test server Alarms and Events emote F A A m is D OPC Serve
7. from slave T Wait for CTS from slave Word Length e z DTR Control DISABLE z Parity None z RTS Control DISABLE Stop Bits fi Delay o ms after RTS before transmitting first character Delay o ms after last character before releasing RTS Polls 0 In This stage ModScan32 will connect to Modbus Slave OPC Server File Connection Setup View Window Help olsa ejes ei ie aana For Help press Fl Device Id 2 MODBUS Point Type 04 INPUT REGISTER x Number of Polls 7 alid Slave Responses 7 Reset Ctrs www pbsControl com Page 24 Modbus Slave OPC Server Manual When you change value of reg Al2 in OPC Browser register number 30002 will be change E ModScan32 ModScal File Connection Setup View Window Help File Edit Session View olsa ejes e ever 2 RE XE f m afm E a New Open Save Properties Delete Stop Connect Start Ei Data Access TimeStamp a Modsa pbsModbusSlave OPCSrv 12 47 26 020 Device Id 3 Group 131444613 Address 0001 Number of Polls 88 reg All 12 47 26 020 MODBUS Point Type alid Slave Responses 88 regAD 124726020 Length 8 04 INPUT REGISTER Reset Ctrs 9 reg AB 12 47 26 020 9 reg AM 1247 26 020 6 regAS 12 47 26 020 9
8. FO Init 0 gt lt Tag Address 12 Name Group1 FO2 Type SFO Init 0 gt lt Tag Address 14 Name Group1 FO3 Type SFO Init 0 gt lt Tag Address 16 Name Group1 FO4 Type SFO Init 0 gt lt Tag Address 18 Name Group1 FO5 Type SFO Init 0 gt lt Tag Address 20 Name Group1 FO6 Type SFO Init 0 gt lt Tag Address 22 Name Group1 FO7 Type SFO Init 0 gt lt Tag Address 24 Name Group1 FO8 Type SFO Init 0 gt lt Tag Address 30 Name Group2 INTO1 Type SINTO Init 0 gt lt Tag Address 32 Name Group2 INTO2 Type SINTO Init 0 gt lt Tag Address 34 Name Group2 INTO3 Type SINTO Init 0 gt lt Tag Address 36 Name Group2 INTO4 Type SINTO Init 0 gt lt Tag Address 38 Name Group2 INTO5 Type SINTO Init 0 gt lt Tag Address 40 Name Group2 INTO6 Type SINTO Init 0 gt lt Tag Address 42 Name Group2 INTO7 Type SINTO Init 0 gt lt Tag Address 44 Name Group2 INTO8 Type SINTO Init 0 gt www pbsControl com Page 19 Modbus Slave OPC Server Manual lt Tag Address 50 Name UINTO1 Type SUINTO Init 0 gt lt Tag Address 52 Name UINTO2 Type SUINTO Init 0 gt lt Tag Address 54 Name UINTO3 Type SUINTO Init 0 gt lt Tag Address 56 Name UINTO4 Type SUINTO Init 0 gt Tag Address 58 Namez UINTO5 Type SUINTO Init 0 gt lt Tag Address 60 Name UINTO6 Type SUINTO Init 0
9. Modbus Slave OPC Server Manual Document name Modbus slave OPC server user manual Version 1 0 1 Date Q1 2012 Revision changes adding Modbus TCP functionality Author Kamjoo bayat Kamjoo bayat pbscontrol com For any support please contact Kamjoo Bayat 9 pbscontrol com Content 1 Introduction 2 Installation 3 Configuration 4 Operation 5 Sample configuration 6 Product specification www pbsControl com Page 1 Modbus Slave OPC Server Manual 1 Introduction pbsControl company developed an OPC server which has Modbus slave functionality We used pbsModbusS_OPCSrv module In many projects for Local HMI Connection and higher level Control system connection We are using Win Tech OPC engine which is a leader in OPC server development toolkit and Microsoft C language for developing our OPC servers In following figure you can see Modbus Slave OPC Server architecture and operation Modbus Slave OPC server Any OPC Client Software aseqejeq 240 eseqejeg snqpolN www pbsControl com Page 2 Modbus Slave OPC Server Manual 2 Installation pbsModbusS_OPCSrv is tested on following operating systems Windows XP professional Windows XP embedded 2009 Windows Vista Windows 7 Windows server 2003 and 2008 32 and 64 bit pbsModbusS OPCSrv is developed by CH so you need to have Microsoft Dot net framework 3 5 runtime on your system Please download and install from www microso
10. ModbusRTU Protocol lt Node gt lt Name gt Parity lt Name gt lt Desc gt None Even Odd lt Desc gt lt Value gt None lt Value gt lt Node gt Parity Communication Parity Just will use for ModbusRTU Protocol lt Node gt lt Name gt DtrEnable lt Name gt lt Desc gt DtrEnable lt Desc gt lt Value gt False lt Value gt lt Node gt DtrEnable DTR functionality of Serial Port Just will use for ModbusRTU Protocol The DTR Data Terminal Ready signal is one of the most important call control signals on a data modem It is the most reliable method by which a computer tells the modem to disconnect end a call Dropping the DTR from high to low for at least 2 seconds accomplishes this DTR is using for Modem Connection Set DtrEnable to False for using without Modem If you want to use Modem for communication please set modem to Auto Answer and Set DtrEnable to True www pbsControl com Page 5 Modbus Slave OPC Server Manual RtsEnable and Handshake is for setting flow control on RS232 port RTS CTS Flow Control is another flow control mechanism that is part of the RS232 standard It makes use of two further pins on the RS232 connector RTS Request to Send and CTS Clear to Send These two lines allow the receiver and the transmitter to alert each other to their state A transmitter raises its RTS line which causes an interrupt on the receiver i e hey can send some data If the receiver is in a positio
11. Please increase this parameter to 150 or 200 msec Node Name StatusListNum Name lt Desc gt StatusListNum lt Desc gt lt Value gt 256 lt Value gt lt Node gt OPC server will clear status list in main page of OPC server after each StatusListNum line lt Node gt lt Name gt TCPPort lt Name gt lt Desc gt Modbus TCP Port Number lt Desc gt lt Value gt 502 lt Value gt lt Node gt When protocol is ModbusTCP you should set TCP port for communication Port number 502 is registered for ModbusTCP protocol lt Node gt lt Name gt TCPLocallP lt Name gt lt Desc gt Modbus TCP LocallP lt Desc gt lt Value gt 127 0 0 1 lt Value gt lt Node gt TCPLocalPort if you have many network ports on the PC which you install OPC server you should set exact port IP which you want to use for ModbusTCP Communication lt Node gt Name Instance Name lt Desc gt OPC Server instance 1 2 3 4 lt Desc gt Value 1 Value Node You can run maximum 4 different Modbus Slave OPC Server on a PC For each OPC server you should select different Instance Number 1 2 3 4 Make four different directory and copy pbsModbusS OPCSrv directory files to each directory When you set different instance Number for each OPC server OPC Server will make different registry setting in Windows registry for OPC client connections www pbsControl com Page 8 Modbus Slave OPC Server Manual OPC Server tag Configur
12. Swap 32 unsigned int Input 2 Input register as one unsigned int FI FO Maximum and Minimum Value MaxValue 3 40282e 038f MinValue 3 40282e4038f INITI INITO Maximum and Minimum Value MaxValue 2 147 483 647 MinValue 2 147 483 648 UINITI UINITO Maximum and Minimum Value www pbsControl com Page 11 Modbus Slave OPC Server Manual MaxValue MinValue 4 294 967 295 0 Supported Modbus Function codes Following Modbus Function codes are supported in Modbus Slave OPC Server FC ReadCoilStatus 0x1 FC ReadInputStatus 0x2 FC ReadHoldingRegisters 0x3 FC ReadInputRegisters 0x4 FC ForceSingleCoil 0x5 FC PreSetSingleRegister 0x6 FC ForceMultiCoils Oxf FC PreSetMultiRegisters 0x10 01 Read Coil Status Description Reads the ON OFF status of discrete outputs 0X references coils in the slave 02 Read Input Status Description Reads the ON OFF status of discrete inputs 1X references in the slave 03 Read Holding Registers Description Reads the binary contents of holding registers 4X references in the slave 04 Read Input Registers Description Reads the binary contents of input registers 3X references in the slave 05 Force Single Coil www pbsControl com Page 12 Modbus Slave OPC Server Manual Description Forces a single coil 0X reference to either ON or OFF 06 Preset Single Register Description Presets a value into a single hold
13. ation For defining Modbus tags in OPC server Please open ModbusTags xml file by Notepad editor For each Modbus Tag you should define one Tag Node Sample Modbus tag Definition File lt xml versionz 1 0 lt OPCSrvTags gt lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag lt Tag Address 1 Name P1_CURRENT Type UINTI Init 0 gt Address 5 Name P1_TODAY_RT Type UINTI Init 0 gt Address 9 Name P1_YD_RT Type UINTI Init 0 gt Address 13 Name P1_TOT_RT Type UINTI Init 0 gt Address 17 Name P2_CURRENT Type UINTI Init 0 gt Address 21 Name P2_TODAY_RT Type UINTI Init 0 gt Address 25 Name P2_YD_RT Type UINTI Init 0 gt Address 29 Name P2_TOT_RT Type UINTI Init 0 gt Address 33 Name P3 CURRENT Type UINTI Init 0 Address 37 Namez P3 TODAY RT Type UINTI Init 0 gt Address 41 Name P3_YD_RT Type UINTI Init 0 gt Address 45 Namez P3 TOT RT Type UINTI Init 0 gt Address 49 Name POWER Type FI Init 0 gt Address 53 Namez INS POWER Type UINTI Init 0 gt Address 57 Name StormWaterPump_Duty Type UINTI Init 0 gt Address 1 Name P1_Seal_ Failed Type DI Init false gt Address 2 Name D1_LEVEL Type DI Init false gt Address
14. egister 3 Modbus master is reading data from OPC server Modbus Slave Device OPC server is answering based on Modbus protocol and will send all internally Modbus tags which master requested 4 Modbus master is writing data To Coils and Holding registers OPC server will convert tags and write to OPC Client OPC server converts 2 Holding register to FO INTO and UINTO and writes to OPC client Modbus Slave OPC server DI AL Fl INTI UINTI SFI SINTI SUINTI DI Al Any OPC o ji UU Q Client G Software Er z S 5 DO AO FO INTO UINTO A S DO AO SFO SINTO SUINTO Kdodbus aster op OPC client writes DI Al Fl INTI UINTI SFI SINTI and SUINTI to Modbus Slave OPC server OPC Server maps OPC tags to Modbus tags Modbus Master is reading Input Status Coils Status Input Register and Holding registers Modbus Master Writes Coil and Holding registers to OPC server OPC server Maps Modbus Tags to OPC Tags OPC Client will receive DO AO FO INTO UINTO SFO SINTO and SUINTO values www pbsControl com Page 15 Modbus Slave OPC Server Manual 4 Sample Configuration Step 1 Options xml lt xml versionz 1 0 gt lt Options gt lt Version gt 1 0 0 lt Version gt lt Node gt lt Name gt Protocol lt Name gt lt Desc gt ModbusRTU ModbusTCP lt Desc gt lt Value gt ModbusTCP lt Value gt lt Node gt lt Node gt lt Name gt COM lt Name gt lt De
15. ent 3 Configuration Edit Options xml file with notepad editor You will see following parameters in this file For each node there are 3 parameters Name Fix part and do not change it Desc Description of Parameter Value Parameter Value lt Node gt lt Name gt Protocol lt Name gt lt Desc gt ModbusRTU ModbusTCP lt Desc gt lt Value gt ModbusTCP lt Value gt lt Node gt Protocol Communication protocol ModbusRTU for serial communication with RS232 RS422 or RS485 and ModbusTCP for Ethernet connection For RS485 network you should use Rs485 to RS232 converter or using any External RS485 serial ports with Automatic flow detection functionality pbsModbusS_OPCSrv exe is using RS424 and RS485 like RS232 Port lt Node gt lt Name gt COM lt Name gt lt Desc gt Serial Port for Communication 1 2 3 4 5 lt Desc gt lt Value gt 1 lt Value gt lt Node gt COM Serial port for ModbusRTU protocol Just will use for ModbusRTU Protocol lt Node gt lt Name gt BaudRate lt Name gt lt Desc gt Communication baud rate lt Desc gt www pbsControl com Page 4 Modbus Slave OPC Server Manual lt Value gt 57600 lt Value gt lt Node gt BaudRate Communication baud rate Just will use for ModbusRTU Protocol lt Node gt lt Name gt DataBit lt Name gt lt Desc gt 7 8 lt Desc gt lt Value gt 8 lt Value gt lt Node gt DataBit Communication Data Bits Just will use for
16. ft com you can install from product CD For OPC functionality you need to install OPC runtime 2 0 on your PC Please download it from form link ftp pbscontrol com user opcuser password opc 2012 directory name OPCredist2 You can download demo version of pbsModbusS OPCSrv from following link ftp pbscontrol com user opcuser password opc 2012 directory name pbsModbusS OPCSrv Demo version has full functionality but it works for 30 minutes every time you restart it Registered version is located on FTP Site for each client with dedicated User name and password You can find all software in products CD Copy files from pbsModbusS OPCSrv directory to a local directory in your PC You will see following files in pbsModbusS OPCSrv directory 1 pbsModbusS OPCSrv exe this is main OPC module You will run this module when you want to run OPC server 2 PbsModbusSlave32 dll pbsControl modbus Slave implementation This is 10096 CH managed code library 3 pbsOPCSrvAPI dll Wrapper class for OPC Server toolkit 4 WtOPCSvr dll OPC server API This is C implementation of OPC standard 5 ModbusTags xml modbus tag definition www pbsControl com Page 3 Modbus Slave OPC Server Manual 6 options xml option file for setting OPC server parameters When you execute pbsModbusS_OPCSrv exe for the first time it will update windows registry After that you can connect to OPC server by any OPC Cli
17. ing register 4X reference 15 OF Hex Force Multiple Coils Description Forces each coil 0X reference in a sequence of coils to either ON or OFF 16 10 Hex Preset Multiple Registers Description Presets values into a sequence of holding registers 4X references Samples Modbus master OPC tag tag Address OPC Tag Type 00001 1 DO 00002 2 DO 10001 1 DI 100010 10 DI 40001 1 AO 400020 20 AO 30001 1 Al 30002 2 Al 300020 20 FI 300021 300022 22 FI 300023 400020 20 FO 400021 400022 22 FO 400023 300030 30 INITI 300031 300032 32 UINTI www pbsControl com Page 13 Modbus Slave OPC Server Manual 300033 400040 40 INITO 400041 400042 42 UINTO 400043 www pbsControl com Page 14 Modbus Slave OPC Server Manual 4 Operation 1 When Modbus Slave OPC server is started it will define Modbus tags and OPC tags as following Modbus coil Discrete Input gt one Modbus tag internally and One OPC Tags Modbus register Holding register one Modbus tag internally and One OPC Tags INIT UINTI 3 OPC server will define two register internally and one OPC tags FO INITO UINTIO OPC server will define two Holding register internally and one OPC tags 2 OPC client writes data to DI Al Fl INIT and UINTI tags OPC server writes to internal Modbus tags for Fl INIT and UINTI OPC server will write on 2 Modbus r
18. n to receive the data it will assert its CTS line i e yes you can start sending The raising and lowering of these lines allows device drivers which implement hardware flow control code to maintain a reliable data connection between transmitter and receiver The advantage to this approach is that damaging data in transit does not effect the flow control mechanism as in XOn XOff Node lt Name gt RtsEnable lt Name gt lt Desc gt RtsEnable lt Desc gt lt Value gt False lt Value gt lt Node gt lt Node gt lt Name gt Handshake lt Name gt lt Desc gt None RequestToSend RequestToSendXOnxOff XOnXOff Desc lt Value gt None lt Value gt lt Node gt None Summary No control is used for the handshake XOnXOff Summary The XON XOFF software control protocol is used The XOFF control is sent 10 stop the transmission of data The XON control is sent to resume the transmission These software controls are used instead of Request to Send RTS and Clear to Send CTS hardware controls RequestToSend Summary Request to Send RTS hardware flow control is used RTS signals that data is available for transmission If the input buffer becomes full the RTS line will be set to false The RTS line will be set to true when more room becomes available in the input buffer RequestToSendXOnXOff Summary Both the Request to Send RTS hardware control and the XON XOFF soft
19. odbusTCP you can connect to 4 different Ethernet port When using as ModbusRTU you can connect to 4 different Serial ports Supported modbus Function codes FC_ReadCoilStatus 0x1 FC_ReadInputStatus 072 FC ReadHoldingRegisters 0x3 FC ReadInputRegisters 0x4 FC ForceSingleCoil 0x5 FC PreSetSingleRegister 0x6 FC ForceMultiCoils 076 FC PreSetMultiRegisters 0x10 www pbsControl com Page 27
20. pe DI Initz false gt Address 21 Namez P2 High Temp Type DI Init false gt Address 22 Name FloatSwitch_Duty2 Type DI Init false gt Address 23 Name FloatSwitch_Duty1 Type DI Init false gt Address 24 Name FloatSwitch_CommonStop Type DI Init false gt Address 25 Name P2_Starter_Power Type DI Init false gt Address 26 Name P1_REMLOC Type DI Init false gt Address 27 Name P2_REMLOC Type DI Init false gt Address 28 Name P1_EN Type DI Init false gt Address 29 Name P2_EN Type DI Init false gt Address 30 Name Station_Enable Typez DI Init false gt Address 31 Name P1_AUTO Type DI Init false gt Address 32 Namez P3 Seal Failed Type DI Init false gt Address 33 Name P1_Hand Type DI Init false gt Address 34 Name P2_AUTO Type DI Init false gt Address 35 Name P2_Hand Type DI Init false gt Address 36 Name P1_STOP Type DI Init false gt Address 37 Namez P2 STOP Type DI Init false gt Address 38 Name GEN_SUPPLY Type DI Init false gt Address 39 Namez P3 EARTH LEAKAGE Type DI Init false gt Address 40 Namez P3 Over Current Type DI Init false gt Address 41 Namez P3 High Temp Type DI Init false gt Address 42 Name P3_Starter_Power Type DI Init false gt Address 43 Name P3_REMLOC Type DI Init false gt Address 44 Name P3_EN Type DI Ini
21. reg AIG 12 47 26 020 reg AT reg AB Step 3 Writing Coil by Modbus Master to OPC Add DO Tags in OPC Browser and change Modbus master setting as following Address 1 Length 8 Device ID 2 Coil Status Double click on a coil and change its value changes will transfer to OPC Client File Connection Setup View Window Help eles lew aame ES Modscal Device ld 2 Address opus Point 484 Length 8 01 COIL STATUS File Edit Session View D New Open Save ad Data Access Properties x Delete xX e Stop Connect Sta Write Coil Node B Address 6 Value 31 C Of On Step 4 Writing Holding register by Modbus Master to OPC Add AO1 to AO8 tags to OPC browser and do following setting on Modbus Master Address 1 Length 8 Holding register www pbsControl com Page 25 Modbus Slave OPC Server Manual Double click on register 5 on Modbus Master page and change its value new value will move to OPC client At Modscan32 program change display option in setup menu to integer File Edit Session View D u x X New Open Save Properties Delete Device Id 2 I I 1 Number of Polls 994 as ir MODBUS Point Type Valid Slave Responses 994 Length 03 HOLDING REGISTER Reset Cus Step5
22. rs DA Items AE Browse AE Events AE Conditions Errors OPC Server name is pbsModbusSlave_OPCSrv Add Server and Click on DA Browse Tab You can see all tags which is defined in the Modbustag xml file Notice that When you separate Tag Name by It will make a new segment in OPC server in This example following tags defined In same segment reg Al1 reg Al2 reg Al3 You can make multi segment by adding To tag Name www pbsControl com Page 21 Modbus Slave OPC Server Manual Open Save Properties Delete Stop Connect Start E pbsModbusSlave OPCSrv reg H E Groupt Group2 DII DI2 DI3 DI4 DI5 DIG DI DIS FI Fl2 FI3 FI4 FIS FIG FI FI8 INTH INTI2 INTIS INTIA INTIS INTIE INTI INTIS UINTI UINTI2 UINTI3 UINTIA UINTIS UINTI amp UINTI OPC Servers DA Browse AE Browse AE Events 2 4 4 www pbsControl com Page 22 Modbus Slave OPC Server Manual Right click on reg segment and add all tags File Edit Session View D New Open Save Properties Ei Data Access 3 pbsModbusSlave_OPCSrv MCI Delete Stop Connect Start Properties 9 AIS 9 AB 9 AI ml Group H E Group2 In OPC Browser View Menu select DA Write Bar No you can write to Input tags Click on DA Items and click on reg AI2 Type 100 on DA Bar and write value E TTD oolbox C gsm File Edit Session View D x
23. sc gt Serial Port for Communication 1 2 3 4 5 lt Desc gt lt Value gt 1 lt Value gt lt Node gt lt Node gt lt Name gt BaudRate lt Name gt lt Desc gt Communication baud rate lt Desc gt lt Value gt 57600 lt Value gt lt Node gt lt Node gt lt Name gt DataBit lt Name gt lt Desc gt 7 8 lt Desc gt lt Value gt 8 lt Value gt lt Node gt lt Node gt lt Name gt Parity lt Name gt lt Desc gt None Even Odd lt Desc gt lt Value gt None lt Value gt lt Node gt lt Node gt lt Name gt DtrEnable lt Name gt lt Desc gt DtrEnable lt Desc gt lt Value gt False lt Value gt lt Node gt lt Node gt lt Name gt RstEnable lt Name gt lt Desc gt RstEnable lt Desc gt lt Value gt False lt Value gt lt Node gt lt Node gt lt Name gt Handshake lt Name gt Desc None RequestToSend RequestToSendXOnXOff XOnXOff Desc lt Value gt None lt Value gt lt Node gt lt Node gt www pbsControl com Page 16 Modbus Slave OPC Server Manual lt Name gt ReadBufferSize lt Name gt lt Desc gt ReadBufferSize lt Desc gt lt Value gt 1024 lt Value gt lt Node gt lt Node gt lt Name gt WriteBufferSize lt Name gt lt Desc gt WriteBufferSize lt Desc gt lt Value gt 1024 lt Value gt lt Node gt lt Node gt lt Name gt SlaveAddress lt Name gt lt Desc gt SlaveAddress lt Desc gt lt Value gt 2 lt Value gt lt Node gt lt Node gt lt Name g
24. t false gt Address 45 Namez P3 AUTO Type DI Init false gt Address 46 Name P3_ Hand Type DI Init false gt Address 47 Name P3_ STOP Type DI Init false gt Address 48 Name SpareD148 Type DI Init false gt www pbsControl com Page 10 Modbus Slave OPC Server Manual Modbus address Address Modbus Address without Ox 1x 3x and 4x address part if modbus Tag in Master is 30001 in OPC server it is 1 with Tag type Al Name Tag Name Type Modus Tag Type Init Init Value for Tag Modbus Tag Type DI Digital input Discrete Input in Modbus AI Analog Input Input Register in Modbus DO Digital output Coil in Modbus AO Analog output Holding register in Modbus FI Float Input 2 Input register as one float FO Float Output 2 Holding register as one float INTI 32bit signed int Input 2 input register as one int INTO 32 bit signed int Output 2 Holding register as one int UINTO 32 unsigned int Output 2 Holding register as one unsigned int UINTI 32 unsigned int Input 2 Input register as one unsigned int SFI Swap Float Input 2 Input register as one float SFO Swap Float Output 2 Holding register as one float SINTI Swap 32bit signed int Input 2 input register as one int SINTO Swap 32 bit signed int Output 2 Holding register as one int SUINTO Swap 32 unsigned int Output 2 Holding register as one unsigned int SUINTI
25. t ShiftAddress lt Name gt lt Desc gt ShiftAddress lt Desc gt lt Value gt 1 lt Value gt lt Node gt lt Node gt lt Name gt PhysicalLayerScanTime lt Name gt lt Desc gt PhysicalLayerScanTime ms lt Desc gt lt Value gt 100 lt Value gt lt Node gt lt Node gt lt Name gt StatusListNum lt Name gt lt Desc gt StatusListNum lt Desc gt lt Value gt 256 lt Value gt lt Node gt lt Node gt lt Name gt TCPPort lt Name gt lt Desc gt Modbus TCP Port Number lt Desc gt lt Value gt 502 lt Value gt lt Node gt lt Node gt lt Name gt TCPLocallP lt Name gt lt Desc gt Modbus TCP LocallP Desc lt Value gt 127 0 0 1 lt Value gt lt Node gt lt Node gt lt Name gt Instance lt Name gt lt Desc gt OPC Server instance 1 2 3 4 lt Desc gt lt Value gt 1 lt Value gt lt Node gt lt Options gt www pbsControl com Page 17 Modbus Slave OPC Server Manual ModbusTags xml lt xml version 1 0 gt lt OPCSrvTags gt Tag Address 1 Name DI1 Type DI Initz False gt Tag Address 2 Name DI2 Type DI Init False gt Tag Address 3 Name DI3 Type DI Init False gt Tag Address 4 Name DI4 Type DI Init False gt lt Tag Address 5 Name DI5 Type DI Init False gt lt Tag Address 6 Name DI6 Type DI Init False gt Tag Address 7 Name DI7 Type DI Init False gt Tag Address 8 Name DI8 Type DI Init False gt
26. ware controls are used www pbsControl com Page 6 Modbus Slave OPC Server Manual lt Node gt lt Name gt ReadBufferSize lt Name gt lt Desc gt ReadBufferSize lt Desc gt lt Value gt 1024 lt Value gt lt Node gt lt Node gt lt Name gt WriteBufferSize lt Name gt lt Desc gt WriteBufferSize lt Desc gt lt Value gt 1024 lt Value gt lt Node gt ReadBuffersize and WriteBufferSize is read and write buffer size for Serial port 1024 is suitable for ModbusRTU protocol Node lt Name gt SlaveAddress lt Name gt lt Desc gt SlaveAddress lt Desc gt lt Value gt 2 lt Value gt lt Node gt Slaveaddress Each modbusRTU Slave device must has an unique ID on RS485 network lt Node gt lt Name gt ShiftAddress lt Name gt lt Desc gt ShiftAddress lt Desc gt lt Value gt 0 lt Value gt lt Node gt Shiftaddress Sometimes Modbus Master Devices are requesting Modbus Tags with 1 Address different ShiftAddress is adding to any Address which is requested by Master lt Node gt lt Name gt PhysicalLayerScanTime lt Name gt lt Desc gt PhysicalLayerScanTime ms lt Desc gt lt Value gt 100 lt Value gt lt Node gt www pbsControl com Page 7 Modbus Slave OPC Server Manual PhysicalLayerScanTime is cyclic time that OP server is reading Serial port for getting new request from Master 100ms is optimized for many systems If frame length which is receiving from master is long

Download Pdf Manuals

image

Related Search

Related Contents

Cables Direct USB3-PCI2P  FDAT-EN2 Users Manual - Alf-Tech  Kochfeld  

Copyright © All rights reserved.
Failed to retrieve file