01-29-2008 04:31 AM
01-29-2008 08:35 AM
Hi Ash-
You need to set the G0_Up_Down bitfield to either kG0_Up_DownHardware or kG0_Up_DownHardware_Gate. Your current setting relies on software and ignores the hardware up/down signals you have selected. More info can be found in the TIO RLP manual.
Hopefully this helps-
01-29-2008 09:13 PM
01-29-2008 10:27 PM
Hello Tom
I've been doing something stupid. I should have illustrated the sample gpctex2.cpp. That is exactly what I have needed to test with.
I found that for the up/down counting on B input, you don't need to configure the Gate select:
// board->G0_Input_Select.setG0_Gate_Select(2); //PFI1=2 ---> This is wrong
board->G0_Input_Select.setG0_Gate_Select(31); // Low=31 --> should gate to low
board->G0_Input_Select.setG0_Gate_Select_Load_Source(0);
board->G0_Input_Select.setG0_Output_Polarity(0); //active high=0
board->G0_Input_Select.setG0_OR_Gate(0);
board->G0_Input_Select.flush();
And you shouldn't configure source input as A
board->G0_MSeries_ABZ.setG0_A_Select(1); --> this was wrong and should be commented
board->G0_MSeries_ABZ.setG0_B_Select(2);
board->G0_MSeries_ABZ.flush();
I'm sorry for this fuss. I could get efficient information about counter/timer anyway.
Thanks
Ash