BUCKLE(OPCSDEFS) Optical Printer Control System BUCKLE(OPCSDEFS) NAME buckle - configure the buckle input ports and bit masks USAGE buckle [port] [mask] [test] [0] # (all values in hex!) EXAMPLES buckle c 0000 00 00 # No buckle detection for camera chan buckle c 03bd 40 40 # LPT1 pin 10, HI bit detects condition buckle c 03bd 40 00 # LPT1 pin 10, LO bit detects condition DESCRIPTION If your system has a buckle sensor switches on the camera or projectors, they can be wired to one of the IBM parallel ports to allow the software to sense its state. A buckle sensor temporarily stops shooting to prevent film jams, should the film deviate from its normal path and "buckle" into the sensors. Buckle conditions are checked whenever a shooting command is executed such as KEY, CAM, REP and SEEK. Buckle conditions are NOT tested when linear movement commands such as with GO(OPCS), JOG(OPCS). All parameter values are in hexadecimal. [port] is the port number in the range 0000-03ff. If [port] is 0000, no buckle checking is done for that channel. [mask] is applied to the value received from the port whenever the software is checking for a viewer open condition. This is applied before comparing to [test]. [test] is compared to the value read from the port after [mask] is applied. If the result is the same as [test], a viewer open condition exists. WIRING CONSIDERATIONS Normally you would use an optically isolated interface card for the buckle and viewer switches, e.g. PIO-100(DOCS). If directly connecting switches to the parallel port, use a separate dedicated 5 VDC power supply wired through the switches such that when the sensing switch is tripped, +5V is supplied to the computer. Such a supply can be a store-bought 5 VDC regulated switching transformer, which gives out *exactly* 5VDC. (Avoid older linear transformers, as they are often unregulated) As with any signal going to the sensing input on a computer, the signal should never be open. The signal must pull either 5 volts or ground for a TRUE or FALSE condition. Open inputs can act like radio antennas that will oscillate randomly. If you have noise problems, shielded wire can help mitigate noise. Shield ONLY at the power supply end. Ground the shield to chassis ground if possible. Keep wire lengths as short as possible. If noise problems persist, it may be that the wire is simply too long for such a low voltage signal. The PIO-100 uses 12VDC to allow for longer cable lengths, and an optoisolator to convert to +5V for the parallel port input. If noise problems persist, and you have ruled out the computer, it may be that the wire is simply too long for such a low voltage signal. You may want to use a higher voltage (12 volts) in the switch circuitry to drive an optoisolator close to the computer, using the optoisolator to switch a 5 volt current to the port. You can find the base port value for the parallel ports from the operating system using the DOS 'debug' utility: C>debug # run 'debug' -d40:8 f # enter this (not the '-') 0040:0008 BC 03 78 03 00 00 00 00 # debug spits this out -q ----- ----- # type 'q' to quit debug | | | LPT #2's port base address | LPT #1's port base address Your machine may show different values. In the case above, 03BC is the base port value for LPT1..note the bytes are in reverse order in typical LSB/MSB fashion. See the PARALLEL() man page which shows the pin out and port addresses of the IBM PC's parallel ports. BUGS None. SEE ALSO DEENERGIZE(OPCSDEFS) - define port/bit to deenergize motors ALLSTOP(OPDSDEFS) - define port/bit to detect the allstop key BUCKLE(OPCSDEFS) - define port/bit to detect film buckles VIEWER(OPCSDEFS) - define port/bit to detect viewer open TRIPSWITCH(OPCSDEFS) - define port/bit to detect trip switches SETBIT(OPCSDEFS) - set bit(s) on a port CLRBIT(OPCSDEFS) - clear bit(s) on a port XORBIT(OPCSDEFS) - invert bit(s) on a port PARALLEL(DOCS) - parallel port pinout with port/bit masks PIO-100(DOCS) - OPCS Parallel I/O interface board, e.g. http://seriss.com/opcs/pio-100/ ORIGIN Version K1.12e+ Gregory Ercolano, Venice California 04/11/98