
MDrive Example Program
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 'MDRIVE DEMO PROGRAM 'Last modified 08/25/2016 'Sample test program for demonstration purposes only 'Not tested or verified for safety or any function CP 'preclear program memory '******Global Setup Parameters**** S1=16,1,0 'O1-4 Set as GP, High Active, Sinking S2=16,1,0 S3=16,1,0 S4=16,1,0 '******Main Program********* PG 1 LB aa CL xx, R1<15 'Call sub xx R1 less than 15 CL zz, R1=15 'Call sub zz R1 equal 15 BR aa '******Subroutines********* LB xx 'sub increments R1, moves motor R1=R1+1 'multiple of R1 value Ol=R1 'sets output group to R1 H 1000 MR R1*100000 H RT LB zz 'sub resets R1 to 0 R1=0 'to restart process RT E PG S 'keep this line |