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 | '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 '========================================== ' This program uses a trip on position to ' reset the position counter every 100000 ' encoder counts. '========================================== Ee=1 'enable encoder P=0 'init pos counter S1=6,0,0 'configure as pause/resume S4=18,0,0 'configure as fault output PG 1 LB su Tp 100000,fj 'on position trip call fj Te=2 'enable trip SL 3000 'continuous slew H E 'program end LB fj P=0 'reset postion counter PR "reset" 'just here to show it's been called Te=2 'reenable position trip RT 'return PG S 'keep line |