> To: [email protected]
> From: [email protected]
> Date: Sat, 24 May 2014 18:46:22 -0700
> CC: [email protected]
> Subject: Re: [Xenomai] Troubleshooting Analogy DIO
>
> Manu S Madhav <[email protected]> writes:
>
> > One more question: Is anyone aware of an analogy implementation for
> > using the DAQ counter for quadrature encoding? E.g. by using the
> > A4L_INSN_CONFIG_GPCT_QUADRATURE_ENCODER instruction.
>
> I know it works in Comedi, but have not tried it in Analogy. You may
> have to snarf some bit definitions from comedi.
>
> Try INSN_CONFIG, with two data
> { A4L_INSN_CONFIG_SET_COUNTER_MODE,
> NI_GPCT_COUNTING_MODE_QUADRATURE_X4_BITS |
> NI_GPCT_COUNTING_DIRECTION_HW_UP_DOWN_BITS
> }
>
> and then again to arm the counter:
> { A4L_INSN_CONFIG_ARM, NI_GPCT_ARM_IMMEDIATE }
>
> Then you should be able to get the counter value back with
> a4l_sync_read.
>
> A4L_INSN_CONFIG_GPCT_QUADRATURE_ENCODER appears to be a half-baked
> sensoray only thing.
>
> -- Paul
>
I was not able to use the counter for quadrature encoder with NI m-series DAQ
card.I ended up using "quadrature clock converter" chip along with the encoder
and implemented simple counting functionality.
INSN_CONFIG with {A4L_INSN_CONFIG_SET_COUNTER_MODE,
NI_GPCT_COUNTING_MODE_NORMAL_BITS | NI_GPCT_COUNTING_DIRECTION_HW_UP_DOWN_BITS}
Let me know if you have any luck with quadrature encoder mode.
-Rosali
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai