Remote Technologies RPC-320 manual Interfacing Digital I/O to an opto-module rack

Page 26

DIGITAL AND OPTO PORTS

Protection diodes m ust be used with inductive loads. Refer to figure 6-2

Figure 6-2 Inductive load protection

Do not pa rallel outputs f or higher drive. This could result in damage since outputs will not share current equally.

The outputs at U12 are open collector. An external device must supply power .

Interfacing Digital I/O to an opto-module rack

I/O lines at J3 can interface to an MPS-8, 16, or 24 position opto m odule rac k. L ines not going to an opto module connect to a screw terminal on the MPS-XX series boards. This feature allows you to connect switches or other TTL type devices to the digital I/O lines. The MPS-XX series boards accept G4 series modules.

ACM A-26-24 connects J3 on the RPC-320 to the MP S- XX bo ard. Cable len gth should be less than 2 feet. Excessive cable lengths cause a voltage drop and consequently unreliable operation. Make sure + 5 V and ground is connected to the M PS-XX racks.

Before a line is set, the 82C55 chip must be initialized. This is done using the CONFIG LINE statement. Group inputs and outpu ts together. Refer to Table 6-1 for opto module position, port number , and connector pin out. If opto channels 16-23 are used, U12 should be replaced by a DIP shunt jumper .

The LINE and LINE # com mands are used to control and access opto modules and lines. These commands are both functions and statements, depending upon how they are used.

100

LINE 100, 0

Statement

110

LINE #103, 0

Statement

120

A = LINE(100)

Function

SECTION 6

130

A = LINE#(103)

Function

Program line 100 turns external opto module rack position 0 off. Program line 110 sets J3, pin 3, to a logical 0 level. Program line 120 returns the status of externa l opto modu le rack po sition 0. If the modu le is "off", a 1 is returned (assuming it is an output module). Program line 130 returns the status of J3, pin 3 as a 0 or 1.

Example: To turn on opto module in slot position 8, the following command is executed:

LINE 108, 1

A ' 1' turns on a module while a 0 turns it off. (In actual fact, a 0 is written at the port. )

See Digital I/ O program ming exam ple later in this chapter .

Interfacing to switches and other devices

Switches and other digital I/O devices may be connected directly to P6 or J3 . The STB - 26 terminal board provides a convenient way of interfacing switches or other digital I/ O device s. L ines at J3 are connected to the STB -26 with a CMA - 26 cable . Digital devices are then connected to the screw terminals on the STB-26. The M PS-X X serie s opto rac ks also pro vide a way to access digital I/O lines.

Switches may be connected directly to a line. When jumper W7 configures the resistors as pull ups, a switch closure to ground at a line is read as a 0 using the LINE

#function at J1. 10K resistors are always pulled up at lines L0 to L7.

When W 7 configures the input re sistors as pull downs, one end of the switch m ust be tied to + 5 volts. If this is not possible or convenient, a 1K resistor can be tied between an input and + 5 volts to force it high when a switch is open.

Digital I/ O prog ramm ing exam ple

The follow ing exam ple read s a switch at po rt A, bit 3

(J3-25) (program line 200), r eads L1 at P6 (program line

210)and turns on opto module at channel 5 (program line 220). A LE D is controlled through the high current port at J3-10 (port B, bit 0) (program lines 230 and 240). For testing, a 100 ohm resistor from J3-10 to + 5 volts can be substituted.

Page 6-4 RPC -320

Image 26
Contents Revision REVTrademarks Table of Contents Interrupt Characteristics Sect ION 11 Watchdog Timer DescriptionExternal Reset Sect ION 13 Multi Mode Counter DescriptionSoftware Revision History Description OverviewSection Manual OrganizationSymbols and Term inology Technical SupportOverview Section System layoutEquipment Operating PrecautionsIntroduction First Time Operation Using a PCUsing a Terminal Uploading and Downloading ProgramsEditing programs and program ming hints Where to GO from Here TroubleshootingEprom Saving ProgramsSaving a Program W3 autorun jumperLoading a Program AutorunningPreventing Autorun Changing Eprom SizeBload CommandsAlternate Eproms BsaveCOM1 Serial Port Serial PortsCOM0 Serial Port RS-422/485 Termination network Serial Ports SectionRS-422/485 Operating Information Multidrop Network Accessing Serial BuffersTwo wire RS-485 Serial Port PIN OUT Accessing COM0 and COM1Disabling CONTROL-C RXD CTS RAM Memory Battery BackupChecking the battery Changing MemoryReserved Memory Storing Variables in RAMAssembly Language Interface Block Data TransferDigital Por t J3 Digital and Opto PortsDigital I/O Ports High Current Port L8 Digital I/O CommandsDigital Port P6 Optically Isolated InputHigh Current Output Digital I/ O prog ramm ing exam ple Interfacing to switches and other devicesInterfacing Digital I/O to an opto-module rack Ls e Width Modulation PWM Digital and Opto Ports Section Conne ctor pin ou t J3Line Config LineCount Line BM E Setting Date and TimeDate Section Programming Example Connecting DisplaysWriting to the Display Display Connector PIN OUT Display TypesKeypad Port Program explanationKeypad Port PIN OUT J5 Initialization Connecting Analog InputsAnalog Input Overvoltage conditionsAcquiring Analog Data Differential ModeExamples u sing CON FIG AIN Temperature Measurement Noise NotesAnalog Input Section Data logging on a timer tick Measuring Higher VoltagesMeasuring 4-20 mA current loops Converting Analog MeasurementsAmplifiers Calibration Watchdog Timer External ResetProgram Example Interrupt CharacteristicsOptically Isolated Interrupt Optically isolated and TTL interrup ts Load ProgrammingGND GateCOU NT0 Power Management Further Power ReductionPower Management Section Program Examp leElectrical Specifications Technical InformationJumper Descriptions Mechanical SpecificationsMemory and I/O Bank MAP Bank