10-27-2006 02:57 PM
11-02-2006
12:42 PM
- last edited on
04-09-2025
05:18 PM
by
Content Cleaner
Hi Greg-
As David mentioned in your other thread, NI does not maintain or support the Comedi driver directly. That being said, a buffered event counting example is provided in the NI MHDDK examples for 660X boards. This should be a good starting point to add external clocking via RTSI to your encoder app.
Hopefully this helps-
11-03-2006 09:47 AM
11-03-2006 01:58 PM - edited 11-03-2006 01:58 PM
Message Edited by Elijah K on 11-03-2006 02:02 PM
11-17-2006
03:59 PM
- last edited on
04-09-2025
05:18 PM
by
Content Cleaner
Hi Greg,
I noticed one issue you might encounter with your code. When you merged this section of code from gpct_ex7.cpp
//set the counting mode to quadrature encoding X4
board->G0_Counting_Mode_Register.setG0_Encoder_Counting_Mode(3);
board->G0_Counting_Mode_Register.writeG0_Index_Phase(3);
you removed the second line:
//set the counting mode to quadrature encoding X4
board->G0_Counting_Mode_Register.setG0_Encoder_Counting_Mode(3);
The first line relies on the second to actually write the value to hardware. "Set" only writes the value to the softcopy and doesn't transfer it to the hardware, as described in KnowledgeBase 2REGTNPG: How to Use a ChipObject .
You should probably change it to
board->G0_Counting_Mode_Register.writeG0_Encoder_Counting_Mode(3);
so it actually gets written to hardware.
Have you encountered any problems with the code?
11-22-2006 03:10 PM