I/O Drivers

This manual describes the various I/O drivers available for the Tsentry system. Both W32 and RTSS versions of most of the drivers are available.

Supported drivers include the following:

  • Allen Bradley PLC 2, PLC 3, and PLC 5

  • Nattional Instruments Process I/O controllers

  • GE 9030 / 9070 PLC

  • TCP/IP Generic Driver

  • Lantronix Terminal Server

  • Generalized Remote Device Connection Driver

  • Allen-Bradley Control Logic PLC


Allen-Bradley Process I/O Server

  • Communicates with Allen-Bradley PLC 5 systems

  • TCP/IP Communications over:

    • Standard Ethernet network connection

    • High Speed dedicated process I/O network with deterministic network performance

  • Software implemented as a C++ Class

  • Multiple PLC support

  • Supports:

    • Read Variables

    • Write variables

    • Integer Files

    • Floating Point Files

  • Capable of running 100ms Input and Output scan rep rates

The A-B PLC must be set up with the proper IP address.  This configuration is completed with the A-B software.  The IP must be chosen such that it lies within the subnet selected for the specific Ethernet controller used for communications.

If the Ethernet controller is one that is controlled by the Windows 2000 system, the subnet is specified in the network setup utility of the control panel.

If the Ethernet controller is one that is controlled by the RTX Real-Time TCP/IP controller, the IP address is specified in the file d:\LocNtRt\sys\pif\RtxTcp.ini. 

The core of the driver is provided as a C++ class that implements the initialization and communications functions.  A sample process is provided which calls the appropriate class members.

The IP address, configuration information, and data areas to be read and written are passed as calling parameters to the class functions.

The following is a list of the provided driver files.  After review of the example driver, the user is required to modify the files as indicated:

File Name

Description

Modifications

File Name

Description

Modifications

ABPlc.cpp

Driver mainline function

Modify configuration class calls for specific PLC configuration.  Modify locations to read and write data.  Modify input and output datagram structure definition

ABPlcIn.cpp

ABPlc driver initialization

Insert required global common areas. 

PlcUsr.cpp

Process received values from PLC datagram and place in user data variables.

Get application variables and store in datagra for transmission to PLC

Change as required

TpriABPlc Class Descriptions

The Tsentry tpriABPlc class encapsulates the functionality required to communicate with the Allen Bradley PLC 2, PLC3, and PLC5 PLCs over a TCP/IP network.

The following public member functions are provided as part of the tpriABPlc class:

  • tpriABPlc *pABPlc = new tpriABPlc;

    • Allocate a new tpriABplc object

  • destroy (tpriABPlcPlc *)pABPlc();

    • Destroy the tpriABPlc class object.

  • int Config (char *pHostName, int timeout);

where:

char *pHostName= host name or IP address

int timeout = time value for read and write operation in milliseconds

This function stores new configuration information for use by class functions

  •  int GetConnStatus (void);

where:

return status = connection status

                        0 = unconnected

1 = connected

This function returns the status of the connection between the Compute system and the PLC

  • int SetReadFile(char *file, int offset, int num);
    where:
    char *file = PLC file name from which to read data
    int offset  = byte offset from start of ‘filename’ from which to read data
    int num = number of data items to read

This function stores the PLC read control information for use by the ScanIO class member

  • int SetWriteFile(char *file, int offset, int num);
    where:
    char *file = PLC file name where to write data
    int offset  = byte offset from start of ‘filename’ to write data
    int num = number of data items to write

This function stores the PLC read control information for use by the ScanIO class member

  •  int Connect (void);

This function establishes a connection between the computer system and the PLC

  •  int Disconnect (void);

This function breaks a connection between the computer system and the PLC

  •  int ScanIO (int *igram, int *ogram, int *ipsta);

where:
int *igram = user memory address where PLC read data will be returned

int *ogram = user memory address where PLC write will be obtained

int *ipsta = addr of an integer variable where I/O status will be returned

This function first reads a single data block of 16 bit integers values from the PLC user register memory and then writes a block of 16 bit integers to the PLC memory.  The plc locations for the read and write are obtained from prior calls to the SetReadFile90 and SetWriteFile() functions.

 

National Instruments Process I/O Driver

RTP (CPI) Process I/O Driver

GE 9030/9070 PLC Driver

GELPC Class Descriptions

TCP/IP Driver - TPRIRdcTcp

Lantronix Terminal Server Driver - tpriRdcLts

Lantronix Cobox Terminal Server Driver - tpriRdcCbx

Generalized Remote Device Connection Driver

Allen Bradley Control Logix PLC Driver

Modicon PLC Driver

TpriModPlc Class Descriptions

VMIC Reflective Memory Driver

© 2022 TelePro, Inc.
3811 Illinois Avenue, Suite 100, St. Charles, IL 60174