Promotic
WikipediaLinkedInYoutubeTwitterFacebook

GetProtParam - method of object PmaComm

Description:
Returns some values defined in configurators of the "PmaComm > Parameters" page.
Syntax:
Variant GetProtParam(String sParam)
Calling:
val = oComm.GetProtParam(sParam)
Parameters:
sParam(String) Name of the parameter.
"EthIPAddr" - Ethernet IP address. The value is 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 port number. The value is 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 port number" configurator.

This value cannot be set by the SetProtParam method.

"SerPort" - Serial port. The value is 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 is 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 Values:
The value of the sParam parameter.
Example1:
Detects Ethernet communication parameters:
JavaScriptVBScriptSelect and copy to clipboard

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

var sVal = oComm.GetProtParam("ProtType");
In variable sVal 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.7 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice