08-13-2008 06:12 PM
What is the definition for the G0_MSeries_ABZ and G1_MSeries_ABZ registers? I've seen in the examples for configuring the counters for quadrature encoder inputs the following:
//Enable Input Pins
board->G0_MSeries_ABZ.setG0_A_Select(9); //PFI8=9,
board->G0_MSeries_ABZ.setG0_B_Select(21); //PFI10=21
board->G0_MSeries_ABZ.setG0_Z_Select(10); //PFI9=10
board->G0_MSeries_ABZ.flush();
However, if I want to configure the second counter for quadrature encoder inputs as well, what value do I need to pass to setG1_A_Select(??), setG1_B_Select(??), and setG1_Z_Select(??)?
Also, I understood that you had to use PFI8 for CTR0.A, PFI10 for CTR0.B, PFI3 for CTR1.A, and PFI11 for CTR1.B -- if so then why do we even need to configure which pin to use here at all?
Thanks,
AJ
08-15-2008 01:26 PM
Hi AJ-
The bitfield values for each of those inputs are determined according to this enum:
The values you listed for "default" values are the defaults used by DAQmx. Those values are automatically written to the ABZ bitfields when the board is configured by DAQmx. The same settings need to be made manually when you are configuring and initializing the board in your own driver.
Hopefully this helps-