Go to the documentation of this file.00001 CLOSE
00002
00003 ;####################################################
00004 ; Generic program for moving any co-ordinate system
00005 ; Original Author: Tom Cobb
00006 ; Used variables: Q71..Q79, Q81..Q89
00007 ; You should do a $$$ or type the following the first time you load this prog.
00008 ; If you type the commands in, ignore any errors. If you $$$, PLC1 will do it
00009 ; automatically for you at startup:
00010 ;&16 DEFINE LOOKAHEAD 50,10
00011 ;&15 DEFINE LOOKAHEAD 50,10
00012 ;&14 DEFINE LOOKAHEAD 50,10
00013 ;&13 DEFINE LOOKAHEAD 50,10
00014 ;&12 DEFINE LOOKAHEAD 50,10
00015 ;&11 DEFINE LOOKAHEAD 50,10
00016 ;&10 DEFINE LOOKAHEAD 50,10
00017 ;&9 DEFINE LOOKAHEAD 50,10
00018 ;&8 DEFINE LOOKAHEAD 50,10
00019 ;&7 DEFINE LOOKAHEAD 50,10
00020 ;&6 DEFINE LOOKAHEAD 50,10
00021 ;&5 DEFINE LOOKAHEAD 50,10
00022 ;&4 DEFINE LOOKAHEAD 50,10
00023 ;&3 DEFINE LOOKAHEAD 50,10
00024 ;&2 DEFINE LOOKAHEAD 50,10
00025 ;####################################################
00026
00027 ;This program defines the program needed to do a move using the motor record
00028 ;on a CS axis
00029 ;to do a move we need to do &{CS}R
00030 ;to stop a move we need to do &{CS}A
00031 ;demand values are in &{CS}Q71..79
00032 ;The following are set by the motor record:
00033 ;Isx87 = Acceleration
00034 ;Isx88 = S curve
00035 ;Isx89 = Feedrate
00036
00037 ; Set some defaults for all CS axes
00038 i5213,15,100=50 ; segmentation time (needed for lookahead)
00039 i5220,15,100=50 ; lookahead length (needed to limit max velocity to max set in CS)
00040 i5250,15,100=1 ; Enable kinematics
00041
00042 OPEN PROG 10
00043 CLEAR
00044 LINEAR
00045 ABS
00046 ; need to think about the consequences of including all axes in frax
00047 FRAX(A,B,C,U,V,W,X,Y,Z)
00048 A(Q71)B(Q72)C(Q73)U(Q74)V(Q75)W(Q76)X(Q77)Y(Q78)Z(Q79)
00049 DWELL0
00050 CLOSE
00051