- From: Jordi Blanch Carles <jordi_blanch_at_encopim.com>
- Date: Thu, 15 Feb 2007 12:18:20 +0100
Hi Klaas. Thanks for your fast response. I've been reading the NI-660X Register Level Programmer Manual, and it tells that in X1 mode the counter can be configured to be reset on index pulse. It doesn't tell specifically that in X2 and X4 modes the index pulse will also reset the counter. We have configured it in this X1 mode and it works properly, the counter has been reset on index pulse. I'll ask NI whether the index pulse only works on X1 mode or not, and send their response to the comedi list. Thanks again. El dj 15 de 02 del 2007 a les 09:55 +0100, en/na Klaas Gadeyne va escriure: > On Wed, 14 Feb 2007, Jordi Blanch Carles wrote: > > Hi all. > > > > We are using a NI 6601 to count encoder pulses. We have configured > > the counter 0 as a quadrature encoder with X4 mode and counter reset on > > index. All works well, but on index pulse there is no reset of the > > counter. > > > > Does anybody know something about this problem? > > I don't think I ever tested that part of the functionality. Can you > show the relevant lines of code where you configure the counter? > > I'd suspect something like > > insn[1].insn=INSN_CONFIG; > insn[1].n=0; // Irrelevant for config > config_data[0] = INSN_CONFIG_GPCT_QUADRATURE_ENCODER; > [...] > config_data[3] = GPCT_RESET_COUNTER_ON_INDEX; > [...] > > Which should (according to a quick glimpse in the code > (ni_660x_GPCT_insn_config) result in setting the index_mode bit in the > counting mode register ( see the ref manual on pages 3.21/22 ). > > It states (when in quadrature mode) > <quote> > The Z input signal, or index, can reload the counter in a particular > phase. The counter reloads when this bit is set, A and B match the > index phase, and the Z input in high > </quote> > > I don't know what they mean with "A and B match the index phase", but > maybe that's the problem... > > ps. Note that Frank (completely) rewrote the the counter code > recently, so I guess you're not using the latest anoncvs? > > regards, > > Klaas > -- Jordi Blanch Carles Unidad de Ensayo y Control ENCOPIM S.L. C/. del Parc, 5 (nave 13) P.I. Els Pinetons E-08291 RIPOLLET (Barcelona) Tel: (+34) 935 94 23 47 Fax: (+34) 935 94 64 15 ========================================================== La información contenida en la presente transmisión es confidencial y su uso únicamente está permitido a su(s) destinatario(s). Si Ud. no es la persona destinataria de la presente transmisión, rogamos nos lo comunique de manera inmediata por teléfono (+34 935 942 347) y destruya cualquier copia de la misma (tanto digitales como en papel). The information contained in this transmission is confidential and is intended only for the use of the addressee(s). If you are not the designated recipient of this transmission, please advise us immediately by telephone (+34 935 942 347) and destroy any copies (digital and paper). ======================================================
Received on 2007-02-15Z11:18:20