Re: NI PCI-6221 encoder (Was: JR3 force sensor driver)

Arno Stienen wrote:
> insn.insn       = INSN_CONFIG;
> insn.n          = 1; // Is relevant to config! :)
> config_data[0]  = INSN_CONFIG_GPCT_QUADRATURE_ENCODER;
> config_data[1]  = quadraturemode; // {GPCT_X1, GPCT_X2, or GPCT_X4}
> config_data[2]  = indexphase; // {GPCT_IndexPhaseHighHigh,LH,LL,HL}
> config_data[3]  = indexreset; // {0,GPCT_RESET_COUNTER_ON_INDEX}
> insn.data       = config_data;
> insn.subdev     = subdev;
> insn.chanspec   = CR_PACK(channel,0,0);
Small thought: if we decide to use this interface for encoders, 
shouldn't initial_value/reload_value be part of the interface?

N.B. Some care has to be taken with the NI timers since default seems to 
be to alter between reload value A/B on each index reload.

Regards

Anders Blomdell

Received on 2007-06-28Z16:28:26