cardTaskState

cardTaskState -- provides fieldbus device status for cards.

Synopsis

(cardTaskState [card_id])
  

Parameters

card_id

The target card ID (0..3). If no card ID is specified, the query is repeated for all initialized cards.

Returns

    (cardTaskState card_id global_bits master_state 
            (error_addr error_event bus_error_count bus_timeout_count)
            (SlaveCfg slave0_cfg...slave15_cfg) 
            (SlaveState slave0_state...slave15_state)  
            (SlaveDiag slave0_diag...slave15_diag) )

defined as follows:

global_bits

A collective display of global event indications. Errors can occur either at the card itself or on a fieldbus device.

master_state

The overall card firmware state, one of the following:

error_addr

If any of the global_bits: CTRL, ACLR, or NEXC are set, this variable specifies the source of the error. If the source is within the card itself, then a value of 255 is used. Otherwise, the MAC-ID of the faulty fieldbus device is returned.

error_event

Provides more detailed error codes. For more detail, see the appropriate protocol-specific CIF manual.

bus_error_count

Provides a count of the number of times the warning limit on bus communication errors has been reached.

bus_timeout_count

Provides a count of the number of times the bus frame error counter reaches its limit.

slaven_cfg

Reports the parameterization state of each field device, one bit per device, as 16 bytes (16 x 8 = 128 devices), starting with device 0 as bit 0 of the first byte. The status bit is interpreted as follows:

slaven_state

Reports the state of each field device, one bit per device, as 16 bytes (16 x 8 = 128 devices), starting with device 0 as bit 0 of the first byte. The status bit is interpreted as follows:

slave_diag

Reports the diagnostic bit for each field device, one bit per device, as 16 bytes (16 x 8 = 128 devices), starting with device 0 as bit 0 of the first byte. These values are only valid if the master state of the card is OPERATE. The status bit is interpreted as follows:

Otherwise, one of the following error messages:

    (error "cardReset DR_ERR_DEV_INVALID (time) invalid device: card_id")

Description

This command provides fieldbus device status for one or more cards. This information can be queried interactively to obtain detailed CIF card and fieldbus device status and diagnostic information.

Example

In the following example:

    (cardTaskState 1)

returns

    (cardTaskState 1 00 OFFLINE (0 0 0 0)
    (SlaveCfg 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
    (SlaveState 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
    (SlaveDiag 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00))

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.