pfbLoadCfg

pfbLoadCfg — configures the Profibus card.

Synopsis

(pfbLoadCfg card_id NET filename)
(pfbLoadCfg card_id DPMAS filename)
(pfbLoadCfg card_id DPSLV filename)
(pfbLoadCfg card_id COMET filename)
(pfbLoadCfg card_id FLASH)
(pfbLoadCfg card_id AUTO)
  

Parameters

card_id
The ID associated with the card initialized by this command. Up to 4 cards can be simultaneously accessed by the same driver, numbered 0 to 3. If not specified, then the next available ID (sequentially from 0) is assigned (see Description below).
filename
The filename, including path if needed, of the configuration file to load. Different configuration file types have corresponding extensions (see Description below) which will be automatically appended if not supplied.

Returns

OK if successful, otherwise one of the following:

(error "pfbLoadCfg DR_ERR_CARD_INVALID (time) invalid card: card_id")
(error "pfbLoadCfg DR_ERR_FILE_NO_ACCESS (time) File not found or access denied.")
(error "pfbLoadCfg PFB_ERR_UNDEFINED_OBJ (time) Unknown configuration target")
(error "pfbLoadCfg PFB_ERR_NO_CARD (time) Card not available")
(error "pfbLoadCfg PFB_ERR_CMD_TIMEOUT (time) Cmd failed (timeout)")
(error "pfbLoadCfg PFB_ERR_CARD_NOT_OFFLINE (time) Card is not OFFLINE")

Description

This command configures different aspects of the SST-PFB, depending on the third argument, as follows:

  • NET: configures the Profibus network parameters from a text file (*.ncf).
  • DPMAS: configures the DP master operation from a text file (*.mcf).
  • DPSLV: configures the DP slave operation from a text file (*.scf).
  • COMET: configures the DP master operation using a binary file (*.2bf) exported from a Siemens COM ET 200 software.
  • FLASH: configures card from configuration saved in the flash memory. This is equivalent to issuing pfbCmd with the CMD_CFG_FROM_FLASH command.
  • AUTO: automatically scans the currently attached network of slave devices and configures the DP master accordingly. This is equivalent to issuing pfbCmd with the CMD_AUTO_DP_CFG. The card must have a valid network configuration before this command can be issued, specifically the baud rate, station address, and active station setting (see the pfbNetParms command). Once the command completes, the card will be in the offline state and contains the configuration of any DP slave devices found on the network.
[Note]

Since the Profibus protocol does not explicitly support auto-configuration services, the SST SST-PFB card has implemented a mechanism to obtain this information by scanning the network. It is possible that some slave devices do not provide enough information to the SST-PFB to allow for a successful configuration.

Example

The following example defines a valid network configuration, then automatically scans the network for the slave device configuration, and goes online.

(pfbNetParms 0 0 Active 1.5m)
(pfbLoadCfg 0 AUTO)
(pfbCmd 0 CMD_GO_ON)