(write point_name value [update])
The name of an existing point.
The ASCII representation of the value to be written, dependent on point type.
(optional) If t, an attempt is made to update the output card after changing the point value. Otherwise, the the data is simply written to the point, and will be updated at the next card I/O cycle. See the Description (below) for details.
OK if there are no errors. If an error occurs, due to invalid point name, point disabled, or point not writeable, then an error is returned formatted as follows:
(error "write DR_ERR_PNT_NOT_FOUND (time) point not found: point_name") (error "write DR_ERR_PNT_NOT_ENABLED (time) point not enabled: point_name") (error "write DR_ERR_PNT_NOT_WRITEABLE (time) point not writeable: point_name")
If the optional update parameter is set to t, and an error is detected, the following is returned:
(error "write 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 writes a new value to the specified point. Output of point values to the field output cards depends on the specific card type. This command is typically sent as a command and not used in configuration file.
The transfer of data from the points to the driver buffers is dependent on the cardGroup command and the association of points with groups. Then the transfer of data from these buffers to the card buffers (which is then sent to the field output device via the fieldbus) is dependent on the mode of the card, which can be either polled or interrupt driven (see the cardPoll and cardInit commands).
If the optional update parameter is t, and the card mode is polled, then:
The new point value is written to the driver buffer.
The card buffers are updated from these buffers (those specified by the point address).
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.