Liberty* MCodeMDrive MCode
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 38 39 40 41 42 | 'LIBERTY* MDRIVE DEMO PROGRAM 'Last modified 02/21/2013 'Sample test program for demontsration purposes only 'Not tested or verified for safety or any function '[VARIABLES] Ee=1 Sf=30 '[PROGRAMS] 'Main program will assign 'a register to do math on 'the value of the analog 'input and slew the register 'value. An on-error event 'calls a subroutine to register 'stall PG 1 LB Su OE X1 Er=0 R1=I5 R1=R1*50 SL R1 PR V H 250 BR Su E '[SUBROUTINES] 'on error routine LB X1 PR "Error! " Er LB Y1 BR Y2,Er <> 86 PR "Stall" LB Y2 Er=0 E PG ' End of Program S 'Keep this line to save program on load |
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 38 39 40 41 42 | 'MDRIVE DEMO PROGRAM 'Last modified 02/21/2013 'Sample test program for demontsration purposes only 'Not tested or verified for safety or any function '[VARIABLES] Ee=1 Sf=30 '[PROGRAMS] 'Main program will assign 'a register to do math on 'the value of the analog 'input and slew the register 'value. An on-error event 'calls a subroutine to register 'stall PG 1 LB Su OE X1 Er=0 R1=I5 R1=R1*200 SL R1 PR V H 250 BR Su E '[SUBROUTINES] 'on error routine LB X1 PR "Error! " Er LB Y1 BR Y2,Er <> 86 PR "Stall" LB Y2 Er=0 E PG ' End of Program S 'Keep this line to save program on load |