cardReset

cardReset — performs a COLD or WARM reset of one or more cards.

Synopsis

(cardReset)
(cardReset card_id reset_type)
  

Parameters

card_id

The target card ID (0..3). If no card ID is specified, then a WARM reset is performed on all initialized cards. If this parameter is specified as * then the reset type specified by the subsequent parameter is performed on all initialized cards.

reset_type

If COLD, then a COLD reset is performed on the card(s), otherwise a WARM reset is performed.

Returns

OK if successful. Otherwise, one of the following error messages:

(error "cardReset DR_ERR_CARD_INVALID (time) invalid card: card_id")
(error "cardReset  -1  (time) WARNING: CIF card card_id not configured.")
(error "cardReset  -1  (time) WARNING: CIF card card_id not communicating.")
(error "cardReset  -1  (time) WARNING: CIF card card_id failed to reset
       (status = device_status).")

Description

This command performs a COLD or WARM reset of a card or cards. A reset will reload the various protocol parameters (fieldbus configuration, etc.) and re-initialize the protocol. This can take several seconds. A COLD reset will load the default parameters from the device FLASH memory, normally set up via the SYCON Configurator utility. A WARM reset causes parameters that can be modified at any time via the DR_ApWriteControl API function (documented in the Cogent C API manual) to take effect (see the definition of the cif_ApParms_t structure in the Control Block Functions part of the Hilscher Fieldbus CIF Card section of the Cogent C API manual). The cardTaskParms command is the recommended alternative for setting and querying these card parameters. A COLD reset is automatically performed as part of the cardInit process. The cardReset command is infrequently used, and is mainly for debug or maintenance.

Example

(cardReset 0 COLD)