DECLARE SUB cm2100zero () '**************************************************************************** 'This module contains subroutines which control the Compumotor 2100 'stepping motor system. ' 'Zachary Wolf '6/7/94, 9/11/95 '**************************************************************************** 'Common area for shared parameters COMMON SHARED /cm2100/ gpibinP%, gpiboutP%, cm2100addrP$ 'Semi-permanent parameters CONST nstepsperrevP& = 25000 'stepping motor # steps per revolution SUB cm2100avd (a!, v!, d!) '**************************************************************************** 'This subroutine moves the motor d! revolutions. It accelerates the motor 'with acceleration a! rev/sec/sec to velocity v! rev/sec to make the move. ' 'Input: ' a!, acceleration in rev/sec/sec ' v!, velocity in rev/sec ' d!, distance in rev, can be + or - ' 'Zachary Wolf '5/6/94, 9/11/95 '**************************************************************************** END SUB SUB cm2100avdend (d!) '**************************************************************************** 'This subroutine moves the motor d! revolutions. It accelerates the motor 'with acceleration a! rev/sec/sec to velocity v! rev/sec to make the move. ' 'Input: ' d!, distance in rev, can be + or - ' 'Zachary Wolf '5/6/94, 9/11/95 '**************************************************************************** END SUB SUB cm2100avdst (a!, v!, d!) '**************************************************************************** 'This subroutine moves the motor d! revolutions. It accelerates the motor 'with acceleration a! rev/sec/sec to velocity v! rev/sec to make the move. ' 'Input: ' a!, acceleration in rev/sec/sec ' v!, velocity in rev/sec ' d!, distance in rev, can be + or - ' 'Zachary Wolf '5/6/94, 9/11/95 '**************************************************************************** END SUB SUB cm2100getd (d!) '**************************************************************************** 'This subroutine gets the number of revolutions away from zero that the 'motor is currently at. ' 'Output: ' d!, position in revolutions ' 'Zachary Wolf '5/6/94 '**************************************************************************** END SUB SUB cm2100init '**************************************************************************** 'This subroutine initializes the Compumotor 2100 indexer. ' 'Zachary Wolf '5/6/94 '**************************************************************************** 'Message PRINT PRINT "Resetting the Compumotor 2100..." END SUB SUB cm2100setpar (gpibin%, gpibout%, cm2100addr$) '**************************************************************************** 'This subroutine sets the parameters required by the CM2100. ' 'Input: ' gpibin%, gpib input file number ' gpibout%, gpib output file number ' cm2100addr$, gpib address in a string ' 'Zachary Wolf '10/16/95 '**************************************************************************** 'Make sure the input parameters have reasonable values IF gpibin% < 0 OR gpibin% > 100 THEN PRINT "CM2100: GPIB problem" EXIT SUB END IF IF gpibout% < 0 OR gpibout% > 100 THEN PRINT "CM2100: GPIB problem" EXIT SUB END IF IF cm2100addr$ = "" THEN PRINT "CM2100: GPIB problem" EXIT SUB END IF 'Save the GPIB information in a common block for future use gpibinP% = gpibin% gpiboutP% = gpibout% cm2100addrP$ = cm2100addr$ END SUB SUB cm2100zero '**************************************************************************** 'This subroutine sets the Compumotor 2100 indexer position count to 0. ' 'Zachary Wolf '5/6/94 '**************************************************************************** END SUB