11
CLCISUB1.BAS LIBRARY
The CLCISUB1.BAS Library is for use with QuickBASIC, VisualBasic for DOS, or any other similar 'BASIC' based
programming languages. This Library is set up to run CLCI2000 Series Indexers at any open addresses. The following
is a command list for all the usable Subroutines and Functions in this Library. This is a comprehensive list that will allow
complete control of the CLCI2000 Series Index Boards. To use these commands you need to LOAD the file
CLCISUB1.BAS into your main program and DECLARE the Subroutines and Functions you wish to use. That is all there
is to it. Refer to your QuickBASIC or VisualBasic manual for more details.
In all the below descriptions, these general guidelines apply:
The ADDRESS is the setting on the 5 pin dip switch (see Installation). This is always given in the Hexadecimal format.
For a setting of 11000, or a Base Address of 300, the correct format would be (&H300, ...)
The AXIS# applies to the axis for that particular board (1, 2, 3, or 4)
BUSY (ADDRESS, AXIS#)
This Function will return a 1 if the axis is Busy (clock pulses are being generated). It will return a 0 if there is no motion
at all. This is a good Input to use to wait until the motion has stopped before going on in the program.
GET.BASE (BASE, MAX, RAMP)
Because the motor speeds are created by a digital device, the resolution is limited to the clock oscillator that is used -
in this case it is 9.8304 MHz. The result is a speed that is very close to the one desired - usually within a fraction of a
percent. This Function will return the actual Base Speed obtainable with the given parameters. This is used to find out
the exact Base Speed that will be used for the specified numbers. For example, if the desired Base Speed was 500,
Max Speed was 10,000, and Ramp was 2,000, the resulting Base Speed would actually be: 499.7963 Hz.
GET.MAX (BASE, MAX, RAMP)
Because the motor speeds are created by a digital device, the resolution is limited to the clock oscillator that is used -
in this case it is 9.8304 MHz. The result is a speed that is very close to the one desired - usually within a fraction of a
percent. This Function will return the actual Max Speed obtainable with the given parameters. This is used to find out
the exact Max Speed that will be used for the specified numbers. For example, if the desired Base Speed was 500, Max
Speed was 10,000, and Ramp was 2,000, the resulting Base Speed would actually be: 9999.593 Hz.
GET.RAMP (BASE, MAX, RAMP)
Because the motor speeds are created by a digital device, the resolution is limited to the clock oscillator that is used -
in this case it is 9.8304 MHz. The result is a Ramp that is very close to the one desired - usually within a fraction of a
percent. This Function will return the actual Ramp obtainable with the given parameters. This is used to find out the
exact Ramp that will be used for the specified numbers. For example, if the desired Base Speed was 500, Max Speed
was 10,000, and Ramp was 2,000, the resulting Ramp would actually be: 2000.784 Hz/Second.
GET.INPUT (ADDRESS, INPUT#)
This Function will return the values for INPUT 1. A '1' means that the input is active, or at a TTL state of 0VDC. A '0'
means that the input is at a TTL state of +5VDC or there is no connection to the input.
GO.CCW ADDRESS, AXIS#
This Subroutine will Index in the counterclockwise direction. The distance that the motor will move depends on the
distance set by the A.INDEX.NUMBER command. The motion starts at Base Speed and Ramps up to Max Speed,
sustains the Max Speed, and then finishes the move by ramping down to Base Speed and stopping.
GO.CW ADDRESS, AXIS#
This Subroutine will Index in the clockwise direction. The distance that the motor will move depends on the distance set
by the A.INDEX.NUMBER command. The motion starts at Base Speed and Ramps up to Max Speed, sustains the Max
Speed, and then finishes the move by ramping down to Base Speed and stopping.
HARD.INPUT.CCW (ADDRESS, AXIS#)
This Function will return the value of the -Hard Limit Switch. If the Limit Switch is ACTIVE or 0VDC, the Function will
return a 1. If the Limit Switch is NOT ACTIVE, the function will return a 0.
HARD.INPUT.CW (ADDRESS, AXIS#)