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

# digital

digital -- creates a point of type digital.

## Synopsis

    (digital enable_flag name address read_write_mode cycle_millisecs exception_flag)

## Parameters

`enable_flag`

  The initial value of enabled status of the point. `t` will cause the point to be initially enabled. `f` will cause the point to be initially disabled. (see enable and disable commands).

`name`

  The name of the point.

`address`

  The address of the raw data. The address has the form:

          device : buffer : word_offset [. bit [.bit_width]]

  (see Points in the Data Model section of the Overview.)

`read_write_mode`

  `R`, `W`, or `RW` (case-insensitive) to specify the point as read-only, write-only, or read-write respectively.

`cycle_millisecs`

  The cycle (or heartbeat) time in milliseconds associated with the point upon which automatic reading or writing is performed. Typically, points are read or written in groups, and the individual cycle time for each point is set to 0.

`exception_flag`

  If set, then the point is registered for exceptions with the Cascade DataHub (if active).

## Returns

`OK` or `(error)`

## Description

This command creates a point of type digital. Digital points are used to provide the system with binary (1-bit) data, or integer values (multi-bit fields). This command is normally executed from the configuration file.

## Example

In the following example, two digital input points are established, both initially enabled, not automatically read (cycle time of 0), and automatically registered with the Cascade DataHub. `Pushbutton` is a single input bit: the fifth bit of the 16-bit word at word offset `12` of the input buffer. `Digit` is a 4-bit output field, the second nibble of the 16-bit word at word offset `12` of the output buffer.

        (digital t Pushbutton 0:12.5  r  0  t)
        (digital t Digit 0:12.5.4  rw  0  t)

Prev | Home | Next
devSet | Up | disable

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