02-07-2008 06:06 PM
02-08-2008 05:09 PM - edited 02-08-2008 05:10 PM
02-11-2008 10:24 AM
Thanks for the response. This one has really got me confused and any help is greatly appreciated.
To answer your questions, no I have not modified the sample program and I'm using NI DAQ v8.5.
I've decided to break the problem down to see if I could find a pattern, but no such luck. Here is the testing that I've done.
I'm making the following connections while using the sample program I mentioned earlier:
Counter 0...............PFI_39 (term 02) - Channel_A(0).................PFI_37 (term 40) - Channel_B(0)
Counter 1...............PFI_35 (term 07) - Channel_A(1).................PFI_33 (term 06) - Channel_B(1)
Counter 2...............PFI_31 (term 34) - Channel_A(2).................PFI_29 (term 66) - Channel_B(2)
Counter 3...............PFI_27 (term 31) - Channel_A(3).................PFI_25 (term 63) - Channel_B(3)
Note: I connect the "Z" channel for gating purposes in my VB application, but this isn't required in the LabView sample program since the gating appears to be done internally.
My testing results:
1. If I jumper my one encoder to channels 0,1,2, & 3 at the same time, everything works great. Each channel reports the same number of counts regardless of whether I'm turning the encoder in the positive or negative direction.
2. If I disconnect channel 3 and only have 0,1 & 2 connected, then 0 & 2 track perfectly, but channel 1 looses counts in the negative direction.
3. If I only connect channels 0 & 1, then channel 0 counts perfectly in both the pos and neg direction, but channel 1 looses counts in the negative direction.
4. If I connect any channel by itself (0,1,2 or 3), each one counts perfectly.
5. If I connect channels 0 & 4, everything seems to be fine.
Like I said in my previous e-mail, if this hadn't already happened to me in a previous application, then I would chalk it up to a bad board. If I didn't get good results on each individual channel then I would chalk it up to a bad encoder pulse train. However, it definitely seems to have something to do with connecting multiple counters at the same time in a Motion Encoder Application. I have read the 6602 User Manual backwards and forwards looking for a nugget of explanation, but have found none. There was a section entitled "Counter Input Selections" on page 4-12 (table 4-2) that might offer some explanation, but neither me or my colleagues could understand what was being described. Any help deciphering that would be appreciated.
As of now, I'm going to proceed with my application, using channels 0 &4 (just as I've done in the past), however I don't feel comfortable not having an explanation for the 6602's behavior. Any insight would be greatly appreciated.
02-12-2008 06:39 PM
Hello drichey,
I have been investigating this issue with an identical setup and I’ve been able to partially reproduce your results. I’ve confirmed that connecting four counters: ctr. 0, 1, 2, and 3 to the same encoder works correctly and that if I disconnect counter 3 then I get incorrect readings from at least two (if not all three) of the remaining counters (0, 1, and 2).
I know that on the PCI-6602 there is some internal pairing between counters 0 and 1, 2 and 3, 4 and 5, and 6 and 7 for making more complex measurements, and it’s possible they are interfering with your measurements. Can you run your tests using channels: 0, 2, 4, and 6 the same way you did with 0, 1, 2, and 3? I haven’t been able to verify that this pairing is the problem, but if you can confirm that it works or doesn’t work with these even numbered channels then it can help determine the cause of this strange behavior.
I will be looking into using one encoder for each counter to see if I can eliminate the input signals as the problem. Please reply back with the results of the even numbered counter channels so that we can further troubleshoot.
Have a good night!
02-13-2008 03:37 PM
Thank you for showing interest in my problem.
I did what you asked and connected channels 0,2,4&6 to the same encoder input. I tested in both directions (pos & neg) and didn't seem to have a problem when monitoring channels 0,2 & 4. The counts were the same each time. However, when I monitored 0,2 &6 I noticed that channel 6 fell short (in counts) each time in the negative direction. It was fine in the positive direction. (I DID have all four counters connected the entire time, I could only monitor 3 at a time because that is what the sample LabView program is set up for. No big deal.)
I noticed in the 6602 User Manual that it made reference to the "counter pairs" you are talking about, but the manual does not elaborate about any conflicts that might occur between the channels. I would appreciate any explanation you can provide for this behavior.
Thanks again.
02-14-2008 06:48 PM
Hello drichey,
Can you tell me which example code you are using so that I can try it with the same code?
In my tests I was using the Measure Angular Position.vi example from the example finder (located in this folder: Hardware Input and Output> DAQmx> Counter Measurements> Position> Measure Angular Position.vi). I copied this code 4 times on the block diagram so that I could read all 4 counters. Using this I was able to replicate the erratic behavior you described, but I was losing more than just counts from one of the counters in one direction so I wanted to see if that difference was caused by hardware or software.
Please let me know if you are using the example Hani suggested, the example code you found on the forums, or something else. If you are using the code you found on the forums can you provide a link to it so I can get it as well?
Cheers,
02-15-2008 08:11 AM
02-18-2008 01:44 PM
Hello drichey,
I was able to correct all of the strange behavior by connecting the ground of my quadrature encoder to the ground of my PCI-6602. If this is your problem you should be able to correct it by connecting the ground of the quadrature encoder to any of the "D GND" pins on the PCI-6602. Without this ground connection the signal from the quadrature encoder was floating relative to the measurement the 6602 was making and so the digital counts were erratic.
Let me know if this issue persists after making the ground connection.
Have a good afternoon!
02-19-2008 10:07 AM - edited 02-19-2008 10:07 AM
02-19-2008 11:29 AM