DNPUpdate (Update DNP)

The DNPUpdate instruction sets up the datalogger as a DNPSlave device  and determines when it will update its arrays of DNP elements.

Syntax

DNPUpdate ( DNPSlaveAddr, DNPMasterAddr, TimeOut [optional], Retries [optional], ConnectHandle [optional] )

Remarks

This instruction must execute in order for the DNP outstation to update its arrays. It is typically placed in a program after the elements in the array are updated. If this instruction is not included in a program, the DNP array will never be updated with new values. The datalogger can support communication for up to three masters. If communications are required for multiple masters, a DNPUpdate instruction must be included in the datalogger program for each one.

When a DNP master comes in with a request, the amount of time to process the scan running DNPUpdate can increase. If DNPUpdate is in the main scan, increasing the number of scan buffers can help to avoid skipped scans.

Parameters

DNPSlaveAddr (DNP Outstation Address)

Assigns an address to the DNP outstation. The valid address range is 1 - 65520.

Type: Constant or Variable

DNPMasterAddr (DNP Master/Client Address)

Assigns the address of the DNP master / client to which the datalogger will respond. Valid address range is 1 - 65520. The datalogger will respond to any DNP master regardless of its address. Up to 3 masters are supported.

Type: Constant or Variable

Optional Parameters

Unsolicited response transmission can be enabled in the datalogger. This allows the datalogger to transmit changes or events without having received a specific request for the data. This mode is useful if the master station requires notification as soon as possible after a change occurs, rather than waiting for the master station to poll the outstation.

If the unsolicited response parameters are not present or if the unsolicited response confirmation timeout is 0, then unsolicited responses are disabled.

Timeout (Response Wait Time)

The time, in seconds, that the datalogger will wait for confirmation that an unsolicited response was received, before attempting the transmission again. If this value is set to 0, unsolicited responses are disabled.

Type: Constant

Retries

The number of times the datalogger will attempt a transmission if the initial attempt fails. If this parameter is 0, then unsolicited responses (with data) will retry forever or until confirmed by the master.

Type: Constant

ConnectHandle (Connect Handle)

A variable that is controlled by the TCPOpen instruction that connects the master station as if the datalogger received an incoming request. This is useful in the case that the outstation needs to make a TCP connection instead of the master station.

Type: Variable