pfbSlaveStatus
pfbSlaveStatus — queries the overall status of a card acting as a DP
Slave.
Synopsis
(pfbSlaveStatus card_id)
Parameters
- card_id
- The target card ID
(0..3).
Returns
If succesful:
(pfbSlaveStatus card_id mode status ssb1 ssb2 ssb3 [error] [error_str])
where:
- mode
- RUN if the slave is being
scanned by a DP Master in RUN mode, otherwise
STOP.
- status
- OK if current slave status is OK
(parameterization was successful and watchdog not timed
out), otherwise ERROR.
- ssb1,
ssb2,
ssb3
- The 3 station status bytes. Please refer to the
Profibus specifications for detailed information on what
these bytes contain.
- error
- If
status was
ERROR, then the error code of the last
error that occurred.
- error_str
- The descriptive string associated with error.
Otherwise, one of the following error messages:
(error "pfbSlaveStatus DR_ERR_CARD_INVALID (time) invalid card: card_id")
(error "pfbSlaveStatus PFB_ERR_NO_CARD (time) Card not available")
(error "pfbSlaveStatus PFB_ERR_SLAVE_NOT_CFG (time) Not configured as DP Slave")
Description
This command provides the status
of the card acting as a DP Slave.
Example
The command:
(pfbSlaveStatus 0)
returns something like this:
(pfbSlaveStatus 0 RUN OK 0x00 0x00 0x00)
or:
(pfbSlaveStatus 0 RUN ERROR 0x00 0x00 0x00 0x04 "length of data from master to us incorrect")