Specifications
Section 13. PakBus Communication Instructions
13-14
SetSettings (ResultCode, ComPort, NeighborAddr, PakBusAddr, Security,
TimeOut, Settings)
The SetSettings instruction is used to set one or more settings in a remote
datalogger.
Syntax
SetSettings ( ResultCode, ComPort, NeighborAddr, PakBusAddr, Security,
TimeOut, Settings )
Remarks
This instruction can be used to set one or more existing PakBus settings or
user-created settings in the datalogger. If security is enabled in the remote
datalogger, it must be unlocked to level 1 for this instruction to be successful.
Parameter
& Data Type
Enter
ResultCode
Variable
The variable in which a response code for the transmission will be stored. A
negative value indicates that communication was achieved but the command
failed. See table 13.1-2 for a list of failure codes. A positive value indicates
the number of communications failures. A zero indicates successful
communication.
ComPort
Constant
The communications port that will be used to communicate with the
destination device. Enter a numeric or alphanumeric code listed in table
12.1-1.
NeighborAddr
Constant
A static route to the destination datalogger. If 0 is entered, the destination
device is assumed to be a neighbor
PakBusAddr
Integer(1-4094)
The Pakbus address of the destination datalogger with which the host
datalogger is trying to communicate. Valid entries are 1 through 4094. Each
PakBus device in the network must have a unique address.
Security
Integer
The security code of the datalogger to which variables will be sent. 0 is
entered for this parameter if no security is set in the destination datalogger.
TimeOut
Constant or
Variable
The amount of time, in 0.01 seconds, that the datalogger should wait for a
response from the destination device before considering the instruction to
have failed. If 0 is entered for this parameter, then the datalogger will use a
time based on its known route to the destination device.
Settings
String
The name of the setting to change, and the value to which it should be set.
More than one setting can be defined in this parameter. Each setting is
separated with a semicolon, and the entire string is enclosed in quotes. The
syntax for this parameter is:
"SettingName1=Value;SettingName2=Value;SettingName3=Value…"
By default, LoggerNet uses PakBus address 4094 and PC400
uses 4093.
SetSettings Example
In the following program, when Flag(1) is set high in the datalogger, the
PortStatus setting of a PakBus datalogger with ID 10 will be set True (or high).
NOTE