RTMC48(DOCS) Optical Printer Control System RTMC48(DOCS) NAME rtmc48 - notes on the Kuper Controls RTMC48 stepper motor control card DESCRIPTION The Kuper Controls RTMC48 card is a "long slot" ISA card for the IBM PC that can generate steps/direction pulse streams to control up to 48 stepper motors at once. Bill Tondreau of Kuper Controls supplies these cards, and OPCS can it to control up to 16 motor channels with it. RTMC48 DOS DRIVER OPCS communicates with the board via the MS-DOS device driver "RTMC48.COM", which provides a standard low level interface to the card that OPCS can make use of to run the motors efficiently. NOTE: The RTMC48.COM driver must be loaded before running the OPCS software. and can be installed either by the AUTOEXEC.BAT, or by a separate batch script. If the RTMC card's jumpers are default (BaseAddr=300 and IRQ=5), then you can install the driver by just running: rtmc48 CONFIGURING THE BASEADDR AND IRQ In OPCS K1.xx, the base address is configured in STARTUP.DEFS using the 'baseaddr' command in that file. IRQ not configurable. In OPCS K2.00 through K2.09, the base address is configured in OPCSDEFS.OPC with the 'baseaddr' command. IRQ not configurable. In OPCS K2.10 and up, the RTMC48.COM driver allows both the base address and IRQ to be configured on the command line. The default would be: rtmc48 -b300 -i5 <-- Sets base address=0300h, IRQ=5 | | | IRQ=5 Base Addr=300 ..and if your RTMC48 jumpers are set differently, then specify matching values accordingly. e.g. if your RTMC48 card has jumpers set to BaseAddr=340 and IRQ=6, then start the driver with: rtmc48 -b340 -i6 To list the RTMC48 driver's options, run 'rtmc48 -help'. If it does not show a list of options, then it is an older version that does not support command line options. TECHNICAL SYNOPSIS When the software wants to move a motor, it provides 48 separate 12 bit velocity values (one per motor channel) that we can call a 48 channel 'sample', and 120 of these samples are sent per second to the card using the RTMC48's hardware interrupt on IRQ 5. The software has to keep up with this transimission rate, otherwise it will loose track of the motor positions. The RTMC48.COM device driver provides a 64k motor velocity circular ring buffer that the OPCS software constantly writes to while running the motors. The OPCS software uses INT 99h to communicate with the driver, providing the address of the ring buffer, and start/stop commands. The RTMC48 card generates 120 interrupts per second to the RTMC48.COM driver, which feeds out 48 velocities per interrupt from the ring buffer to the card, rotated out to the motors on the NEXT interrupt tick. LOGIC CONNECTOR Controlling the Kuper Logic connector changed with the new RTMC48. Assuming the kuper base port is 0300: #define BASE 0x300 /* WRITE 8 BITS TO THE LOGIC PORT */ out(BASE+0x14h, byte); /* READ 8 BITS FROM THE LOGIC PORT */ out(BASE+0x15h, 0x40); /* disable chip select */ byte = inp(BASE); /* read data from BASE */ Note that it is now easy to use the output port (it's dedicated), but is hard to do a read (it involves two operations). For using the OPCS software with the RTMC48, it is NOT RECOMMENDED you use the Kuper Logic connector for reading data. However, writing data appears to be ok. This is in contrary to the recommendations for using OPCS with the RTMC16, where use of the logic connector can be used for inputs only. KUPER CONTROL RTMC16 CARD CONNECTOR 'P2' (DB37S - 37 pin connector) -------------------------------- 1 - (*) 20 - +5VDC 2 - STEP A 21 - DIR A DB37S (37 pin connector) 3 - STEP B 22 - DIR B 4 - STEP C 23 - DIR C 5 - STEP D 24 - DIR D 6 - STEP E 25 - DIR E 7 - STEP F 26 - DIR F (*) = Jumper Select GND or +5 with JP5: 8 - STEP G 27 - DIR G +5VDC - Short pins 1 & 2 on JP5 9 - STEP H 28 - DIR H GND - Short pins 2 & 3 on JP 10 - STEP I 29 - DIR I 11 - STEP J 30 - DIR J 12 - STEP K 31 - DIR K NOTE: All outputs are OPEN COLLECTOR 13 - STEP L 32 - DIR L TTL. Maximum +5 current draw 14 - STEP M 33 - DIR M should not exceed 400 milliamps. 15 - STEP N 34 - DIR N 16 - STEP O 35 - DIR O 17 - STEP P 36 - DIR P 18 - (*) 37 - +5VDC 19 - (*) KUPER CONTROL CARD IRQ JUMPER SETTINGS (JP3) Selects the IRQ used for feeding velocities -------------------------------- JP3 has a single jumper on one set of pins to set the IRQ; from left to right, pins set IRQ 2 thru 7, with 5 being the default: _ JP3 | | o o o |o| o o o o o |o| o o | | | |_| | | | | | | | | | | | | | |__ IRQ7 | | | | |_____ IRQ6 | | | |________ IRQ5 <-- DEFAULT | | |___________ IRQ4 | |______________ IRQ3 |_________________ IRQ2 KUPER CONTROL CARD SWITCH SETTINGS 'JP4' Selects the KuperBase address value (Jumpers A3-A9) -------------------------------- This is the default configuration for 0300h: JP4 _ _ _ _ _ | || || || || | |o||o||o||o||o| o o |o||o||o||o||o| o o |_||_||_||_||_| A3 A4 A5 A6 A7 A8 A9 Here's the table of the JP4 jumper variations from the RTMC16 manual, shown in "most likely to work" order: KuperBase Address A3 A4 A5 A6 A7 A8 A9 ------------------------------ 0300 1 1 1 1 1 0 0 0320 1 1 0 1 1 0 0 0320 0 1 0 1 1 0 0 0330 1 0 0 1 1 0 0 0340 1 1 1 0 1 0 0 0280 1 1 1 1 0 1 0 02a0 1 1 0 1 0 1 0 0308 0 1 1 1 1 0 0 0310 1 0 1 1 1 0 0 0318 0 0 1 1 1 0 0 NOTE: 0 = off 1 = on Factory setting is 0300, and there is usually no need to modify this setting unless other boards in the machine are conflicting with this address. Same for the IRQ setting. ♀ KUPER LOGIC CONNECTOR [R1] Inputs are tied high to +5 PIN NAME PORT MASK (hex) ------------------------------------------- 1 GND GND GND 2 out 0 0x306 01 3 out 1 0x306 02 4 out 2 0x306 04 5 out 3 0x306 08 6 out 4 0x306 10 7 out 5 0x306 20 8 out 6 0x306 40 9 out 7 0x306 80 10-12 ??? ??? ?? 13 +5 +5 +5 14 GND GND GND 15 in 0 0x306 01 16 in 1 0x306 02 17 in 2 0x306 04 18 in 3 0x306 08 19 in 4 0x306 10 20 in 5 0x306 20 21 in 6 0x306 40 22 in 7 0x306 80 23-24 ??? ??? ?? 25 +5 +5 +5 KUPER "INDUSTRIAL" CARD The Kuper Controls "Industrial Card" is a 'half slot ISA' card, a variation on the RTMC-48. So for OPCS, install the "RTMC48.COM" driver. The "H1" 40 pin connector (upper-left) is the steps/direction. The "H2" 40 pin connector (upper-right) is the "logic" connector. For OPCS, only the "H1" connector should be used. On the H1 connector, pin #1 is at the lower-left of the connector (component side facing you). This card has 3 jumper blocks, whose "factory" settings are: JP1: o-o o -- sets voltage for pin #1 (OPCS: dont care) JP2: o o o o o -- sets samples-per-second(?) (default: 120/sec) | | | o o o o o JP3: o o o o o o -- sets the IRQ (default IRQ 5) | o o o o o o ..where '-' is a horizontal jumper, and '|' is a vertical jumper. KUPER PORT MONITOR PROGRAM The OPCS software comes with kuper.exe, a program that monitors the realtime status of the Kuper logic port. Run 'kuper.exe'. This tool can be downloaded from http://seriss.com/opcs/ftp/ SEE ALSO RTMC16(DOCS) - notes on the Kuper Controls RTMC16 motor control card A800(DOCS) - notes on the OPCS/Seriss Corporation A800 motor control card 8255(DOCS) - how to control 8255 based digital I/O cards KUPER(DOCS) - documentation on the kuper card connectors ORIGIN Gregory Ercolano, Topanga, California 04/12/00