Description: This function reads data from an outstation, and returns an indication of success or failure
Format: DNP\Read(Trig, DType, DevAddr, Object, Variation, PointAddr, ArrData, ArrStart, ArrLength)
Parameters: Trig Trigger to read data from device.
DType Data type < 100 – Parameter, >= 100 – Array.
DevAddr Device address to read data from.
Object DNP Object. See section on supported DNP objects.
Variation DNP Variation. See section on supported DNP objects.
PointAddr Point address in device to read from.
ArrData Array to place data into (Type>=100 only).
ArrStart Starting index in ArrData (Type>=100 only).
ArrLength Number of values to Read (Type>=100 only).
Comments:
This function will attempt to read the specified objects from the specified device. The return value is an error code having one of the following meanings:
|
Value |
Meaning |
|
0 |
No Error |
|
257 |
Serial Port Parameter(s) Out Of Range |
|
258 |
Serial Port Not Active |
|
259 |
Serial Port Failed to Connect |
|
260 |
Serial Port Disconnected |
|
261 |
Serial Port Already In Use |
|
287 |
Serial Port General Failure |
|
343 |
Serial Port Invalid Parameter |
|
512 |
Data Link - Invalid Command |
|
513 |
Data Link - Timed Out Waiting For Echo |
|
514 |
Data Link - No Reply |
|
515 |
Data Link - No Acknowledge |
|
516 |
Data Link Reset - No Acknowledge |
|
768 |
Station address out of range |
|
769 |
Object type or variation out of range |
|
771 |
Point address out of range |
|
772 |
Data type out of range |
|
773 |
Invalid parameters |
|
774 |
RTU - Function code not implemented |
|
775 |
RTU - Requested objects unknown |
|
776 |
RTU - Request parameters out of range |
|
777 |
RTU - Event buffers overflow |
|
778 |
RTU - Requested operation pending |
|
779 |
RTU - Configuration corrupt |
This function may not appear in a script.
Comments
The object value of a DNP Read statement can be used to provide information about how that read is running by accessing public variables. These public variables are:
|
Variable |
Meaning |
|
Counts |
the number of successful communications since starting. |
|
TimeStamp |
the time of the last successful communication, in seconds since midnight. |
|
DateStamp |
the date of the last successful communication, in days since January 1 1970. |
|
Error |
the error code number of the current communication attempt |
|
ErrorCounts |
the number of errors encountered since starting. |
|
ErrorDate |
the date of the last error encountered in any communication attempt, in days since January 1 1970. |
|
ErrorTime |
the time of the last error encountered in any communication attempt, in seconds since midnight. |
|
ErrorStation |
is the address of the station which encountered the most recent error. |
|
ErrorPointAddr |
is the point address of the point causing the last error |
|
ErrorOwner |
is an object variable which holds the object value of the read or write statement which encountered the most recent error. |
|
LastError |
the error code number of the last error encountered by any communication attempt. |
|
dT |
the time difference between the last two good messages. |
|
InIIN |
the value of the Internal Indications field in the last message received. |