(read point_name [update])
If there are no errors, the value of the named point is returned, formatted as:
(read point_name type value)
where value is the ASCII representation of the point value (if possible) and dependent on type. The following types are defined:
|type||type of value|
|5||digital (0 or 1)|
If the point has no value (no data has ever been written to it), then the response is:
(read point_name 0 "out of range")
If an error occurs due to invalid point name, point disabled, point not readable, or data type has no ASCII representation, then a corresponding error is returned, formatted as follows:
(error "read DR_ERR_PNT_NOT_FOUND (time) point not found: point_name") (error "read DR_ERR_PNT_NOT_ENABLED (time) point not enabled: point_name") (error "read DR_ERR_PNT_NOT_READABLE (time) point not readable: point_name") (error "read DR_ERR_PNT_TYPE_NO_REP (time) point type has no representation: point_name type")
If the optional update parameter is set to t, and an error is detected, the following is returned:
(error "read DR_ERR_CARD_IO_FAILURE (time) I/O failure (-22) on device: point_addr_card_id")
This error usually signifies that the fieldbus is not active. This may be due to a connection or configuration problem.
This command reads the current value of the named point. The transfer of data from the card buffers (which received field input device data via the fieldbus) to the driver buffers is dependent on the mode of the card, which can be either polled or interrupt driven (see cardPoll and cardInit commands). Then the transfer of data from the buffers to the points is dependent on the cardGroup command and the association of points with groups.
If the optional update parameter is set to t, and the card mode is polled, then:
This command is typically sent as a command and not used in configuration file.
Copyright © 1995-2006 by Cogent Real-Time Systems, Inc. All rights reserved.