relab protocol server bridge manual...relab protocol server bridge implements “slave” capability...
TRANSCRIPT
ReLab Protocol Server Bridge implements “Slave” capability of IEC 60870-5-101, IEC 60870-5-104, Modbus Serial and Modbus TCP/IP protocols with ability to turn your computer into Slave Device. The application developed for 32-bit industrial platforms and fully compatible with a TCP/IP stack and Serial interfaces. The application provides custom API with advanced features, which allow user to write into “read-only” registers. With the complements of ReLab Software Logic Controller (RLSLC) user can access OPC address space and perform protocol conversions. This manual explains required steps to configure these drivers.
Overview
ClearControls® is a registered trademark of ReLab Software LLC (2006 ClearControls®. All rights reserved).
Modicon, Microsoft, Intellution, Wonderware, RSView, Survalent, Kepware, Matrikon, IEC, IEEE, SEL, ABB, GE are
trademarks of their respective corporations.
Trademarks
Windows® XP Windows® Server 2003 Windows® Embedded XP Windows® Vista (Ultimate, Business and Enterprise)
CPU – 1GHz Memory – 500MB Storage – 50MB
Hardware & Software Configuration Requirements
Operating System (OS)
Hardware
Select ReLab License Manager
Select an application you want to register
Registering Slave Protocol (Server)
Registering Slave Protocol (Server)
Click on “Show Request Key” button
Copy the “Product Key” Navigate to http://www.relabsoft.com/my/license/ and enter the following information:
Within few minutes you will receive e-mail with registration acknowledgement and within few hours you will receive the license key.After receiving the license key from ReLab switch to “Register” tab, enter the license key and press “Register” button.
Open RLPSB Configuration Console (IEC 60870-5 Configuration Editor or Modbus Configuration Editor)
Expand required OPC Server
Select Items to be added to RLSLC configuration
Right click and click on
Select and right click specific Item
Select “Change Properties of Selected Item…”
Change Item properties
Configuration – Adding OPC Items
Name - data input control (user configurable)
Description - data input control (user configurable)
Immediate IO - checkbox control (YES/NO)
Note: All changes are kept and delivered at the end of the scan frame – RLSLC event
Allow scale - checkbox control (enables/disables scaling)
Raw min - data input control (specified raw minimum value of the input)
Raw max - data input control (specified raw maximum value of the input)
Scale min - data input control (specified scaled minimum value of the input)
Scale max - data input control (specified scaled maximum value of the input)
Configuration – Modifying Item Properties
ITEM PROPERTIES
General
Scale
Configuration – Modifying Item Properties
Clamp low - data input control (specified low value of input clamping)
Clamp high - data input control (specified high value of input clamping)
Deadband - data input control (specifies deadband value of the input)
Precision - data input control (specifies precision of the input)
Update rate - data input control (species OPC Group update rate in milliseconds)
Address – data input control (see details on IEC 60870-5 and Modbus addressing)
Command Category – dropdown control selector
o <Multiple Values>
o Undefined [0]
o Double Point [1]
o Step Position [2]
o Integrator Total [3]
o Normalized Value [4]
o Scaled Value [5]
Use Timestamp – checkbox control (YES/NO)
Clamp
Deadband
Precision
Update Rate
Protocol
IEC 60870-5
From “File” menu select “Save | Configuration”
Specify the name of your file and click “Save” button
Configuration – Saving Configuration
From “File” menu select “Open Script” and navigate to …\Program Files\ReLab Software\ReLab IEC 60870-5
Slave\Bin directory
Select IEC-60870-5 (Default).vbs script file for IEC-60870-5 Slave configuration
Select Modbus-Slave (Default).vbs script file for Modbus Slave configuration
Configuration – Opening Default Script
From “Tools” menu select “Deploy to RTE”
Select “Configuration and Script”
Configuration – Deploying Configuration and Script
Right click on configuration icon (A) and select “Configure Protocol” from the menu
Specify device configuration properties
A
Configuration – Configuring IEC 60870-5 Slave Protocol
Configuration – Configuring IEC 60870-5 Slave Protocol
Control Type Description Range
Address [ASDU] Textbox Specifies address of the application service 1-65535
Address [Link] Textbox Specifies transmitter's address 0-255
Mode [Balanced] Radio Button Specifies link layer balanced mode N/A
Mode [Unbalanced] Radio Button Specifies link layer unbalanced mode N/A
Filed Size Length [Common ASDU Address] Selection Specifies size of the common ASDU address field 1-Byte
2-Bytes
Filed Size Length [Information Object Address] Selection Specifies size of information object address
1-Byte 2-Bytes3-Bytes
Filed Size Length [Cause of Transmission] Selection Specifies size of the cause of transmission field 1-Byte
2-Bytes
Filed Size Length [Link Address] Selection Specifies size of the link address field
No Link1-Byte 2-Bytes
Time Format[Timestamp] Selection Specifies time format
cp16cp24cp56
Background Scan [Interval] Textbox Specifies interval of background scan (sec) 1-65535 (sec)
Buffering [Events] Textbox Specifies number of events to be buffered by
IEC 60870 Slave 1-65535
Buffering [Digitals] Checkbox If checked buffers only digitals (Boolean) points
otherwise buffers all points N/A
Configuration – Configuring IEC 60870-5 Slave Protocol
Control Type Description Range
Integrated Totals[Mode] Selection
Specifies integrated totals mode:Mode A - local freeze with spontaneous transmissionMode B - local freeze with counter interrogationMode C - counter interrogation commands from the controlling station initiate the freeze, freezewith resetMode D - counter interrogation commands from the controlling station initiate the freeze and the frozen values are reported spontaneously
ABCD
Integrated Totals[Interval] Textbox Specifies for Mode A interval by which the slave
will report counter values to controlling station 1-65535 (ms)
Timeouts[Test Frame Timeout] Textbox
Specifies a multiplier of the Test Frame MessageExample: If Master sends message with frequency of 1sec and multiplier is set to 2, the timeout will occur after two seconds. Applicable only if buffering is used.
1-32
Timeouts[Master Inactivity Timeout] Textbox
Species Master inactivity timeout. If Master doesn’t sends message in specified time period(sec) the slave will consider communication loss. Applicable only if buffering is used.
1-3600 (sec)
Quality[Transmit OPC Quality to IEC 60870-5 Master]
Checkbox Specifies if OPC Qualities will be transmitted to IEC 60870 Master N/A
Configuration – Configuring IEC 60870-5 Slave Protocol
Click Next Button
Edit TCP and Serial Port configuration parameters
Click “OK” button to save your configuration
Note: The new configuration will take effect after you deploy confirmation and script “Deploy Configuration and Script”.
Right click on configuration icon (A) and select “Configure Registers” from the menu
Clicking on “Auto Config” button will populate “Protocol Address” filed sequentially
Double clicking on specific row will open “IEC 60870-5 Address” Interface. The address and category can be
changed individually.
Configuration – Configuring IEC 60870-5 Slave Registers
Configuration – Configuring IEC 60870-5 Slave Registers
IEC 60870-5 Addressing
o 1 to 16777215 (24-bit Integer)
“Refresh” button will load previously saved configuration
“Save Config” will save modified configuration
Note: The new configuration will take effect after you deploy confirmation and script “Deploy Configuration and Script”.
Right click on configuration icon (A) and select “Configure Protocol” from the menu
Edit TCP and Serial Port configuration parameters
A
Configuration – Configuring Modbus Slave Protocol
Right click on configuration icon (A) and select “Configure Registers” from the menu
Clicking on “Auto Config” button will populate “Protocol Address” filed based on OPC Data Type and Read/Write
client access property
Double clicking on specific row will open “Modbus Address” Interface. The address and category can be changed
individually.
Configuration – Configuring Modbus Slave Registers
Configuration – Configuring Modbus Slave Registers
Modbus Addressing
o Output Coils [1 to 65536]
o Input Coils [100001 to 165536]
o Internal Registers [300001 to 365536]
o Internal Registers Bits [300001:0 to 365536:15]
o Holding Registers [400001 to 465536]
o Holding Registers Bits [400001:0 to 465536:15]
“Refresh” button will load previously saved configuration
“Save Config” will save modified configuration
Note: The new configuration will take effect after you deploy confirmation and script “Deploy Configuration and Script”.
ParameterDescription
PropertyID
ParameterValues
DefaultParameter
VBScriptCode
The slave implements IEC 60870 protocol 0 1 N MBServer.SetProtocolProp 0, 1
IEC 60870 ASDU does not contain originator 1 0 Y MBServer.SetProtocolProp 1, 0
IEC 60870 ASDU contains originator 1 1 N MBServer.SetProtocolProp 1, 1
The length of IEC 60870 ASDU address is 1 byte 2 1 Y MBServer.SetProtocolProp 2, 1
The length of IEC 60870 ASDU address is 2 bytes 2 2 N MBServer.SetProtocolProp 2, 2
The length of IEC 60870 information object address is 1 byte
3 1 Y MBServer.SetProtocolProp 3, 1
The length of IEC 60870 information object address is 2 bytes
3 2 N MBServer.SetProtocolProp 3, 2
The length of IEC 60870 information object address is 3 bytes
3 3 N MBServer.SetProtocolProp 3, 3
Timestamps are not supported 4 0 Y MBServer.SetProtocolProp 4, 0
cp16Time format is supported 4 1 N MBServer.SetProtocolProp 4, 1
cp24Time format is supported 4 2 N MBServer.SetProtocolProp 4, 2
cp56Time format is supported 4 3 N MBServer.SetProtocolProp 4, 3
There is no link address in IEC 60870 frames 5 0 Y MBServer.SetProtocolProp 5, 0
The length of IEC 60870 link address is 1 byte 5 1 N MBServer.SetProtocolProp 5, 1
Appendix A – IEC 60870-5 Slave Set Protocol Properties
Appendix A – IEC 60870-5 Slave Set Protocol Properties
ParameterDescription
PropertyID
ParameterValues
DefaultParameter
VBScriptCode
The length of IEC 60870 link address is 2 bytes 5 2 N MBServer.SetProtocolProp 5, 2
IEC 60870 operates in balanced mode 6 0 Y MBServer.SetProtocolProp 6, 0
IEC 60870 operates in unbalanced mode 6 1 N MBServer.SetProtocolProp 6, 1
Link Address 7 XXX N MBServer.SetProtocolProp 7, 12
ASDU Address 8 XXX N MBServer.SetProtocolProp 8, 1
Sets the background scan 9 XXX N MBServer.SetProtocolProp 9, 60000
Sets the length of buffering queue 11 XXX N MBServer.SetProtocolProp 11, 100
Buffers only digitals (Boolean) points 12 0 Y MBServer.SetProtocolProp 12, 0
Buffers all points analogs and digitals 12 1 N MBServer.SetProtocolProp 12, 1
Integrated Totals Mode-A 13 0 Y MBServer.SetProtocolProp 13, 0
Integrated Totals Mode-B 13 1 N MBServer.SetProtocolProp 13, 1
Integrated Totals Mode-C 13 2 N MBServer.SetProtocolProp 13, 2
Integrated Totals Mode-D 13 3 N MBServer.SetProtocolProp 13, 3
Appendix A – IEC 60870-5 Slave Set Protocol Properties
ParameterDescription
PropertyID
ParameterValues
DefaultParameter
VBScriptCode
Integrated Totals calculated by IEC 60870 Slave 14 0 Y MBServer.SetProtocolProp 14, 0
Integrated Totals calculated by device 14 1 N MBServer.SetProtocolProp 14, 1
The time interval when integrated totals counter values spontaneously transmitted to IEC 60870 Master
15 XXX N MBServer.SetProtocolProp 15, 600
Master Test Frame Timeout 16 XXX Y MBServer.SetProtocolProp 16, 2
Master Inactivity Timeout 17 XXX N MBServer.SetProtocolProp 16, 20
Do not transmit OPC Quality to IEC 60870-5 Master N N Y MBServerQuality = 0
Transmit OPC Quality to IEC 60870-5 Master N N N MBServerQuality = 1
No Data Type Description Data Type ID Method
1 Byte 17 MBServer.Define Address, 172 Char 16 MBServer.Define Address, 163 Word 18 MBServer.Define Address, 184 Short 2 MBServer.Define Address, 25 DWord 19 MBServer.Define Address, 196 Integer 3 MBServer.Define Address, 37 Long 3 MBServer.Define Address, 38 Float 4 MBServer.Define Address, 49 Double 5 MBServer.Define Address, 5
10 Boolean 11 MBServer.Define Address, 1111 String 8 MBServer.Define Address, 812 Date 7 MBServer.Define Address, 713 Double Point 19 MBServer.DefineWithClass Address, 19, 1 14 Step Position 19 MBServer.DefineWithClass Address, 19, 315 Integrator Total 16 MBServer.DefineWithClass Address, 16, 216 Measured value, normalized value 4 MBServer.DefineWithClass Address, 4, 417 Measured value, scaled value 2 MBServer.Define Address, 2
Appendix A – IEC 60870-5 Slave Set Data Type Configuration
Protocol Server package includes ProtCfg.dll (Protocol_Config.m_Interface). The library includes interface to ReLab Software Logic Controller’s configuration file. The API can be used from RLSLC script and provides the following functions:
Function Description Script
CreateObject Creates Protocol_Config.m_Interface Object
Dim Protocol_ConfigSet Protocol_Config =CreateObject("Protocol_Config.m_Interface")
Destroys Protocol_Config.m_Interface Object Set Protocol_Config = Nothing
PAddress Configures IEC 60870-5 protocol address space (based on configuration file)
Dim PAddress()Protocol_Config.PAddress PAddress
PClientAccess Configures IEC 60870-5 protocol client access (based on configuration file)
Dim PClientAccess()Protocol_Config.PClientAccess PClientAccess
PDataType Configures IEC 60870-5 data types (based on configuration file)
Dim PDataType ()Protocol_Config.PDataType PDataType
PDoublePointConfigures IEC 60870-5 special data types (double point) (based on configuration file)
Dim PDoublePoint ()Protocol_Config.PDoublePoint PDoublePoint
PTimestamp Configures IEC 60870-5 timestamps (based on configuration file)
Dim PTimestamp ()Protocol_Config.PTimestamp PTimestamp
GetRevProtocolAddr Returns IEC 60870-5 reversed address (based on configuration file)
Protocol_Config.GetRevProtocolAddr(Index)
CheckBoolDB Retrieves reference to Boolean point which is set as double point Protocol_Config.CheckBoolDB(Item)
WriteBoolDB Reverses Boolean value if p = 1 Protocol_Config.WriteBoolDB(val(i), p)
Appendix A – IEC 60870-5 Slave ProtCfg Configuration Interface Proxy
Unbalanced interchangeCircuit V.24/V.28
Standard
Unbalanced interchangeCircuit V.24/V.28
Recommended if >1 200 bit/s
Balanced interchangeCircuit X.24/X.27
100 bit/s X 2400 bit/s X 2400 bit/s200 bit/s X 4800 bit/s X 4800 bit/s
X 300 bit/s X 9600 bit/s X 9600 bit/sX 600 bit/s X 19200 bit/sX 1200 bit/s X 38400 bit/s
X 56000 bit/sX 64000 bit/s
Transmission speed (monitor direction)Unbalanced interchange
Circuit V.24/V.28Standard
Unbalanced interchangeCircuit V.24/V.28
Recommended if >1 200 bit/s
Balanced interchangeCircuit X.24/X.27
100 bit/s X 2400 bit/s X 2400 bit/s200 bit/s X 4800 bit/s X 4800 bit/s
X 300 bit/s X 9600 bit/s X 9600 bit/sX 600 bit/s X 19200 bit/sX 1200 bit/s X 38400 bit/s
X 56000 bit/sX 64000 bit/s
Link transmission procedure
Address field of the link Frame length
X Balanced transmission X Not present
(balanced transmission only) 255 Maximum length L (control direction)
X Unbalanced transmission X One octet 255 Maximum length L
(monitor direction)X 300 bit/s X Two octetsX 600 bit/s StructuredX 1200 bit/s Unstructured
Appendix A – IEC 60870-5 Slave Interoperability
Transmission speed (control direction)
Link layer
Appendix A – IEC 60870-5 Slave Interoperability
Type identification Cause of transmission
All <2>
All <20>
5,6,7,8,9,10,13,14.15,16,32,33,34,36,37 <3>
Common address of ASDU
Informationobject address
Cause of transmission
X One octet X One octet X One octetX Two octets X Two octets X Two octets (with originator address)
Originator address is set to zero if not used
X Three octetsStructuredUnstructured
X The standard assignment of ASDUs to class 2 messages is used as follows:
Application layer
Appendix A – IEC 60870-5 Slave Interoperability
No. Description Command ▼1 Single-point information M_SP_NA_1 X2 Single-point information with time tag M_SP_TA_1 X3 Double-point information M_DP_NA_1 X4 Double-point information with time tag M_DP_TA_1 X5 Step position information M_ST_NA_1 X6 Step position information with time tag M_ST_TA_1 X7 Bitstring of 32 bit M_BO_NA_1 X8 Bitstring of 32 bit with time tag M_BO_TA_1 X9 Measured value, normalized value M_ME_NA_1 X
10 Measured value, normalized value with time tag M_ME_TA_1 X11 Measured value, scaled value M_ME_NB_1 X12 Measured value, scaled value with time tag M_ME_TB_1 X13 Measured value, short floating point value M_ME_NC_1 X14 Measured value, short floating point value with time tag M_ME_TC_1 X15 Integrated totals M_IT_NA_1 X16 Integrated totals with time tag M_IT_TA_1 X17 Event of protection equipment with time tag M_EP_TA_1 X18 Packed start events of protection equipment with time tag M_EP_TB_119 Packed output circuit information of protection equipment with time tag M_EP_TC_120 Packed single-point information with status change detection M_PS_NA_121 Measured value, normalized value without quality descriptor M_ME_ND_130 Single-point information with time tag CP56Time2a M_SP_TB_1 X31 Double-point information with time tag CP56Time2a M_DP_TB_1 X32 Step position information with time tag CP56Time2a M_ST_TB_1 X33 Bitstring of 32 bit with time tag CP56Time2a M_BO_TB_1 X34 Measured value, normalized value with time tag CP56Time2a M_ME_TD_1 X35 Measured value, scaled value with time tag CP56Time2a M_ME_TE_1 X36 Measured value, short floating point value with time tag CP56Time2a M_ME_TF_1 X37 Integrated totals with time tag CP56Time2a M_IT_TB_1 X38 Event of protection equipment with time tag CP56Time2a M_EP_TD_139 Packed start events of protection equipment with time tag CP56Time2a M_EP_TE_140 Packed output circuit information of protection equipment with time tag CP56Time2a M_EP_TF_1
PROCESS INFORMATION IN MONITOR DIRECTION
Appendix A – IEC 60870-5 Slave Interoperability
No. Description Command ▼45 Single command C_SC_NA_1 X46 Double command C_DC_NA_1 X47 Regulating step command C_RC_NA_1 X48 Set point command, normalized value C_SE_NA_1 X49 Set point command, scaled value C_SE_NB_150 Set point command, short floating point value C_SE_NC_1 X51 Bitstring of 32 bit C_BO_NA_1 X
No. Description Command ▼100 Interrogation command C_IC_NA_1 X101 Counter interrogation command C_DC_NA_1102 Read command C_RD_NA_1103 Clock synchronization command C_CS_NA_1 X104 Test command C_TS_NA_1105 Reset process command C_RP_NA_1106 Delay acquisition command C_CD_NA_1
No. Description Command ▼110 Parameter of measured value, normalized value P_ME_NA_1111 Parameter of measured value, scaled value P_ME_NB_1112 Parameter of measured value, short floating point value P_ME_NC_1113 Parameter activation P_AC_NA_1
No. Description Command ▼120 File ready F_FR_NA_1121 Section ready F_SR_NA_1122 Call directory, select file, call file, call section F_SC_NA_1123 Last section, last segment F_LS_NA_1124 Ack file, ack section F_AF_NA_1125 Segment F_SG_NA_1126 Directory {blank or X, only available in monitor (standard) direction} F_DR_TA_1
PROCESS INFORMATION IN CONTROL DIRECTION
SYSTEM INFORMATION IN CONTROL DIRECTION
PARAMETER IN CONTROL DIRECTION
FILE TRANSFER
Appendix A – IEC 60870-5 Slave Interoperability
Description ▼Station initializationCyclic data transmission XRead procedureSpontaneous transmission XStation interrogation (Global) XDirect command transmission XDirect set point command transmission XBackground scan X
BASIC APPLICATION FUNCTIONS
ParameterDescription
PropertyID
ParameterValues
DefaultParameter
VBScriptCode
The slave implements Modbus protocol 0 0 Y MBServer.SetProtocolProp 0, 0
Address Type Decimal Range Hex Range Data Type Client AccessOutput Coils 000001 - 065536 H000001 - H0FFFF Boolean Read/WriteInput Coils 100001 - 165536 H100001 - H1FFFF Boolean Read OnlyInternal Registers 300001 - 365536 H300001 - H310000 Word Read OnlyHolding Registers 400001 - 465536 H400001 - H410000 Word Read/Write
AddressType
DataType
RegistersNum
Script Interface Notes
Output Coils Boolean 1 5 Single bit
Input Coils Boolean 1 11 Single bit
Internal Registers Byte 1 17
Internal Registers Char 1 16
Internal Registers Word 1 18 Unsigned 16 bit value bit 0 is the low bit and bit 15 is the high bit (default)
Internal Registers Short 1 2 Signed 16 bit value bit 0 is the low bit bit 14 is the high bit and bit 15 is the sign bit
Internal Registers DWord 2 19 Unsigned 32 bit value bit 0 is the low bit and bit 31 is the high bit
Internal Registers Integer 2 3
Internal Registers Long 2 3 Signed 32 bit value bit 0 is the low bit and bit 30 is the high bit and bit 31 is the sign bit
Internal Registers Float 2 4 32 bit floating point value
Internal Registers Double 4 5
Internal Registers String 1 8 Two characters per register
Internal Registers Date 4 7
Appendix B – Modbus Slave
Set Protocol Properties
Modbus Registers
Modbus Registers Data Type
Appendix B – Modbus Slave Registers
First bit of Modbus register 4001C equals to 262172 * 16 + 15 and the last bit of Modbus register 4001C equals to 262172 * 16 + 1
Bit Modbus Register (Hex)
Modbus Register (Dec)
Modbus Address (Bit)
0 4001C 262172 41947671 4001C 262172 41947662 4001C 262172 41947653 4001C 262172 41947644 4001C 262172 41947635 4001C 262172 41947626 4001C 262172 41947617 4001C 262172 41947608 4001C 262172 41947599 4001C 262172 4194758
10 4001C 262172 419475711 4001C 262172 419475612 4001C 262172 419475513 4001C 262172 419475414 4001C 262172 419475315 4001C 262172 4194752
AddressType
DataType
RegistersNum
Script Interface Notes
Holding Registers Byte 1 17Holding Registers Char 1 16
Holding Registers Word 1 18 Unsigned 16 bit value bit 0 is the low bit and bit 15 is the high bit (default)
Holding Registers Short 1 2 Signed 16 bit value bit 0 is the low bit bit 14 is the high bit and bit 15 is the sign bit
Holding Registers DWord 2 19 Unsigned 32 bit value bit 0 is the low bit and bit 31 is the high bit
Holding Registers Integer 2 3
Holding Registers Long 2 3 Signed 32 bit value bit 0 is the low bit and bit 30 is the high bit and bit 31 is the sign bit
Holding Registers Float 2 4 32 bit floating point valueHolding Registers Double 4 5Holding Registers String 1 8 characters per registerHolding Registers Date 4 7
Modbus Register Types
Modbus Internal Registers & Holding Registers Bit Access
Protocol Server package includes ProtCfg.dll (Protocol_Config.n_Interface). The library includes interface to ReLab Software Logic Controller’s configuration file. The API can be used from RLSLC script and provides the following functions:
Function Description Script
CreateObject Creates Protocol_Config.m_Interface Object
Dim Protocol_ConfigSet Protocol_Config =CreateObject("Protocol_Config.n_Interface")
Destroys Protocol_Config.m_Interface Object Set Protocol_Config = Nothing
PAddress Configures IEC 60870-5 protocol address space (based on configuration file)
Dim PAddress()Protocol_Config.PAddress PAddress
PClientAccess Configures IEC 60870-5 protocol client access (based on configuration file)
Dim PClientAccess()Protocol_Config.PClientAccess PClientAccess
PDataType Configures IEC 60870-5 data types (based on configuration file)
Dim PDataType ()Protocol_Config.PDataType PDataType
GetRevProtocolAddr Returns IEC 60870-5 reversed address (based on configuration file)
Protocol_Config.GetRevProtocolAddr(Index)
Appendix B – Modbus Slave ProtCfg Configuration Interface Proxy
Method Description Script
Define Defines protocol address and data type
Address – IEC 60870 Protocol address Type – IEC 60870 Item data type
MBServer.Define Address As Long, Type As Long
DefineWithClass
Defines protocol address and data type for double points only
Address – IEC 60870 Protocol address Type – IEC 60870 Item data type Class – Class Type
MBServer.DefineWithClass Address As Long, Type as Long, Class As Long
ReadReads a single configured register
Address – IEC 60870 Protocol address Val – value
MBServer.Read Address As Long, Val As Variant
ReadM
Not Applicable for Scripting LanguagesReads array of configured registers
Count – number of registers Address – IEC 60870 Protocol address Val – array of values
MBServer.ReadM Count As Long, Address() As Long, Val() As Variant
SetNodes
Not Used for IEC 60870 Protocol (Used to setup RS-485 nodes)
MinNode – minimum node number MaxNode – maximum node number
MBServer.SetNodes MinNode As Long, MaxNode as Long
SetSerial
Serial port configuration parameters Port - 1 to 255 BaudRate - 300 to 256000 DataBits - 5, 6, 7, 8 StopBits - 0 = 1; 1 = 1.5; 2 = 2 Parity - 0 = No; 1 = Odd; 2 = Even; 3 = Mark; 4 =
Space
MBServer.SetSerial Port As Long, BaudRate As Long, DataBits As Long, StopBits As Long, Parity As Long
SetTCPSets TCP Port
Port - 1 to 65635 (Default Port: 2404)MBServer.SetTCP Port As Long
SReadM
Applicable for Scripting LanguagesReads array of configured registers
Count – number of registers Address – IEC 60870 Protocol address Val – array of values
MBServer. SReadM Count As Long, Address() As Long, Val() As Variant
Appendix C – Protocol Server (RLMOD)
Appendix C – Protocol Server (RLMOD)
Method Description Script
SReadMTS
Applicable for Scripting LanguagesReads array of configured registers
Count – number of registers Address – IEC 60870 Protocol address Val – array of values TM – array of timestamp
SReadMTS. SReadM Count As Long, Address() As Long, Val() As Variant, TM As Double
Start Starts Protocol Server MBServer.Start (1)
Stop Stops Protocol Server MBServer.Stop
SWriteM
Applicable for Scripting LanguagesWrites array of configured registers
Count – number of registers Address – IEC 60870 Protocol address Val – array of values
MBServer. SWriteM Count As Long, Address() As Long, Val() As Variant
SWriteMTS
Applicable for Scripting LanguagesWrites array of configured registers with timestamps
Count – number of registers Address – IEC 60870 Protocol address Val – array of values TM – array of timestamp
MBServer. SWriteM Count As Long, Address() As Long, Val() As Variant, TM As Double
WriteWrites a single configured register
Address – IEC 60870 Protocol address Val – value
MBServer.Write Address As Long, Val As Variant
WriteM
Not Applicable for Scripting LanguagesWrites array of configured registers
Count – number of registers Address – IEC 60870 Protocol address Val – array of values
MBServer.WriteM Count As Long, Address() As Long, Val() As Variant