Chapter 5. Drivers

Table of Contents

5.1. Sending Input to a Cascade Compatible Driver
5.2. CIF Driver addressing for DeviceNet card
5.3. CIF Driver in Linux not communicating with card
5.4. SA85 Driver doesn't start up
5.5. Linux interrupt mode
5.6. Compiling the test file

5.1. Sending Input to a Cascade Compatible Driver

Problem:

No obvious way to send input to a Cascade Compatible driver (such as the CIF Driver).

Cause:

When a Cascade Compatible driver runs, it should not return to the prompt, nor offer any form of interactive input. It is designed to run essentially as a daemon, taking requests from user-written client programs and interfacing continuously with the card.

Solution:

Each Cascade Compatible driver archive includes a program called lsend that allows you to send configuration commands interactively to the driver while it runs. Any command that can be placed into the configuration file can be typed interactively to lsend. To use lsend:

  1. Give the driver a name. Do this by putting the command:
    (attachName driver_name)
    in the driver configuration file. The driver_name can be any string.
  2. Run lsend, pointing it at the driver, like this:
    [sh]$ lsend driver_name

You should now get a prompt, at which you can type any configuration command, complete with parentheses.

In production, it would be best not to use lsend, but rather to either write your own client in C, use the Cascade DataHub and/or write a client using Gamma.

For more details, consult the manual for the specific Cascade Compatible driver (CIF Driver).