Allen-Bradley DF1 Serial Communication Interface API
The DASTEC Corporation Allen-Bradley DF1 Serial Communication Interface API allows the user to implement bi-directional communications to exchange data between applications running on a PC-based or embedded system with other devices supporting the Allen-Bradley DF1 full-duplex serial protocol. The devices can be AB devices, other host computers or even other system applications using the API.
The Allen-Bradley DF1 Serial Communication Interface API enables a system to acts as a client device to other Allen-Bradley peer devices, initiating read and write operations on behalf of the system applications. The API also allows the system to emulate an Allen-Bradley PLC to respond to read and write requests and thus acts as a "virtual PLC" to other AB peers. The API is available for various combinations of operating systems and hardware platforms and can be used with C/C++ or Visual Basic.
The API consists of two component functionalities, client side and server side. The client side functionality is implemented with a single API library. Server side functionality is implemented with a library/executable pair. Together these components manage all aspects of the protocol and data exchange including responding to peers with proper acknowledgements, error/success codes and protocol data byte ordering. The system application need only to deal with the data values exchanged in native byte order. The user can employ either the API's client, server or both functionalities with minimal code implementation.
Client API Functionality
To exchange data with Allen-Bradley peers, a system application can initiate read and/or write operation(s) to the devices by simply calling the client's library functions. The functions include the ability to configure the communication serial port(s), create handle(s) for the device(s) and then using those handle(s) to call the client's library read and write functions. Operation results are returned directly to the calling application, as is data in the case of read operations.
Client API Supports:
- One or more serial communication ports with configurable communication parameters.
- Defining of multiple device(s) representing Allen-Bradley devices.
- PLC types supported: PLC5, SLC 500, SLC 5/01, SLC 5/02, SLC 5/03, SLC 5/04, SLC 5/05, MicroLogix and CompactLogix.
- Functions to read data from and write file data to defined device(s).
- File types supported: Output, Input, Status, Bit, Timer, Counter, Control, Integer, Float, ASCII and String.
- Data can be read/written as 16-bit, 32-bit or ASCII string values.
- Global addressing for write requests.
- Multiple user applications can use the client API simultaneously.
Server API Functionality
Using the server executable program provided as part of the API, a system can appear as an Allen-Bradley peer (Allen-Bradley PLC) on the network. By managing all DF1 serial communication operations, the server executable receives and responds to both read and write requests from peer devices. Data written by peers is stored into separate databases maintained by the server executable for each Allen-Bradley file type (Output, Input, Status, Bit, Timer, Counter, Control, Integer, Float, ASCII and String). The data received is stored in the byte order appropriate for the system's processor. The data for read requests received from peers is retrieved and returned from these databases as well.
No user programming is required for the system to act in this server mode. Peers can read and write to the system as if it were an Allen-Bradley PLC with no user application programs running. Applications have access to the server's databases indirectly through specific API library functions calls or directly via shared memory access. In this way, the user applications obtain data written from peers and can update the system's "virtual PLC's" database so that peers can retrieve it.
Server API Supports:
- One serial communication port with configurable communication parameters.
- Define PLC type (PLC5 or SLC 5/04) for which the server will emulate.
- File types supported: Output, Input, Status, Bit, Timer, Counter, Control, Integer, Float, ASCII and String.
- Maximum 100 files with a separate adjustable database maintained for each file.
- Access to databases via function calls and/or through shared memory.
- Multiple user applications can access the server databases simultaneously.
Specifications:
- Supported serial communication ports: 1 - 32
- Supported protocol: Allen-Bradley DF1 full-duplex
- Supports multiple, multi-thread user applications simultaneously
- Client API Supports
- One or more serial communication ports with configurable communication parameters.
- Defining of multiple device(s) representing Allen-Bradley devices.
- PLC types supported: PLC5, SLC 500, SLC 5/01, SLC 5/02, SLC 5/03, SLC 5/04, SLC 5/05, MicroLogix and CompactLogix.
- Functions to read data from and write file data to defined device(s).
- File types supported: Output, Input, Status, Bit, Timer, Counter, Control, Integer, Float, ASCII and String.
- Data can be read/written as 16-bit, 32-bit or ASCII string values.
- Global addressing for write requests.
- Multiple user applications can use the client API simultaneously.
- Allen-Bradley DF1 protocol commands:
- PLC5
- Word Range Write (Command 0F, Function 00)
- Word Range Read (Command 0F, Function 01)
- Read Modify-Write (Write Bit) (Command 0F, Function 26)
- SLC/MicroLogix/CompactLogix
- Protected Typed Logical Read (with 3 Address Fields) (Command 0F, Function A2)
- Protected Typed Logical Write (with 3 Address Fields) (Command 0F, Function AA)
- Protected Typed Logical Write with Mask (Write Bit) (Command 0F, Function AB) (not supported by SLC 500, SLC 5/01 or SLC 5/02)
- PLC5
- Server API Supports:
- One serial communication port with configurable communication parameters.
- Define PLC type (PLC5 or SLC 5/04) for which the server will emulate.
- File types supported: Output, Input, Status, Bit, Timer, Counter, Control, Integer, Float, ASCII and String.
- Maximum 100 files with a separate adjustable database maintained for each file.
- Access to databases by multiple applications.
- Access to databases via function calls or through shared memory.
- Allen-Bradley DF1 protocol commands:
- PLC5
- Read Diagnostic Counters (Command 06, Function 01)
- Read Diagnostic Status (Command 06, Function 03)
- Word Range Write (Command 0F, Function 00)
- Word Range Read (Command 0F, Function 01)
- Read Modify-Write (Write Bit) (Command 0F, Function 26)
- Read Section Size (Command 0F, Function 29)
- Type Write (Command 0F, Function 67)
- Type Read (Command 0F, Function 68)
- SLC 5/04
- Read Diagnostic Counters (Command 06, Function 01)
- Read Diagnostic Status (Command 06, Function 03)
- Read File Info (Command 0F, Function 94)
- Protected Typed Logical Read (with 2 Address Fields) (Command 0F, Function A1)
- Protected Typed Logical Write (with 2 Address Fields) (Command 0F, Function A9)
- Protected Typed Logical Read (with 3 Address Fields) (Command 0F, Function A2)
- Protected Typed Logical Write (with 3 Address Fields) (Command 0F, Function AA)
- Protected Typed Logical Write with Mask (Write Bit) (Command 0F, Function AB)
- PLC5
Ordering Information
Product Name:
- Allen-Bradley DF1 Serial Communication Interface API
Supported Platforms Part Numbers:
-
Platform Part Number Windows NT/2000/XP WinPC-ABDF1API .NET/.NETCF NET-ABDF1API Intelligent Instrumentation EDAS CE IIIWinCE-ABDF1API Intelligent Instrumentation LANpoint CE IIIWinCE-ABDF1API Linux LINUX-ABDF1API Contact DASTEC about other supported platforms or to inquire about supporting other platforms.
Page 12 of 12