Anaheim CLCI2000 Slewatbaseccw ADDRESS, Axis, Slewatbasecw ADDRESS, Axis, Stop ADDRESS, Axis

Page 22

SLEW_AT_BASE_CCW (ADDRESS, AXIS)

This will cause the motor to move at base speed in the CCW direction.

SLEW_AT_BASE_CW (ADDRESS, AXIS)

This will cause the motor to move at base speed in the CW direction.

SOFT_INPUT_CCW (ADDRESS, AXIS)

This will return the value for the -Soft Limit Switch. A 1 will mean that the switch is active, and a 0 will mean the switch is not active.

SOFT_INPUT_CW (ADDRESS, AXIS)

This will return the value for the +Soft Limit Switch. A 1 will mean that the switch is active, and a 0 will mean the switch is not active.

STOP (ADDRESS, AXIS)

This will immediately stop the pulses.

WAIT_FOR_STOP (ADDRESS, AXIS)

This will pause the execution of the program until the Axis has completed its motion.

NOTE: THERE ARE OTHER FUNCTIONS THAT ARE CONTAINED IN THIS FILE THAT SHOULD NOT BE USED OR MODIFIED IN ANY WAY - THEY ARE USED INTERNALLY BY THE ABOVE FUNCTIONS, AND ANY ALTERATION MIGHT PRODUCE UNEXPECTED RESULTS.

SAMPLE PROGRAM #3

This program will move a distance of 400 steps in the clockwise direction, with a base speed of 100 steps/second and a Max Speed of 2000 steps/second. The ramping for both acceleration and deceleration would be 100,000 steps/second/second.

//PROGRAM FOR BORLAND C++

 

#include CLCISUBS.CPP

 

void main ( )

 

{

 

int address = 0x300;

'this sets up the correct address

int axis = 1;

'this sets up the axis number

INITIALIZE (address, axis);

'this initializes the board

MOTION (address, axis, 100, 2000, 100000);

'this sets up the motion

INDEX (address, axis, 400);

'this sets up the distance to move

GO_CW (address, axis);

'this initiates the move

}

 

19

Image 22
Contents CLCI2000 Series Disclaimer Limited WarrantyCopyright TrademarksTable of Contents General Description Main FeaturesDescription Packing InformationDPI65201 CLCI2004Ordering Information DPI65202AA37MMC-10 AA37MFC-10AA37MMC-6 AA2M37Specifications Wiring to the CLCI2000 InstallationInstalling the Board Address SettingsQuickstart with Quickbasic Clock Signals Connector Descriptions+5VDC Home Limit Direction SignalsSoft Limit Hard LimitInputs Encoder InputsOutputs Index ADR, Axis GO.CW ADR, Axis Programming with Anaheim Automation LibrariesProgramming with Quickbasic or Visualbasic for DOS Speed ConsiderationsCLCISUB1.BAS Library ONE.AT.MAX.CW ADDRESS, AXIS# ONE.AT.MAX.CCW ADDRESS, AXIS#ORIGIN.INDEX.CCW ADDRESS, AXIS# RAMP.TO.BASE.CW ADDRESS, AXIS# ORIGIN.INDEX.CW ADDRESS, AXIS#RAMP.TO.BASE.CCW ADDRESS, AXIS# RAMP.TO.STOP.CCW ADDRESS, AXIS#SLEW.AT.BASE.CCW ADDRESS, AXIS# SLEW.AT.BASE.CW ADDRESS, AXIS#TOP.OF.LOOP If GET.INPUTADDR,1 = 1 then Sample #1 Program SAMPLE1.BAS on the CLCI2000 DiskInitialize ADDR,AXIS Index ADDR,AXIS,5000HOME.TYPE.1 Sample #2 Program SAMPLE2.BAS on the CLCI2000 DiskInitialize ADDR, Axis LIMIT.CONTROL ADDR, AXIS, 0, 0CLCISUBS.CPP Program Function Definitions Originindexccw ADDRESS, Axis Oneatmaxccw ADDRESS, AxisOneatmaxcw ADDRESS, Axis Originindexcw ADDRESS, AxisSoftinputccw ADDRESS, Axis Slewatbaseccw ADDRESS, AxisSlewatbasecw ADDRESS, Axis Softinputcw ADDRESS, AxisObject Command1Procedure Click Using the CLCI2000 Indexer with WindowsUsing the DLL with Visual Basic for Windows Programming in WindowsWIN2000.BAS Program Listing Anaheim Automation DLL Library SupportRunning the Software CLCI2004 Program GeneratorFunction Window F4- Terminal F1 InsertF3 Delete F5 SaveF3 Clear Program F1 Prog StopF2 Single Step F4 Printing a ProgramCommand Window Command Dictionary CLCI2004 Program Generator Command DictionaryCommand Summary Direction + orFinish Move no value Encoder Resolution any numberEncoder Window any integer GO Index no valueJump to Line 1 to UNITS/SCALE any number MAX Setting not in HZ Register # Bits Setting Range DescriptionBase Setting not in HZ Ramp SettingCommand Buffer Register Description of Command Input and Output Control Commands Initial Setup CommandsList of Equations Acceleration = MAX Speed Base Speed / TUP Page