buttons Posted May 21, 2009 Share Posted May 21, 2009 Hello, I want to measure the rpm of a stirring device for one of my machines. I am trying to use a timer to do this. I have attached the transducer to port EI00 which is channel 8, and therefore my timer offset is 8. I have the following sequence. using("device.labjack.") include("C:\program files\labjack\drivers\labjackud.h") while (1) 1) AddRequest(0, LJ_ioPUT_CONFIG, LJ_chTIMER_COUNTER_PIN_OFFSET, 8, 0, 0) 2) AddRequest(0, LJ_ioPUT_TIMER_MODE,0, LJ_tmRISINGEDGES32, 0, 0) 3) AddRequest(0, LJ_ioPUT_CONFIG, LJ_chTIMER_CLOCK_BASE, LJ_tc48MHZ_DIV, 0, 0) 4) AddRequest(0, LJ_ioPUT_CONFIG, LJ_chTIMER_CLOCK_DIVISOR, 48, 0, 0) 5) AddRequest(0, LJ_ioPUT_CONFIG, LJ_chNUMBER_TIMERS_ENABLED, 1, 0, 0) GoOne(0) endwhile I have some basic questions first: on line 2 : after MODE, it wants me to specify Timer #...is that a zero if I have only one enabled? ALso, what is the difference between using RISINGEDGES or FALLINGEDGES? DO I have to use both? on line 5 : is the 1 correct after enabled? Next I made a channel called timer to read my data. For I/O type i said timer and for channel number it won't let me put 8, so I put 0. Is this correct? I then made a variable value component to read timer and I don't get any data coming out. Thanks for all your help. Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.