Go to the documentation of this file.00001
00002 CLOSE
00003
00004 ;####################################################
00005 ; Program for use with CS_QCM.pmc ONLY to initiate co-ordinate system move
00006 ; Original Author: Pete Leicester
00007 ; Used variables: Q71..Q79, Q81..Q89
00008 ; You should do a $$$ or type the following the first time you load this prog.
00009 ; If you type the commands in, ignore any errors. If you $$$, PLC1 will do it
00010 ; automatically for you at startup:
00011 ;&16 DEFINE LOOKAHEAD 50,10
00012 ;&15 DEFINE LOOKAHEAD 50,10
00013 ;&14 DEFINE LOOKAHEAD 50,10
00014 ;&13 DEFINE LOOKAHEAD 50,10
00015 ;&12 DEFINE LOOKAHEAD 50,10
00016 ;&11 DEFINE LOOKAHEAD 50,10
00017 ;&10 DEFINE LOOKAHEAD 50,10
00018 ;&9 DEFINE LOOKAHEAD 50,10
00019 ;&8 DEFINE LOOKAHEAD 50,10
00020 ;&7 DEFINE LOOKAHEAD 50,10
00021 ;&6 DEFINE LOOKAHEAD 50,10
00022 ;&5 DEFINE LOOKAHEAD 50,10
00023 ;&4 DEFINE LOOKAHEAD 50,10
00024 ;&3 DEFINE LOOKAHEAD 50,10
00025 ;&2 DEFINE LOOKAHEAD 50,10
00026 ;####################################################
00027
00028 ;This program defines the program needed to do a move using the motor record
00029 ;on a CS axis
00030 ;to do a move we need to do &{CS}R
00031 ;to stop a move we need to do &{CS}A
00032 ;demand values are in &{CS}Q71..79
00033 ;The following are set by the motor record:
00034 ;Isx87 = Acceleration
00035 ;Isx88 = S curve
00036 ;Isx89 = Feedrate
00037
00038 ; Set some defaults for all CS axes
00039 i5213,15,100=50 ; segmentation time (needed for lookahead)
00040 i5220,15,100=50 ; lookahead length (needed to limit max velocity to max set in CS)
00041 i5250,15,100=1 ; Enable kinematics
00042
00043 OPEN PROG 10
00044 CLEAR
00045 LINEAR
00046 ABS
00047 ; For QCM we must only allow two axis to be included in the FRAX otherwise the wrong velocity results
00048 ; NB Q20 = 0 indicates Energy and EnergyOffset compound motors (i.e. bragg2=bragg1+offset)
00049 ; Q20 = 1 indicates Independent energy axis (i.e. independent bragg1 and bragg2)
00050 IF (Q20=0)
00051 FRAX(A,B,C,U,V,W,X,Y)
00052 ELSE
00053 FRAX(A,B,C,U,V,W,X,Z)
00054 ENDIF
00055 A(Q71)B(Q72)C(Q73)U(Q74)V(Q75)W(Q76)X(Q77)Y(Q78)Z(Q79)
00056 DWELL0
00057 CLOSE
00058