User manual

IEC61131 User and Reference Manual
April 22, 2008
350
setprot
Set protocol settings
Description
The setprot function sets the protocol settings for a specific serial port.
Use this function only when protocol settings need to be changed within a program. It is
more convenient to use the Controller Serial Ports Settings dialog to download protocol
settings with the program.
set
comX
prtclType
stn
addrMode
SandFEnabled
setprot
Q
Arguments
Inputs
Type
Description
set
Boolean
Sets the protocol settings for the serial port when TRUE.
Set this input to FALSE once the protocol settings have
been set.
comX
Integer
Communication port to set port protocol settings. Valid
values are 1 to 4.
prtclType
Integer
Protocol type
0 = none
1 = Modbus RTU
2 = Modbus ASCII
3 = DF1 Full Duplex BCC
4 = DF1 Full Duplex CRC
5 = DF1 Half Duplex BCC
6 = DF1 Half Duplex CRC
7 = DNP
Default = 1
stn
Integer
Protocol station number
1 to 255 in standard Modbus
1 to 65534 in extended Modbus
0 to 254 in DF1
Default = 1
addrMode
Integer
Protocol addressing mode
0 = standard
1 = extended
Default = 0