Copyright: ©2002 CTC Parker Automation GA-82661-605


Texas Instruments Remote I/O Driver Help Contents

This Help provides information on Interact Device Drivers. Device Drivers provide the software interface which allows Interact to connect to a programmable controller to rapidly exchange the data needed by the application.

This Help contains instructions on how to configure Interact Device Drivers for maximum performance, how to connect them to your control equipment, and how to access the data they provide.

The following Help Topics are available for the Texas Instruments Remote I/O Device Driver:

Introduction

Interface Compatibility

Driver Configuration

Addressing Format

Run Mode

Driver Communications

Error Handling

Contact Information

To learn more about using on-line help, press F1.


Texas Instruments Remote I/O Driver Help Contents

This Help provides information on Interact Device Drivers. Device Drivers provide the software interface which allows Interact to connect to a programmable controller to rapidly exchange the data needed by the application.

This Help contains instructions on how to configure Interact Device Drivers for maximum performance, how to connect them to your control equipment, and how to access the data they provide.

The following Help Topics are available for the Texas Instruments Remote I/O Device Driver:

Introduction

What is a Device Driver

Types of Device Drivers

Device Driver Modes

16550 UART Support

Interface Compatibility

Driver Configuration

Addressing Format

Run Mode

Driver Communications

Error Handling

Contact Information

To learn more about using on-line help, press F1.


Texas Instruments Remote I/O Driver Help Contents

This Help provides information on Interact Device Drivers. Device Drivers provide the software interface which allows Interact to connect to a programmable controller to rapidly exchange the data needed by the application.

This Help contains instructions on how to configure Interact Device Drivers for maximum performance, how to connect them to your control equipment, and how to access the data they provide.

The following Help Topics are available for the Texas Instruments Remote I/O Device Driver:

Introduction

Interface Compatibility

Compatibility

Address Selection

Hardware Interrupt Selection

Connection to the Remote I/O Link

Remote Base Configuration

Driver Configuration

Addressing Format

Run Mode

Driver Communications

Error Handling

Contact Information

To learn more about using on-line help, press F1.


Texas Instruments Remote I/O Driver Help Contents

This Help provides information on Interact Device Drivers. Device Drivers provide the software interface which allows Interact to connect to a programmable controller to rapidly exchange the data needed by the application.

This Help contains instructions on how to configure Interact Device Drivers for maximum performance, how to connect them to your control equipment, and how to access the data they provide.

The following Help Topics are available for the Texas Instruments Remote I/O Device Driver:

Introduction

Interface Compatibility

Driver Configuration

Adapter

Acquisition Blocks

Write Buffering

Addressing Format

Run Mode

Driver Communications

Error Handling

Contact Information

To learn more about using on-line help, press F1.


Texas Instruments Remote I/O Driver Help Contents

This Help provides information on Interact Device Drivers. Device Drivers provide the software interface which allows Interact to connect to a programmable controller to rapidly exchange the data needed by the application.

This Help contains instructions on how to configure Interact Device Drivers for maximum performance, how to connect them to your control equipment, and how to access the data they provide.

The following Help Topics are available for the Texas Instruments Remote I/O Device Driver:

Introduction

Interface Compatibility

Driver Configuration

Addressing Format

Format

Data and Memory Types

Special Function Memory

Addressing Examples

Run Mode

Driver Communications

Error Handling

Contact Information

To learn more about using on-line help, press F1.


Texas Instruments Remote I/O Driver Help Contents

This Help provides information on Interact Device Drivers. Device Drivers provide the software interface which allows Interact to connect to a programmable controller to rapidly exchange the data needed by the application.

This Help contains instructions on how to configure Interact Device Drivers for maximum performance, how to connect them to your control equipment, and how to access the data they provide.

The following Help Topics are available for the Texas Instruments Remote I/O Device Driver:

Introduction

Interface Compatibility

Driver Configuration

Addressing Format

Run Mode

Entering Run Mode

Clear Errors

Log Off Driver

Log On Driver

Go To AM

Control Comm

Run Mode Screen Note

Driver Communications

Error Handling

Contact Information

To learn more about using on-line help, press F1.


Texas Instruments Remote I/O Driver Help Contents

This Help provides information on Interact Device Drivers. Device Drivers provide the software interface which allows Interact to connect to a programmable controller to rapidly exchange the data needed by the application.

This Help contains instructions on how to configure Interact Device Drivers for maximum performance, how to connect them to your control equipment, and how to access the data they provide.

The following Help Topics are available for the Texas Instruments Remote I/O Device Driver:

Introduction

Interface Compatibility

Driver Configuration

Addressing Format

Run Mode

Driver Communications

Serial Communications

Read Data

Write Data

Write Data Adjustment

Task Codes

Read Data Blocks

Error Handling

Contact Information

To learn more about using on-line help, press F1.


Texas Instruments Remote I/O Driver Help Contents

This Help provides information on Interact Device Drivers. Device Drivers provide the software interface which allows Interact to connect to a programmable controller to rapidly exchange the data needed by the application.

This Help contains instructions on how to configure Interact Device Drivers for maximum performance, how to connect them to your control equipment, and how to access the data they provide.

The following Help Topics are available for the Texas Instruments Remote I/O Device Driver:

Introduction

Interface Compatibility

Driver Configuration

Addressing Format

Run Mode

Driver Communications

Error Handling

Error Information

Error References

Unique Error Reference Information

Driver Error Codes

Device Error Codes

I/O Status Errors

Contact Information

To learn more about using on-line help, press F1.


Compatibility

The Texas Instruments Remote I/O Device Driver (TIRIO) allows you to configure your Interact application to communicate with Texas Instruments (TI) controllers using the remote I/O interface.

An adapter must be installed in your computer in order for the TIRIO Device Driver to communicate with the controller. This card is called the Texas Instruments Remote I/O Adapter and is shown below.

The TIRIO adapter can be installed in any slot in your computer. The adapter transfers data between the Interact application and the programmable controller.

The green communication LED located on the faceplate is ON as long as the adapter and driver are communicating with the controller.


Address Selection

The TIRIO adapter is designed to operate in a standard IBM PC bus. A memory address and hardware interrupt must be set before using the adapter. There are jumpers on the adapter used to set the hardware interrupt and memory address. Select the interrupt and address by setting jumpers to the desired value.

Caution:   The TIRIO adapter contains static sensitive components. Exercise care in handling and installing the adapter. The handling danger is particularly high on days with low humidity. These basic rules should be followed:

- Touch your hand to the computer case before  installing the adapter to discharge any built up  charges.

- Avoid excessive handling of the adapter in areas susceptible to static electricity such as carpeted floors, low humidity, etc.

The TIRIO adapter may be placed at any location in PC memory and resides on 1K boundaries. It is recommended you place the card in the segment range of C000H to E000H to prevent overlapping with reserved memory areas.

The addresses listed in the remainder of this file are segment addresses, NOT absolute addresses. Refer to the table below listing a typical IBM PC/XT/AT memory map.

Address Range	Size	Usage
00000 - 001DF	480	Interrupt Vectors
001E0 - 002FF	288	User Vectors
00300 - 003FF	256	BIOS Stack
00400 - 004FF	256	BIOS Data
00500 - 005FF	256	For DOS & BASIC
00600 - 9FFFF	638K	User RAM
A0000 - AFFFF	64K	EGA Video Buffer
B0000 - B7FFF	32K	Mono. Video Buffer
B8000 - B8FFF	32K	CGA Video Buffer
C0000 - C7FFF	32K	EGA Video BIOS
C8000 - C9FFF	32K	XT Hard Disk Controller BIOS
D0000 - DFFFF	64K	User Space
E0000 - EFFFF	64K	User Space (PC/XT) System ROM (AT)
F0000 - FFFFF	64K	BIOS & BASIC
The TIRIO adapter is shipped with the address set at DC00H. For most systems this address will not overlap other circuit cards in the system. The TIRIO driver Base Address parameter also defaults to DC00H.

As stated earlier, the base address is set using jumpers. The jumper designator is JP1 and is located on the adapter as shown below.

The address jumper is a ten pin device with the least significant bit (LSB) and most significant bit (MSB) located as shown in the figure above. The PC bus address lines correspond to the pin numbers as shown in the illustration.

The factory set jumper selection is DC00H as shown in the figure below.

To set the base address, move the jumpers to the pins corresponding to the desired address.

Example Address Selection

If you choose a base address of D500H the jumpers should be placed as shown in graphic A. Notice that you read the address starting from the MSB (right of JP1). A jumper in position indicates a HI or logic 1.

If you choose a base address of DF00H or CD80H the jumpers should be placed as shown in graphics B and C respectively.

Record the selected base address for future reference in configuring the TIRIO Device Driver.


Hardware Interrupt Selection

The TIRIO adapter can use one of four hardware interrupts which are standard on the PC bus interface. The interrupt selected MUST NOT be used by any other device in the system.

With four interrupts, up to four TIRIO adapters may be used in one computer by assigning an interrupt to each TIRIO adapter. Be sure to select only ONE interrupt per adapter. The available interrupts are numbered 3, 4, 5, and 7 and are listed below.

TIRIO adapters default to interrupt number 7, which is set at the factory.

Hardware Interrupts

Interrupt Number	Use
3	COM2
4	COM1
5	XT Fixed Disk
7	LPT1
Once an interrupt has been selected, the TIRIO adapter must be configured to recognize the interrupt. The interrupt is selected using JP2 located on the TIRIO adapter near the PC bus connector as shown below.

The jumper block in the figure below is set to interrupt 7.

Select an interrupt by referring to the hardware interrupt table.

Record the selected hardware interrupt for future reference in configuring the TIRIO Device Driver.


Connection to the Remote I/O Link

The remote I/O cable is connected to the nine pin connector located on the access cover. The connector is numbered as shown below.

When connecting to a remote I/O network, the TIRIO adapter should be wired in the same fashion as any other remote rack. Refer to your Texas Instruments controller documentation for details on remote I/O wiring.

The insulated wires are attached to pins 3 and 8 of the connector while the non-insulated wire is attached to pin 5. It does not matter which of the two insulated wires are attached to pins 3 or 8.

For remote I/O connection, refer to the figure below.

A terminator is required if the TIRIO adapter is the last node on the link. If this is the case the value of the resistive terminator depends upon the type of cable used as the remote I/O cable.

The table below lists three types of Belden cable commonly used in the I/O link and the associated termination resistor value.

Cable Type	Resistor Value
9860	120 ohms
9271	120 ohms
9182	150 ohms
All cable types are Belden twisted pair cable.

If a terminator is required refer to the figure below for proper termination.

TIRIO adapter installation is now complete.

The Interact Cable Dictionary can be found at the site provided below. After you have reached the site, choose Product Manuals from the menu on the right hand side, and then choose Interact. From the table, select Interact Cable Dictionary.

CTC Parker Automation Product Support


Remote Base Configuration

The TIRIO adapter appears as a remote base to the controller. As with any remote base device, the controller and TIRIO adapter configurations must match. The TIRIO adapter must be configured with 6 WX and 2 WY words assigned. During configuration answer YES to all special function module questions.

Follow the steps below to ensure the TIRIO adapter can communicate with your controller.

1.	Select Config I/O from the TI programming software.

2.	Assign a base number to the TIRIO adapter. Valid range is 1-15. The RBC Base Number parameter on the TIRIO driver Adapter configuration page must match this number.

3.	Select Read PC from the TI programming software menu. Ensure that no device has previously been configured for the selected base number.

4.	Enter for slot one:

6 WX words

2 WY words

Type YES under the Special Function column.

5.	Select Write PC from the TI programming software menu.

6.	Configuration is now complete.


Adapter

Use this page to configure parameters required for the TIRIO adapter. Individual parameter descriptions are listed below.

Base Address

Use this parameter to enter the memory location of the TIRIO adapter. The adapter may reside on any 1K boundary in a recommended range of C000H to E000H. You must enter the same base address that was set on the adapter with the base address jumpers. For an example of the base address selection, refer to the Address Selection topic. The default is DC00H.

Card Interrupt

Use this parameter to enter the interrupt selected with the interrupt jumper during adapter installation.

Interrupts available are:    3    4    5    7 (default)

Enter the interrupt number by selecting the drop-down list box then selecting the desired interrupt from the list. You must enter the same interrupt number that was set on the adapter with the interrupt jumper. See the topic on Hardware Interrupt Selection for additional information.

For proper operation, ensure that the interrupt selected does not conflict with any other interrupts used on your system.

RBC Base Number

Use this parameter to assign the remote I/O base number you wish to assign to the TIRIO adapter. The TIRIO adapter is a remote base device. Valid range is 1-15. The default is 1.

Select the spin control to enter the same remote I/O base number used when you configured your remote I/O.


Acquisition Blocks

Use the Acquisition Blocks page to define which data the driver is to acquire or read from the controller.

There are up to 224 read blocks that may be assigned in the Acquisition Blocks list.

It is not necessary to set up blocks for data that is only written to the controller. Data acquisition is more efficient when the number of blocks is kept to a minimum. You may enter blocks in any sequence, and blocks do not have to be contiguous.

Enter a block by selecting the Add button. Enter the Memory Type, Start Offset, and Block Size associated with this particular block. These parameters are described below.

To delete an acquisition block, select the Delete button.

Settings for Block

This group of parameters is used to assign acquisition blocks. For each entry in the Acquisition Blocks list, modify these three parameters.

Memory Type

Use this parameter to specify the memory type where data will be read from the controller. Select the drop-down list box and select the memory type from the list. Selecting the SA or SL memory types will grey out the Block Size parameter since the block size for these memory types is fixed.

Start Offset

Use this parameter to specify the starting offset within the assigned block of memory. For example, if a block of X memory was assigned with an offset of 14, then data at X14 would be the beginning of the block acquired from the controller.

For special memory (memory type S) the start offset parameter indicates the loop or alarm number to be read. Thus, the Block Size parameter is not applicable for memory type S.

Block Size

Use this parameter to indicate the size of the read block and is dependent upon the memory type. For bit memory (memory types C, X, Y) the maximum block size is 256 bits. Bits must be acquired in multiples of 16. For word memory (memory types V, WX, WY, TCC, TCP) the maximum block size is 61 words. For the SL and SA memory types the maximum block size is fixed.

Important   When assigning Interact tool/object address references do not assign references residing on acquisition block boundaries for the VD and VR memory types. For example, suppose the following acquisition blocks were assigned:

Memory Type		Start Offset		Block Size
1.     V		V1		5
2.     V		V6		7
Since the VD and VR memory types reference two words, upon entering Run mode you would receive an error if a tool references VD5 or VR5.


Write Buffering

Use the Write Buffering page to assign parameters which indicate whether data written from Interact to the controller is to be buffered, or issued and acknowledged one at a time. Individual parameter descriptions are listed below.

Wait For Writes

Use this parameter to specify that the driver should wait for an acknowledge from the controller before continuing processing.

In runtime, Interact modules write data to the device driver that, in turn, sends this data to the controller. The device driver will then take one of two possible actions:

•	wait for an acknowledge from the controller before proceeding

•	immediately return to the module.

Select the Wait For Writes check box to cause the driver to wait for an acknowledge from the controller. No additional Interact module writes will be accepted until an acknowledge from the controller is received or a time-out occurs.

A disadvantage of selecting the Wait for Writes parameter is that additional processing time is required while waiting for the controller's response. An advantage is that if any write errors are detected, error status is returned immediately and displayed on the object. You are aware of current write status before performing another write.

With Wait For Writes checked, the Write Buffer Size parameter is grayed out and not selectable. Operation with the Wait for Writes parameter checked is shown below.

Clearing the Wait For Writes check box will allow Interact modules to continue writing data to the driver. The driver will write this data to the controller and not wait for the controller acknowledge. This saves time and thus is the preferred method of operation.

If a module performs another write prior to the driver receiving the acknowledge from the controller, the write request will be placed in a write buffer. The number of write requests that can be placed in this buffer is set with the Write Buffer Size parameter.

If an acknowledge is not returned from the controller within a time-out period, an error will be returned. This is displayed on the driver screen.

Operation with the Wait for Writes parameter cleared is shown below.

Write Buffer Size

Use this parameter to specify the number of write requests that can be buffered in the driver. Click on the spin control to enter a number from 10-999. The default is 10.

This parameter works in conjunction with the Wait for Writes parameter. Clearing the Wait For Writes check box will require you to enter a value for the Write Buffer Size.

Using the default size, a "buffer full" condition is unlikely, but if it occurs, all subsequent writes will be rejected until there is room in the buffer.

Buffered writes are shown below.


Format

The address format is:

driver_name\ m   o   :   e   .   b

driver_name - defaults to TIRIO, but you can change the name through a selection on the Application Manager Drivers Used dialog.

\ - delimiter that separates the driver name from the memory type.

m - memory type, 1 to 3 character mnemonic specifying the type of memory being referenced. May include data type modifiers.

o - numeric offset of the element being referenced within the given memory type. All offsets are expressed in decimal.

: - used only for SA and SL memory types. Delimiter that separates the numeric offset from the data element for SA and SL memory types.

e - optional data element, 3 to 5 character mnemonic specifying the data element for SA and SL memory types.

. - delimiter that separates the bit number from the address

b - optional bit number, 1-16 decimal.

The address fragment :e in the address format shown above is required when referencing alarms and loops (SA and SL memory), and should ONLY be used when referencing these memory types.

The address fragment .b, also shown above, is optional for WORD data type ONLY. The bit number is specified as 1-16 decimal, with 1 being the high order bit. To write a bit in Variable Word Memory, you must perform the bit write on the corresponding V address.

Addressing Bits in Word Memory

Special care must be taken when addressing bits in word memory. If a tool is assigned a bit of word memory, upon initialization the word is read from the controller's memory and saved off for subsequent writes.

The addressed bit will change to match the assigned state and the entire word will be written to the controller.

At any time if the controller or a device other than Interact changes a different bit of the same word, this change would NOT be detected by Interact. Interact continues to use the word saved off upon first initialization.

For example, suppose a push button tool was assigned to bit 5 of V1. Upon initialization, word V1 would be read from the controller. If the tool was assigned to turn V1 bit 5 ON, then Interact would save V1 for subsequent writes then write the entire word back to the controller. This would overwrite all bits of V1.


Data and Memory Types

Data Types

Texas Instruments Series 500 memory types are supported by the TIRIO driver. Data may be represented in the TI controller memory in various formats. These formats are referred to as data types.

Data types will be specified for various memory areas using the terminology defined below.

BIT - Memory is referenced as a single bit (0 or 1).

WORD - 16-bit unsigned integer (0 to 65,535 decimal).

SWORD - 16-bit signed integer (-32,768 to 32,767 decimal). For some special function variables the range is either 0 to 32,000 or -32,000 to 32,000. Refer to your TI documentation for specifics.

REAL - 32-bit IEEE float value (-3.4E+38 to 3.4E+38).

SLONG - 32-bit signed long integer

Memory Types

The following Texas Instruments Series 500 memory types are supported by the TIRIO driver.

Data Type	Memory Type	Description
BIT	X	External Bit Input
BIT	Y	External Bit Output
BIT	C	Control Relay
WORD	WX	External Word Input
WORD	WY	External Word Output
WORD	V	Variable Word Memory
WORD	TCP	Timer/Counter Preset
WORD	TCC	Timer/Counter Current
	S	Special Function
Important   The offset range for each memory type is the maximum configurable limits for the Texas Instruments Series 500 controllers. The applicable offset range will depend on the amount of user memory available with your controller and the manner in which it is allocated. Refer to your controller documentation for the specific offset range.

Memory Type Modifiers

The TIRIO driver can interpret Variable Word and Special Function memory as various data types. To allow the user to specify how the driver is to interpret data from V and S memory, modifiers are used in the address string. These modifiers are listed below.

Normally V memory is interpreted as WORD data. With the V memory modifiers (S, R, and D) the driver can also interpret V memory as SWORD, REAL, or SLONG data.

Modifier	Description	Data Type
VS	Variable Word Memory	SWORD
VR	Variable Real Memory	REAL
VD	Variable Double Memory	SLONG
SL	Special Function Loops	(*)
SA	Special Function Alarms	(*)
(*) depends on data element type

Memory Types V, VS, VD, and VR all reference Variable Word Memory. However, the manner in which the bits are interpreted differs.

For example, V20 and VS20 both reference word 20 of Variable Word Memory. V20 interprets the 16 bits contained in word 20 as an unsigned integer and VS20 interprets them as a signed integer. Therefore, if word 20 contains the value FFFF HEX, referencing the word as V20 would return the decimal value 65,535, and referencing the word as VS20 would return the decimal value -1.

Memory Types VD and VR reference 32 bits starting at the specified word offset. For example, VR20 references words 20 and 21 of Variable Word Memory, interpreting the contents as a 32-bit IEEE float value where word 20 is the high order word.

A similar example can be given for VD Memory. The address VD20 also references words 20 and 21 of Variable Word Memory although the contents are interpreted as a 32-bit signed integer.

To further illustrate, consider the following diagram.

Important Notes on V Memory Modifiers

Remember that V, VS, VD, and VR all reference the same area of memory. The modifiers (S, D, and R) only change the manner in which the data is interpreted. Thus caution must be taken when reading or writing to or from V, VS, VD, and VR address references, since these reference the same area of memory.

For example, writing to V20 will affect not only the value returned by reading V20, but also the values returned by reading VS20, VR20, VD20, VR19, and VD19.

In addition, when assigning Interact tool/object address references do not assign references residing on acquisition block boundaries for the VD and VR memory types.

For example, suppose the following acquisition blocks were assigned in the driver during Program mode:

Memory Type	Start Offset	Block Size
1.     V	V1	5
2.     V	V6	7
Since the VD and VR memory types reference two words, upon entering Run mode you would receive an error if a tool references VD5 or VR5. The reason for this is that the first word is contained in the first block with the second word contained in the second block.

The correct way to set up the acquisition blocks for this example would be:

Memory Type	Start Offset	Block Size
1.       V	V1	6
Thus, words V5 and V6 would be acquired in one block for tool references VD5 or VR5.


Special Function Memory

The following are the Data Element Type mnemonics for referencing Special Function Loops and Alarms.

Special Function Loop Data Elements

Data Element	Description	Data Type
LKC	Loop Gain	REAL
LTI	Loop Reset	REAL
LTD	Loop Rate	REAL
LHA	Loop High Alarm Limit	REAL
LLA	Loop Low Alarm Limit	REAL
LPV	Loop Process Variable	REAL
LPVH	Loop Process Variable High Limit	REAL
LPVL	Loop Process Variable Low Limit	REAL
LODA	Loop Orange Deviation Alarm Limit	REAL
LYDA	Loop Yellow Deviation Alarm Limit	REAL
LTS	Loop Sample Rate	REAL
LSP	Loop Setpoint	REAL
LMN	Loop Output	REAL
LVF	Loop V-Flags	WORD
LRSF	Loop RAMP/SOAK Flags	WORD
LERR	Loop Error	REAL
LMX	Loop Bias	REAL
LHHA	Loop High-High Alarm Limit	REAL
LLLA	Loop Low-Low Alarm Limit	REAL
LRCA	Loop Rate-of-Change Alarm Limit	REAL
LSPH	Loop Setpoint High Limit	REAL
LSPL	Loop Setpoint Low Limit	REAL
LADB	Loop Alarm Deadband	REAL
*RLHA	Raw Loop High Alarm	SWORD
*RLLA	Raw Loop Low Alarm	SWORD
*RLPV	Raw Loop Process Variable	SWORD
*RLODA	Raw Loop Orange Dev. Alarm Limit	SWORD
*RLYDA	Raw Loop Yellow Dev. Alarm Limit	SWORD
*RLMN	Raw Loop Output	SWORD
*RLSP	Raw Loop Setpoint	SWORD
*RLERR	Raw Loop Error	SWORD
*RLHHA	Raw Loop High-High Alarm Limit	SWORD
*RLLLA	Raw Loop Low-Low Alarm Limit	SWORD
*RLADB	Raw Loop Alarm Deadband	SWORD
*RLMX	Raw Loop Bias	SWORD
*RLSPL	Raw Loop Setpoint Low Limit	SWORD
*RLSPH	Raw Loop Setpoint High Limit	SWORD
LCFH	Most-significant word of Loop C-Flags	WORD
LCFL	Least-significant word of Loop C-Flags	WORD
LKD	Loop Derivative Gain-limiting coefficient	REAL
LRSN	Loop RAMP/SOAK Step Number	WORD
LACK	Loop Alarm Acknowledge Flags	WORD
*Raw data elements are accessed by prefixing the letter R to the mnemonic.

Special Function Alarm Data Elements

Data Element	Description	Data Type
AHA	Alarm High Alarm Limit	REAL
ALA	Alarm Low Alarm Limit	REAL
APV	Alarm Process Variable	REAL
APVH	Alarm Process Variable High Limit	REAL
APVL	Alarm Process Variable Low Limit	REAL
AODA	Alarm Orange Deviation Alarm Limit	REAL
AYDA	Alarm Yellow Deviation Alarm Limit	REAL
ATS	Alarm Sample Rate	REAL
ASP	Alarm Setpoint	REAL
AVF	Alarm V-Flags	WORD
AERR	Alarm Error	REAL
AHHA	Alarm High-High Alarm Limit	REAL
ALLA	Alarm Low-Low Alarm Limit	REAL
ARCA	Alarm Rate-of-Change Alarm Limit	REAL
ASPH	Alarm Setpoint High Limit	REAL
ASPL	Alarm Setpoint Low Limit	REAL
AADB	Alarm Alarm Deadband	REAL
*RAHA	Raw Alarm High Alarm Limit	SWORD
*RALA	Raw Alarm Low Alarm Limit	SWORD
*RAPV	Raw Alarm Process Variable	SWORD
*RAODA	Raw Alarm Orange Dev. Alarm Limit	SWORD
*RAYDA	Raw Alarm Yellow Dev. Alarm Limit	SWORD
*RASP	Raw Alarm Setpoint	SWORD
*RAADB	Raw Alarm Deadband	SWORD
*RAERR	Raw Alarm Error	SWORD
*RAHHA	Raw Alarm High-High Alarm Limit	SWORD
*RALLA	Raw Alarm Low-Low Alarm Limit	SWORD
*RASPL	Raw Setpoint Low Limit	SWORD
*RASPH	Raw Setpoint High Limit	SWORD
ACFH	Most-significant word of Alarm C-Flags	WORD
ACFL	Least-significant word of Alarm C-Flags	WORD
AACK	Alarm Alarm Acknowledge Flags	WORD
*Raw data elements are accessed by prefixing the letter R to the mnemonic.

Important   When using presets with Special Function data elements you should be aware of data elements that are read only, ranges for read/write data elements, and proper use of data element flags.

Be aware that the AM Startup Settings is defaulted to using presets and tool preset values are defaulted to zero. Refer to your TI documentation for specifics on Special Function data elements.


Addressing Examples

TIRIO\V1

driver name:	TIRIO
memory type:	V for Variable Word Memory
offset:	1
TIRIO\V1.1

driver name:	TIRIO
memory type:	V for Variable Word Memory
offset:	1
bit number:	1 (MSB)
TIRIO\X16

driver name:	TIRIO
memory type:	X for External Bit Memory
offset:	16
TIRIO\VR8

driver name:	TIRIO
memory type:	VR for Variable Real Memory
offset:	8

Refers to value stored in the eighth and ninth words of Variable Real Memory.

TIRIO\SA1:APV

driver name:	TIRIO
memory type:	SA for Special Function Analog Alarm Memory
offset:	1
data element:	APV for Alarm Process Variable
Refers to the Process Variable for Alarm 1.

TIRIO\SL7:LCFL.3

driver name:	TIRIO
memory type:	SL for Special Function Loop Memory
offset:	7
data element:	LCFL for Least-Significant Word of the Loop C-Flags in loop 7.
bit number:	3

Refers to the Monitor High/Low Alarms flag.

TIRIO\SL7:LCFH.3

driver name:	TIRIO
memory type:	SL for Special Function Loop Memory
offset:	7
data element:	LCFH for Most-Significant Word of the Loop C-Flags in loop 7.
bit number:	3

Refers to the RAMP/SOAK on the setpoint flag, or bit 19 of the 32 bit Loop C-Flags.

Note that entering addresses into the TIVPU programming unit might differ from entering addresses in Interact. For instance, if TIRIO\SA1:APV was entered for a reference, APV1 would be entered into the TIVPU to reference the same address.


Run Mode Screen Note

On the bottom of the Run mode screen is listed the PLC mode. This parameter indicates the current status of the controller. Valid conditions are RUN and PRG/HOLD. On the bottom far right of the screen is listed I/O status. The numeral listed is identical to the number displayed on an I/O rack controllers seven segment display.


Serial Communications

This topic details the communications control between a typical device driver and the controller. This information can help you to optimize your system's performance.

Interact interfaces with the controller in a master-slave relationship. Interact acts as the master and controllers behave as slaves. Thus, read and write data must be requested by Interact before any data transfers to Interact take place.

Interact connected to a controller is shown in a following figure.

For write data, (data sent TO the controller):

•	a message will be formatted with all necessary information

•	message is sent to the destination controller

•	controller returns an acknowledge (ACK) back to Interact indicating the write message was received

•	data is written, then the controller will form a message indicating the write is complete and sends this to Interact

•	Interact receives the message and an ACK is sent back to the controller indicating it was received

For read data, (data sent FROM the controller):

•	a message will be formatted by Interact requesting the data from the controller

•	message is sent to the destination controller

•	controller returns an ACK back to Interact indicating the read message was received

•	requested data is placed in a message and sent to Interact

•	Interact receives the message and an ACK is sent back to the controller indicating it was received

This flow of data is shown below.


Task Codes

The Task Codes used by the device driver operations are as follows:

Task Code	Description
14	Write discrete memory (X, Y, C).
30	Determine PLC memory configuration and operational status.
6D	Read memory configuration table.
74	Find control block numbers.  Determine which loops and  analog-alarms are present.
76	Read loop.
79	Read analog-alarm.
All other driver communications use I/O Subsystem Pseudo-DMA.


Read Data Blocks

Read data is defined as data that is to be monitored by the AM. AM registers each piece of read data with the device driver. Read data is configured in blocks that are set up by the user during driver configuration. Any changes in the read data are reported to AM.

Important   The Special Function Loop and Analog-Alarm memory types (SA and SL) require more communication overhead than other memory types. Thus, monitoring many loop and alarm data elements can lessen communications performance by requiring a great number of task code read requests.


Error Information

Error messages are displayed on the Run mode screen so you may analyze the error that has occurred, and determine the appropriate action to be taken. There are three types of errors:

•	Driver errors: errors detected by the device driver in its attempt to interface with the Interact Application Manager or communicate with the controller.

•	Device errors:errors detected by the controller and passed back to the device driver as an error message. Refer to the controller's documentation for more information.

•	I/O Status: errors detected by the TIRIO adapter. This number is the same number that is displayed on the I/O rack controller's seven-segment display.

A maximum of 10 errors may be displayed on the screen at a given time. If this maximum is reached, additional errors will be added to the top of the displayed list, and the least recent errors will be removed at the bottom. If the same error consecutively repeats, only the first occurrence will be logged.

Error Format

Errors are displayed on the RUN mode screen in the following format:

time stamp   ERROR_CLASS - ERROR_CODE   text

The time stamp parameter indicates the system time at which the error occurred in 24 hour time (e.g., 12:00:00 is 12:00 noon and 24:00:00 is 12:00 midnight). The Text parameter describes the error.

In addition there are two variables associated with each error which change simultaneously when an error occurs. These are listed below.

ERROR_CLASS - describes the error class as either driver, device, or I/O status related. A driver error = 1, a device error = 2, I/O status = 3 (0 = no error).

ERROR_CODE - describes which driver or device error occurred. It will be displayed in HEX on the driver Run mode screen and in DECIMAL on the Interact tool displaying this error reference. Refer to the error code listing for a description of each error code.

I/O status errors (ERROR_CLASS = 3) are the same numbers that are displayed on the I/O rack controller's seven-segment display. These status numbers are displayed on the Run mode screen in the lower right corner for operator convenience.

Pressing Clear Errors on the device driver Run mode screen will erase all displayed errors. Also, ERROR_CLASS and ERROR_CODE values in the tool error references are set to 0.

Once an error is cleared, it is removed from memory and cannot be recalled.

Example

If the following error was displayed:

03:45:36 DRIVER - 0AH PLC is in PROGRAM mode

This error occurred at 03:45:36, it is a DRIVER error, error code AH. This error indicates that the controller is now in the Program mode.


Unique Error Reference Information

This topic describes any unique error reference information specific to the TIRIO driver. See the previous topic for general information that applies to all Interact device drivers.

Error Class Variable

The ERROR_CLASS variable is used to describe the error type. A third error type is available with the TIRIO driver, I/O status. A driver error returns a 1, a device error returns a 2, an I/O status error returns a 3, and no error returns a 0.

Error Station Variable

The ERROR_STATION variable is not used in the TIRIO driver.

Error Status Variable

The ERROR_STATUS variable is used to indicate the communication status between the controller and the Interact driver. In the TIRIO driver, the format required to obtain communication status of the controller is:

[driver_name]\error_status


Driver Error Codes

Error codes are listed in HEX. Decimal values are listed in parentheses ().

Error Code	Description
1 (1)	Memory allocation error: Insufficient memory
2 (2)	Driver was logged off: Driver was logged off.
3 (3)	Driver was logged on: Driver was logged on by the user.
4 (4)	Write buffer overflow: Write buffer overflow. Will only appear if the Wait for Writes check box has been cleared. Increase the Write Buffer Size parameter to correct this error.
5 (5)	Write request failed: The PLC is in Program mode.
6 (6)	Write request failed: The driver is logged off.
7 (7)	A write request failed.
8 (8)	A read request failed.
9 (9)	PLC is in RUN mode: The PLC has been switched to the Run mode.
A (10)	PLC is in PROGRAM mode: The PLC has been switched to the Program mode.
B (11)	PLC memory configuration: The memory configuration has changed and is no longer compatible with the current driver configuration. The driver will be logged off.
C (12)	Response time-out: A request was sent to the PLC but no response was received.
E (14)	Write initialization failure.
F (15)	Invalid write reference: The address reference does not exist in the PLC.
10 (16)	Invalid read reference: The address reference does not exist in the PLC or is not defined in the driver's acquisition blocks.
11 (17)	Data out of range error: The data received from the PLC was not in range for the memory type written.


Device Error Codes

Error codes are listed in HEX. Decimal values are listed in parentheses (). Refer to the TI controller documentation for more information on these errors.

Error Code	Description
1 (1)	Reset current transaction.
2 (2)	Address out of range.
3 (3)	Requested data not found.
4 (4)	Illegal task code request.
5 (5)	Request exceeds program memory size.
6 (6)	Diagnostic fail upon power up.
7 (7)	Fatal error detected.
8 (8)	Keylock protect error.
9 (9)	Incorrect amount of data sent with request.
A (10)	Illegal request in current operational mode.
B (11)	Network was not deleted.
C (12)	Attempted write operation did not verify.
D (13)	Illegal number of ASCII characters received.
E (14)	Illegal write to program memory.
F (15)	Data not inserted.
10 (16)	Data not written.
11 (17)	Invalid data sent with the command.
12 (18)	Invalid operation with NIM Local/Remote mode.
13 (19)	The Store and Forward buffer are busy.
14 (20)	No response from the Special Function module.
15 (21)	Illegal instruction found in program memory on a program to run transition.
16 (22)	Attempted write to a protected variable.
17 (23)	No response from PC.
18-1B (24-27)	Requested memory size is not correct.
1C (28)	PLC busy, cannot complete the request.
1D (29)	Comm error in HOLD mode - Transition to RUN not allowed.
1E (30)	Port lockout is active.
21 (33)	I/O configuration error - too many points.

Error Codes 40 - 61 HEX (64 - 97 decimal) are used by the SF/LOOP card only. Only those errors that may occur during device driver communications are listed.

40 (64)	Operating system error detected.
41 (65)	Invalid control block type.
42 (66)	Control block number out of range.
43 (67)	Control block does not exist.
46 (70)	Offset out of range.
47 (71)	Arithmetic error detected while writing loop or Analog Alarm parameter.
49 (73)	Instruction number or RAMP/SOAK Step Number out of range.
4E (78)	Attempt to write a read-only variable.
54 (84)	Control block is disabled.


I/O Status Errors

Error codes are listed in HEX. Decimal values are listed in parentheses ().

Error Code	Description
0 (0)	Normal operation, remote I/O ok.
1 (1)	Self diagnostics failed.
2 (2)	Module mismatch. This usually means the PLC I/O is not configured properly for this remote base.
3 (3)	I/O communications time-out. This usually means the cable is bad or disconnected.
4 (4)	RAM parity error.
5 (5)	Standby, no configuration.
6 (6)	Address mismatch.
7 (7)	Communications ok, no configuration. This usually means the PLC I/O is not configured properly for this remote base.
8 (8)	Watchdog time-out.
0C (12)	Standby, configuration.


Glossary

acquisition

base address

block size

card interrupt

clear_errors

Clear Errors Button

comm_params

Control Comm Button

error_class

error_code

error_log

error references

Log Off Driver Button

Log On Driver Button

log_onoff

memory type

RBC base number

start offset

write buffer size


base address

Memory location of the TIRIO adapter


block size

A parameter that indicates the size of the read block and is dependent upon the memory type..


card interrupt

Software interrupt assigned to the TIRIO adapter.


memory type

A parameter that specifies the memory type where data will be read from the controller.


RBC base number

A parameter used to assign the remote I/O base number you wish to assign to the TIRIO adapter. The TIRIO adapter is a remote base device. Valid range is 1-15. The default is 1.


start offset

This parameter specifies the starting offset within the assigned block of memory.


What is a Device Driver ?

A device driver is a software program that is used to transfer data from one kind of device to another. Device drivers are also used to standardize the format of data between disimilar devices.

An Interact device driver is a program that runs under the control of the Interact Application Manager (AM).  A device driver allows you to configure your Interact application to communicate with any supported controller using the controller's protocol.

A device driver provides Interact modules with real-time data used to monitor and interface with plant-floor operations.


Types of Device Drivers

There are two basic types of device drivers:

•	serial drivers that communicate through the computer’s serial port

•	board drivers that communicate through an interface board inserted into the computer

A serial driver connects to the controller by means of an RS-232-C, RS-422, or RS-485 interface and cable connected to your computer’s serial port. Data is transferred between the computer and controller through the serial interface.

A driver that requires an interface board connects to the controller by means of a circuit card installed inside your computer. A communication cable used specifically for this interface is then connected between the board and your controller. Data is transferred between the computer and controller through the interface.


Device Driver Modes

Device drivers run in one of two operating modes:

•	Program Mode

•	Run Mode

While in Program mode, you can configure the driver to interface with your controller and the Interact application. For device drivers, Program mode is available from within the Windows configuration environment as well as the DOS runtime environment. Under Windows, all the necessary configuration parameters are provided in a single dialog box, which is accessible through the Application Browser or the main menu. Under DOS, the configuration parameters are available on the Driver screen itself while Interact is in Program mode.

After configuration is complete you can enter Run mode while in the DOS environment. This connects your application with the controller, allowing data to be exchanged. The driver collects data to be used by the Interact modules of your application and, in addition, writes values from the Interact modules to the controller.

An example of a device driver Run mode screen is shown below:

This screen is composed of four distinct areas:

•	Driver Name

•	Buttons

•	Error Log

•	Driver Status

At the top of the screen is the driver's title along with it's abbreviated "name". The name is used to reference the driver when forming addresses to specify data it provides.

Buttons are located on the bottom of the screen. Select these to perform specific functions or return to the AM.

The error log lists all errors detected by the driver. These could be driver errors or errors detected in the controller.

The driver status, either OFFLINE or ONLINE, is listed at the bottom left of the screen.


16550 UART Support

Important   We strongly recommend the use of a 16550AF (or equivalent) UART if you are running Interact. The UART buffers incoming characters until the processor can read them, virtually eliminating overrun errors.

At startup, Interact looks for a 16550AF UART. If it is detected, all Interact serial drivers automatically support FIFO operation.

With no 16550AF UART installed, it may not be possible to run more than one Interact serial driver at a time using baud rates greater than 4800 baud. This depends upon the processor clock speed.

If you experience communication problems when using Interact, we suggest you do one of the following:

•	install a 16550 UART (the recommended solution)

•	run at a slower baud rate


Entering Run Mode

After you have configured your driver, you are ready to communicate on-line with your controller.

Caution   Upon entering the Run mode, all write values in the controller's memory are forced to the tools specified preset values if presets were selected for the Startup Write Values. Preset values for the tools should be chosen carefully to ensure that processes and/or machinery are placed in a safe mode of operation when these values are written. Configure your system for safe and predictable operation in the event of unexpected power ON/OFF cycles.

In the DOS operating environment, return to the AM from the device driver Program menu by pressing Go To AM on the device driver menu. When the AM Main Menu appears, press Run/Prog Mode to enter Run mode.

Important   After pressing Run/Prog Mode, the driver immediately begins communications with the controller in order to initialize any write data. If the device driver cannot establish communications with the controller, it may take a few minutes to time-out, depending upon the number of tools configured for the application. You may press ESC or the right mouse button should you wish to abort and return to the AM. Write data will not be sent to an off-line controller.

In Run mode, all module and driver programs specified for the application are running simultaneously. The driver will begin collecting data from the controller and pass this data on to the modules.

To bring the device driver Run mode menu into the foreground, press Go To Driver on the AM Main Menu.


Clear Errors

Pressing this button will clear all errors displayed on the runtime screen. Also, all error references are set to 0.


Log Off Driver

Pressing this button will halt all communications with the controller. Data cannot be written to or read from any controller.

In the error display portion of the device driver runtime screen, a time-stamped message will be displayed indicating the off-line condition.

This selection button is useful while debugging your application. It allows you to go off-line with your controller without having to return to the AM Main Menu to leave Run mode.


Log On Driver

Pressing this button will start communications with the controller following an off-line condition. Data can now be written to and read from any controller. A time-stamped message will be displayed indicating the on-line condition.


Go To AM

Pressing this button returns the AM to the foreground. Your application is still in runtime as indicated on the screen. To switch back to Program mode, press the Run/Prog Mode button on the AM Main Menu.


Control  Comm

This parameter is not available on ALL drivers. Only those drivers that have a System Configuration List will have this functionality.

Pressing this button allows controlling the communication status of each unit number assigned during development mode. The Driver Comm Control menu will be displayed similar to the one shown below.

A list showing the assigned unit numbers appears on the right of the screen. To halt communications with a particular unit:

•	select the number, the entry is highlighted

•	select the ON/OFF button to toggle the communication status

With communications stopped, data cannot be written to or read from the unit number assigned. This feature is useful if you want to halt communications with a particular controller instead of halting communications with the entire system.

Changing the communication control of a particular controller will not affect the setting of the startup communication control on the PLC Stations dialog box.


Read Data

Read data is defined as data that is to be monitored by the Application Manager (AM). AM registers each piece of read data with the device driver. The device driver then builds blocks of read data where possible to most efficiently perform read requests to the controller. Read requests are executed at the specified acquisition interval and any changes in the read data are reported to AM.

These read blocks have a maximum number of data words per read block and are usually grouped in multiples of 8 (8, 16, 32, 64, etc..). The number of words per read block is listed under the Read Data Blocks topic. A read message is then sent to the controller to acquire the data for each block.

The driver acquires data most efficiently when data words are grouped together within their maximum word boundary to minimize the number of messages. Acquiring read data is shown on a following figure.

Once data is acquired, it is sent to the requesting Interact module for processing. Floating-point values acquired from the controller must be in range of IEEE floating point values. The driver can read an out of range value, but the Interact tool or object will display an exclamation point (!) on top of the tool or object.

Important   Read data is acquired in blocks. If a data item in a read block is not a valid reference (i.e. address doesn't exist in the controller), then all tools included in the read block will not receive data. An exclamation point (!) will be placed over each referenced tool.


Write Data

Write data is defined as data that is to be modified by the Application Manager. As with read data, AM registers each piece of write data with the device driver. To avoid making unrequested writes, write data is not blocked by the device driver. Write data is handled as individual write items and thus is written on an item by item basis.

If a write request is received from an Interact module during acquisition, the driver will alternate between acquiring read data and writing Interact module data.


Write Data Adjustment

All write data is received from the Interact modules in floating point form. If the data is being written to a memory type other than floating point, the data is rounded to the nearest integer value.

If the data to be written is out of range for the memory type in the controller, it is placed at the nearest limit. For example, if 35034 is sent to a memory type with a maximum of 32767, then 32767 is actually written to the controller. If a negative number is written to a memory type with a minimum of 0, then 0 is written instead of the negative number.

Important   Data written to high order integer, double integer, or long memory types are represented by Interact as a single precision IEEE float. Thus the data is limited to 24 binary bits of precision (or approximately 7 decimal digits).

This means that not all data from these memory types that are greater than seven decimal digits can be represented by Interact and will be rounded to the nearest value with 24 bits of precision.

As an example, the numbers 2,147,483,457 through 2,147,483,583 will all be written to the controller as 2,147,483,520.


Error References

An Interact module can obtain the error class, error code, or error station using error references. A module can also obtain the error status. The error status is not displayed on the driver screen, it is only available to a module.

A module can also control a drivers log on/log off status, clear errors from the module, view a list of driver configuration parameters, and view the error log. These error references allow viewing and controlling errors on a panel, or generating an alarm upon an error condition, without having to display the device driver runtime screen in the foreground.

To display an error class, error code, error station, error status, or to control a driver and view the driver configuration parameters, you must assign a reference to an object or tool. Error References are entered in the following format:

[driver_name]\error_class - Use this variable to obtain the error type (0 = no error, 1 = DRIVER, 2 = DEVICE). Some drivers do not have device errors.

[driver_name]\error_code - Use this variable to obtain the error code. It will be displayed on the tool in decimal.

[driver_name]\error_station - Use this variable to obtain the controller number. If the error cannot be associated with a particular controller, a -1 is returned to the Interact module. In some drivers, instead of a -1, a null string is returned.

[driver_name]\error_status - Format required if the driver does not support station numbers. Use this variable to obtain the communication status of the controller. If the controller is unable to communicate with the driver a 1 is returned. This could be caused by a cable problem, driver was logged off, or any other communication problem. If the controller can communicate with the driver a 0 is returned.

OR

[driver_name]\error_status\<station number> - Format required if the driver supports station numbers. Use this variable to obtain the communication status of the controller. If the controller is unable to communicate with the driver a 1 is returned. This could be caused by a cable problem, driver was logged off, or any other communication problem. If the controller can communicate with the driver a 0 is returned. Enter the station number of the controller that communication status is desired.

[driver_name]\log_onoff - Use this variable to control the driver log on/log off status. When a non-zero value is written to this reference, the driver will log on, otherwise the driver is logged off. Communication  can not take place between Interact and the controller when a driver is logged off. The current driver status can be read from this variable and will be displayed on the tool in decimal.

[driver_name]\clear_errors - Use this variable to clear driver errors from the display. When a non-zero value is written to this reference, driver errors are cleared, otherwise driver errors will remain visible on the display.

[driver_name]\comm_params - Use this variable to list the driver configuration parameters on a PTM panel. The configuration parameters listed will vary according to the driver. Driver variables listed could include:

•	Driver Name

•	Baud Rate

•	Parity Settings

•	Data Bits

•	Stop Bits

•	Station List

•	Wait for Writes Setting

[driver_name]\error_log - Use this variable to display the driver error status on a PTM panel. If an error occurs error information such as the error code will be displayed.

A panel template incorporates the log_onoff, clear_errors, comm_params, and error_log variables which provide driver status and control information without having to view a driver Run mode screen. The template can be used as is or customized to your specific application needs. See the Application Manager Help for detailed information on templates and how they are can be used in your application.


acquisition

A parameter that specifies how often read data should be acquired from the controller.


Clear Errors Button

A selection button on the device driver Run mode display. Pressing will clear all errors from the display.


Control Comm Button

A selection button on the device driver Run mode display. Pressing will display a list allowing you to control communications with a particular controller.


error references

Special references assigned to an object or tool enabling the display of error information.


Log Off Driver Button

A selection button on the device driver Run mode display. Pressing will stop communications between the driver and your controller.


Log On Driver Button

A selection button on the device driver Run mode display. Pressing will start communications with your controller if previously you had logged off.


watchdog interval

A parameter that specifies how often the watchdog reference address is toggled.


watchdog reference

An address that can be used to monitor Interact for an online condition.


write buffer size

Configuration option that reflects the number of pending write requests.


error class
error_class

Describes the error type as either driver or device related. A driver error returns a 1, a device error returns a 2, and no error returns a 0.


error code
error_code

Describes which driver or device error occurred. Displayed in HEX on the driver runtime screen and in DECIMAL on the Interact tool displaying this error reference.


error station
error_station

Indicates which station number is associated with the error. This can be any valid station number. If the error cannot be associated with a particular number, a -1 is returned to the module. In some drivers, instead of a -1, a null string is returned.


log onoff
log_onoff

A variable used in an Interact module to control the driver log on/log off status.


clear errors
clear_errors

A variable used in an Interact module to clear driver errors from the display.


comm params
comm_params

A variable used in PTM to list the driver configuration parameters on a panel.


error log
error_log

This variable is used to display the driver error status on a PTM panel. If an error occurs error information such as the error code will be displayed.