<< Click to Display Table of Contents >> Navigation: Modbus Universal MasterOPC Server > MasterOPC Universal Modbus Server > The Design-Time Mode > Parameters of Tree Objects > The Dialog of Node Parameters |
The 'Reserved Channels' Section
In the General Settings section, the following parameters are set (see also Operations in Dialogs of Parameters ):
Comment – a comment to the node
Available – if TRUE, the node and its components are executed in real time; if FALSE, are not executed
Node type – interface/protocol of interaction between the server and a device:
The Node type parameter is available only in the node creation dialog.
COM – serial interface, Modbus RTU. A node of this type opens a serial port, executes a user script, and launches devices with preset parameters.
A COM-type node can contain devices of the types MODBUS and PROGRAM.
TCP/IP – TCP/IP network, Modbus TCP/IP. A node of this type opens a network connection, executes a user script, and launches devices with preset parameters.
A TCP/IP-type node can contain devices of the types MODBUS and PROGRAM.
PROGRAM – program type (developed by a user). A node of this type only executes a user script, and launches devices with preset parameters.
A PROGRAM-type node can contain only devices of the type PROGRAM.
In the Script section, the following parameters are set:
Script execution – enable/disable script execution
Edit script code – a value cell of that parameter contains the button
to open the script editor
In addition to the sections General Settings and Script, the dialog contains the sections COM Settings, Modem Settings and Additional Settings.
In the COM Settings section, parameters of a COM port are set:
Port – number of a COM port; the default value is 1 (COM1)
Rate – an exchange rate (1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600 or 115200 bauds); the default value is 9600
Data – number of information bits (5, 6, 7 or 8); the default value is 8
Parity check – parity check (No, Odd, Even, Mark, Space); the default value is No
Stop bits – number of stop bits (1, 1.5, 2); the default value is 1
Inter-character timeout (ms) – a maximal admissible interval between sends of bytes. Exceeding of that value is diagnosed as an error. The default value is 0 (0 corresponds to 50 ms).
Use ASCII – a type of the Modbus protocol: False - Modbus RTU, True - Modbus ASCII
Use modem – a value of this parameter must be TRUE if a modem (or GSM modem) is connected to the COM port. Otherwise, a value of this parameter must be FALSE.
In the Modem Settings section, parameters of a modem (GSM modem) connected to the COM port are set:
Phone – phone number (in the international format)
Initialization string – a modem initialization string (according to the modem documentation – for example, ATE0Q0V1X4&C0&D2&S1S0=0S7=60+CBST=71,0,1)
Connection timeout (s) – maximal time to wait for connection with a device; the default value is 60
Disconnection timeout (s) – if there is no exchange during the time defined by this parameter, the connection is terminated. The default value is 1000.
In the last versions, this parameter is replaced by the following parameters:
Connection hold – if TRUE, the Connection hold timeout (s) parameter is available
Connection hold timeout (s) – if there is no exchange over the bus during the time defined by this parameter, GSM connection is terminated (the connection is held during the timeout).
Connection – interface (rs232 or rs485). If the mode RS-485 is on, modem control of data transmission changes from the hardware control (the signal DTR) to the special symbols (3 signs «+»). If such a mode is used, the AT&D0 command instead of AT&D2 must be typed in the initialization string.
In the Additional Settings section, the following parameters are set:
Forced disconnection in each cycle – if TRUE, the port is closed and opened after each poll cycle. Such a mode may be necessary for GSM/GPRS-based poll, because such channels could cause considerable delays in data reception. An OPC server could interpret such a delay as reply absence, and could form another request. After that, the server could receive a reply to the previous request, and this leads to that all of replies get mixed up (Modbus RTU has no a special field for request number to control it). If a port is closed, the buffer is cleaned, and a new connection is created, and this prevents from receiving a previous reply.
Slave connection – TRUE – connection in the SLAVE mode; FALSE connection in the MASTER mode
Use reserved channels – this parameter is available only in the unlimited version.
If Use reserved channels=TRUE, the 'Reserved Channels' section is available.
In addition to the sections General Settings and Script, the dialog contains the sections TCP/IP Settings and Additional settings.
In the TCP/IP Settings section, the following parameters are set:
IP address – IP address of the server; the default value is 127.0.0.1. (IP address can be set in a character format, e.g. "localhost" instead of 127.0.0.1)
IP port – IP port of the server; the default value is 502
Connection timeout (s) – maximal time to wait for connection with a device
Attempts to reconnect on error – number of repeated attempts to connect with the device after a connection error. If attempts are exhausted, a quality of tags becomes OPC_QUALITY_BAD .
Inter-character timeout (ms) – a maximal admissible interval between Ethernet frame.
In the Additional settings section, the following parameters are set:
Slave connection – TRUE – connection in the SLAVE mode; FALSE connection in the MASTER mode
Modbus over TCP – this parameter is destined to work with converters Ethernet-COM (e.g. Moxa NPort5150). In this mode, a standard Modbus RTU or ASCII query is packed into a TCP packet, and that packet is transferred to the converter. The converter retrieves a MODBUS query from the packet, and sends it to a device. A device reply is converted in reverse order.
Track transaction ID – TRUE – track transaction IDs; FALSE – do not track transaction IDs
Forced disconnection in each cycle – TRUE/FALSE
Connect as TCP server – in the TCP Server mode, the OPC server waits for incoming connections via the IP address and the port, and then starts an exchange.
Use reserved channels – this parameter is available only in the unlimited version.
If Use reserved channels=TRUE, the 'Reserved Channels' section is available.
There are no additional sections and parameters in the dialog (in the unlimited version, the dialog contains the Additional settings section).
In the Additional settings section, the following parameters are set:
Use reserved channels – this parameter is available only in the unlimited version.
If Use reserved channels=TRUE, the 'Reserved Channels' section is available.
The ’Reserved Channels’ Section
This section is available if Use reserved channels=TRUE (in the Additional settings section).
In the section, the following parameters are set:
Channel 1, Channel 2, Channel 3 – reserved channels.
If a node type is COM, the following parameters are used to configure a channel (these parameters are available if Channel <n>=TRUE):
Port – COM port
Auto switch – see below
If a node type is TCP/IP, the following parameters are used to configure a channel (these parameters are available if Channel <n>=TRUE):
IP address – IP address
IP port – IP port
Auto switch – see below
If a node type is PROGRAM, the following parameters are used to configure a channel (these parameters are available if Channel <n>=TRUE):
Auto switch – see below
In the regular mode, a device is interrogated via the main channel (in case of a TCP/IP node, an IP address specified in the TCP/IP Settings section is used). If a device fails (there is no a reply), and Auto switch=TRUE for some reserved channel, that channel is used for interrogation. If auto switch is off, MasterOPC Universal Modbus Server tries to connect to a next node, for which Auto switch=TRUE. In order to connect to a node, for which Auto switch=FALSE, a script can be used – the functions server.GetReservedChannel and server.SetReservedChannel are provided for operations with reserved channels.