Anaheim CLCI2000 user manual WIN2000.BAS Program Listing, Anaheim Automation DLL Library Support

Page 24

WIN2000.BAS PROGRAM LISTING

Below is the file listing for the WIN2000.BAS declaration file including all the Declarations needed to use the DLL with Visual Basic for Windows.

'*---------------------------------------------------------------

'* ANAHEIM AUTOMATION DLL LIBRARY SUPPORT

'* DATE: DECEMBER 22, 1993

' *

Function Declarations

' *

----------------------------------------------------------*/

Declare Function BUSY Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer

Declare Function GET_INPUT Lib "win2000.dll" (ByVal address%, ByVal input_number%) As Integer

Declare Function GET_LO_MID_HI Lib "win2000.dll" (ByVal address%, ByVal axis%, ByVal setting&) As Integer Declare Function GO_CW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer

Declare Function GO_CCW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function HALT Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer

Declare Function HARD_INPUT_CCW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function HARD_INPUT_CW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function HOME_CCW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function HOME_CW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function HOME_INPUT Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function INDEX Lib "win2000.dll" (ByVal address%, ByVal axis%, ByVal setting&) As Integer Declare Function INITIALIZE Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer

Declare Function LIMIT_CONTROL Lib "win2000.dll" (ByVal address%, ByVal axis%, ByVal soft%, ByVal marker%, ByVal home%) As Integer

Declare Function MOTION Lib "win2000.dll" (ByVal address%, ByVal axis%, ByVal basespeed&, ByVal maxspeed&, ByVal rampvalue&) As Integer

Declare Function ONE_AT_MAX_CCW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function ONE_AT_MAX_CW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function ORIGIN_INDEX_CCW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function ORIGIN_INDEX_CW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function POSITION Lib "win2000.dll" (ByVal address%, ByVal axis%, ByVal setting&) As Integer Declare Function RAMP_TO_BASE_CCW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function RAMP_TO_BASE_CW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function RAMP_TO_STOP_CW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function RAMP_TO_STOP_CCW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function READ_ENCODER Lib "win2000.dll" (ByVal address%, ByVal axis%) As Long Declare Function READ_POSITION Lib "win2000.dll" (ByVal address%, ByVal axis%) As Long

Declare Function SET_ENCODER Lib "win2000.dll" (ByVal address%, ByVal axis%, ByVal setting&) As Integer Declare Function SET_OUTPUT_1 Lib "win2000.dll" (ByVal address%, ByVal out5%, ByVal out4%, ByVal out3%, ByVal out2%, ByVal out1%, ByVal a_home_dir%, ByVal b_home_dir%) As Integer

Declare Function SET_OUTPUT_2 Lib "win2000.dll" (ByVal address%, ByVal out10%, ByVal out9%, ByVal out8%, ByVal out7%, ByVal out6%, ByVal c_home_dir%, ByVal d_home_dir%) As Integer

Declare Function SET_POSITION Lib "win2000.dll" (ByVal address%, ByVal axis%, ByVal setting&) As Integer Declare Function SLEW_AT_BASE_CCW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function SLEW_AT_BASE_CW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function SOFT_INPUT_CCW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer

Declare Function SOFT_INPUT_CW Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer Declare Function WAIT_FOR_STOP Lib "win2000.dll" (ByVal address%, ByVal axis%) As Integer

21

Image 24
Contents CLCI2000 Series Limited Warranty CopyrightDisclaimer TrademarksTable of Contents Main Features DescriptionGeneral Description Packing InformationCLCI2004 Ordering InformationDPI65201 DPI65202AA37MFC-10 AA37MMC-6AA37MMC-10 AA2M37Specifications Installation Installing the BoardWiring to the CLCI2000 Address SettingsQuickstart with Quickbasic Connector Descriptions Clock Signals+5VDC Direction Signals Soft LimitHome Limit Hard LimitEncoder Inputs InputsOutputs Programming with Anaheim Automation Libraries Programming with Quickbasic or Visualbasic for DOSIndex ADR, Axis GO.CW ADR, Axis Speed ConsiderationsCLCISUB1.BAS Library ONE.AT.MAX.CCW ADDRESS, AXIS# ONE.AT.MAX.CW ADDRESS, AXIS#ORIGIN.INDEX.CCW ADDRESS, AXIS# ORIGIN.INDEX.CW ADDRESS, AXIS# RAMP.TO.BASE.CCW ADDRESS, AXIS#RAMP.TO.BASE.CW ADDRESS, AXIS# RAMP.TO.STOP.CCW ADDRESS, AXIS#SLEW.AT.BASE.CCW ADDRESS, AXIS# SLEW.AT.BASE.CW ADDRESS, AXIS#Sample #1 Program SAMPLE1.BAS on the CLCI2000 Disk Initialize ADDR,AXISTOP.OF.LOOP If GET.INPUTADDR,1 = 1 then Index ADDR,AXIS,5000Sample #2 Program SAMPLE2.BAS on the CLCI2000 Disk Initialize ADDR, AxisHOME.TYPE.1 LIMIT.CONTROL ADDR, AXIS, 0, 0CLCISUBS.CPP Program Function Definitions Oneatmaxccw ADDRESS, Axis Oneatmaxcw ADDRESS, AxisOriginindexccw ADDRESS, Axis Originindexcw ADDRESS, AxisSlewatbaseccw ADDRESS, Axis Slewatbasecw ADDRESS, AxisSoftinputccw ADDRESS, Axis Softinputcw ADDRESS, AxisUsing the CLCI2000 Indexer with Windows Using the DLL with Visual Basic for WindowsObject Command1Procedure Click Programming in WindowsWIN2000.BAS Program Listing Anaheim Automation DLL Library SupportCLCI2004 Program Generator Running the SoftwareFunction Window F1 Insert F3 DeleteF4- Terminal F5 SaveF1 Prog Stop F2 Single StepF3 Clear Program F4 Printing a ProgramCommand Window CLCI2004 Program Generator Command Dictionary Command SummaryCommand Dictionary Direction + orEncoder Resolution any number Encoder Window any integerFinish Move no value GO Index no valueJump to Line 1 to UNITS/SCALE any number Register # Bits Setting Range Description Base Setting not in HZMAX Setting not in HZ Ramp SettingCommand Buffer Register Description of Command Initial Setup Commands Input and Output Control CommandsList of Equations Acceleration = MAX Speed Base Speed / TUP Page