cardStatus

cardStatus — provides a summary of the card status.

Synopsis

(cardStatus [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

The current status of the card, formatted as:

(cardStatus card_id (CAN_status_code CAN_status_string)
              (server_status_code server_status_string)
              (client_status_code client_status_string))

where

CAN_status_code and CAN_status_string
Can be one or more of the following:
CAN_status_codeCAN_status_stringMeaning
0x0001CAN_ONLINECAN interface ready to communicate
0x0002CAN_BUSWARNCAN bus warning
0x0004CAN_BUSOFFCAN offline due to excessive errors
0x0008CAN_ACTIVITYCAN activity detected
0x0010CAN_TACKERRCAN transmission not acknowledged
0x0020CAN_TIMEOUTCAN transmission incomplete
0x0040CAN_OVERRUNCAN receive buffer overrun
0x0080CAN_LOSTCAN message lost
0x0100CAN_ERRORCAN bus error
0x0200CAN_BUSPOWERCAN bus power present
0x1000CAN_ONLINE125CAN Online at 125 Kbaud
0x2000CAN_ONLINE250CAN Online at 250 Kbaud
0x4000CAN_ONLINE500CAN Online at 500 Kbaud
0x8000CAN_SCANACTIVECAN Scanner active
server_status_code and server_status_string
Can be one or more of the following:
server_status_codeserver_status_stringMeaning
0x00SS_IDLEconnection set not allocated
0x01SS_ACTIVEconnection set allocated
client_status_code and client_status_string
Can be one or more of the following:
client_status_codeclient_status_stringMeaning
0x00CS_IDLEscanner idle
0x01CS_ACTIVEscanner active

Otherwise, the following error message:

(error "cardStatus DR_ERR_CARD_INVALID (time) invalid card: card_id")

Description

This command provides information on the current status of the card with respect to three key functional areas:

  • The CAN bus.
  • The card acting as a DeviceNet server (i.e. field device or slave).
  • The card acting as a DeviceNet client (i.e. scanner or master).

Example

(cardStatus 1)

returns

(cardStatus 1 (0x4201 "CAN_ONLINE|CAN_BUSPOWER|CAN_ONLINE500")
(0 "SS_IDLE") (1 "CS_ACTIVE"))