Cascade Driver for Hilscher Fieldbus CIF Cards: Version 4.1
Prev |  | Next

# cardGroup

cardGroup -- sets or queries assignments of groups to cards.

## Synopsis

    (cardGroup)
    (cardGroup card_id)
    (cardGroup card_id  groupPointNames ...)

## Parameters

`card_id`

  The target card ID (`0..3`). If no card ID is specified, the query form of the command is repeated for all initialized cards. If only the card ID is specified (no additional parameters) then that card is queried for its associated groups, and no changes are made.

`groupPointNames`

  A list of group point names (groups must already have been created with the group command) that will be processed when the card is updated. A group cannot also be independently cycled, so that if the group had a non-zero cycle time, then it would cease to cycle independently. A group can only be associated with a single card, so that if it has already been specified in a cardGroup command, it will be removed from that association before being added to the specified card.

## Returns

In response to a query or successful setting of card groups:

        (cardGroup card_id groupPointName...)

Otherwise, one of the following error messages:

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

        (error "cardGroup  -1 (time) Group point groupPointName has not been defined.")

## Description

This command sets or queries the assignment of groups to cards. A group (see the group command) must be assigned to a card for the points in a group to be processed whenever a card updates its buffers, whether via polled (see the cardPoll command) or interrupt driven modes.

The mapping between the value of points and the data in a buffer is maintained by the address of the individual points. When a buffer is updated, it is necessary to scan through the list of input points associated with the buffer to determine whether a particular bit or a set of bytes in the buffer has changed, therefore changing the value of the point. The same is true for output points, where the points that have been updated must modify the buffer, which is then written to the card and out to the fieldbus. This process can be triggered by the cyclic update (polled or interrupt driven) of the buffers, or the points can maintain their own cyclic update rate.

This cardGroup command establishes the link between a group and a card update cycle. This is the most efficient way to update point values and is preferred to the alternative of specifying an individual cycle time for the group. A group might be set up to cycle independently of the card in cases where a slower update rate was required, such as might be done for a set of process control analog values sampled at 100ms, while the card and fieldbus cycled in under 10ms.

## Example

        (cardGroup 0 readGroup1 readGroup2 writeGroup)

Prev | Home | Next
cardEnable | Up | cardInit

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