'***This program demonstrates how to set up an input trip '***capture. Every time TC activates R1 increments and prints. R1=0 'init R1 to 0 S13=60,0,0 'set input 13 for high speed TC input Fc=9 'filter input 13 for 12.9uS PG 1 LB su OE e1 'on error call e1 P=0 'set position counter to 0 Tc=k2 'set up input trip Te=4 'trip on capture (I/O 13) enable LB k1 H 100 'busy loop BR k1 E 'program end LB k2 'sub called on input trip IC R1 'increment R1 PR "R1=",R1 Te=4 'reenable trip RT 'return E LB e1 'this sub is called on any error PR "Error=",Er Er=0 RT E PG S