TENSION(OPCSDEFS)	Optical Printer Control System	  TENSION(OPCSDEFS)

    NAME
        tension - configure tension motor port for each channel

    USAGE
        tension [chan] [port] [mask] [invert] [softlatch]    # (values hex!)

    EXAMPLES
        tension a 03bc 01 00 0        # lpt1 output port bit #1
        tension a 0306 01 00 1        # RTMC16 logic connector bit #1
                                      # (note [softlatch] set to 1)
    DESCRIPTION
        This command defines the port bit that controls the direction for
	the tension motors on the specified channel. Intended only for camera,
	main, and aerial projector channels (a,b,c) to keep proper tension on
	the film to prevent it from spooling out.
	
	[chan] is the channel name of the motor to be affected.

	[port] is the hard port. 0000 disables tension motor control.

	[mask] is the bit on the port that manages the tension motor.
	
	[invert] if '0', running forward clears the [port] bit in [mask],
        and reverse sets it. If [invert] is '1', the opposite occurs.

        o With [softlatch] set to 1, only ports 0x0000 - 0x07ff are allowed.
	  Any ports referenced above 0x07ff with [softlatch] enabled will
	  cause an error.

        o External programs that modify a port defined to OPCS as a [softlatch]
	  port (such as would be the case for the kuper logic I/O port) should
	  beware that the OPCS software will be maintaining it's own internal
	  latch for that port, and this latch value will not reflect any 
	  changes that have been made by the external program.
	
	  This is not really a bug, just a fact that cannot be changed. It 
	  is usually bad hardware practice to make WRITE ONLY ports, since 
	  different programs cannot co-communicate with such a port, unless 
	  some common data area is arranged to latch the settings, which can
	  be hard to enforce on PCs.

    BUGS
        o With [softlatch] set to 1, only ports 0x0000 - 0x07ff are allowed.
	  Any ports referenced above 0x07ff with [softlatch] enabled will
	  cause an error.

        o External programs that modify a port defined to OPCS as a [softlatch]
	  port (such as would be the case for the kuper logic I/O port) should
	  beware that the OPCS software will be maintaining it's own internal
	  latch for that port, and this latch value will not reflect any 
	  changes that have been made by the external program.
	
	  This is not really a bug, just a fact that cannot be changed. It 
	  is usually bad hardware practice to make WRITE ONLY ports, since 
	  different programs cannot co-communicate with such a port, unless 
	  some common data area is arranged to latch the settings, which can
	  be hard to enforce on PCs.

    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

    ORIGIN
	Gregory Ercolano, Los Feliz California 09/11/90
© Copyright 1997 Greg Ercolano. All rights reserved.