Promotic

GetProtParam - method of the PmaComm object

Description:
Returns some values defined in configurators of the "PmaComm > Parameters" tab.
Syntax:
Variant GetProtParam(String sParam)
Parameters:
sParam(String) The parametr name.
"EthIPAddr" - Ethernet IP address. The value je of the String type.
The value can be set by the OpenPort method or in the "PmaComm > Setting the parameters of the Ethernet-client > Network address" configurator.
This value cannot be set by the SetProtParam method.
"EthPort" - TCP/UDP remote port number. The value je of the Integer type.
The value can be set by the OpenPort method or in the "PmaComm > Setting the parameters of the Ethernet-client > TCP/UDP remote port number" configurator.
This value cannot be set by the SetProtParam method.
"SerPort" - Serial port. The value je of the String type.
The value can be set by the OpenPort method or in the "PmaComm > Setting the parameters of the serial link > Serial port" configurator.
This value cannot be set by the SetProtParam method.
"ProtType" - The value je of the String type.
This parameter can be used for the driver PmSNMP: Specifies the version of SNMP and additional parameters. See Changing SNMP protocol parameters.
Return value:
The value of the sParam parameter.
See also:
Example1:
Detects Ethernet communication parameters:
JavaScriptVBScriptSelect and copy to clipboard

var sVal1 = oComm.GetProtParam("EthIPAddr");
var sVal2 = oComm.GetProtParam("EthPort");
In the sVal1 variable there will be string, e.g. "192.168.1.2"
In the sVal2 variable there will be number, e.g. 161
Example2:
Detects values of the protocol parameters of the PmSNMP communication driver:
JavaScriptVBScriptSelect and copy to clipboard

var sVal = oComm.GetProtParam("ProtType");
In the sVal variable there will be string, e.g. "snmpVer:1;commRO:public;commRW:private;"

History:
Pm8.03.19: Generalization: can now detect ethernet address ("EthIPAddr"), ethernet port ("EthPort") and serial port ("SerPort").
Pm8.03.15: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.