10-11-2012 12:28 AM
I need to know a USB module which can be used for pulse counting. The pulses are generated from an encoder attached with an stepper motor. It generates 15 pulses per step.Pulse amplitude is 0 to 5V. I am using a compact DAQ system (ni 9178).
10-16-2012
03:00 PM
- last edited on
01-31-2024
06:20 PM
by
migration-bot
Currently, the digital C Series modules with the highest front-end bandwidth are the 9401 and 9402. Either of these modules will take a 0-5V TTL signal and be able to route it to the backplane counters (there are 4 counters on the 9178). The module you choose will probably come down to whether you prefer DSUB/Screw Terminals (9401) or BNC connectors (9402). The number of available inputs is another consideration (8 on the 9401 vs. 4 on the 9402).
Best Regards,
10-16-2012 10:50 PM
Thanks John.That was helpful.However,myself being new to labVIEW;the concept of routing is not clear to me.Some examples says,I can perform counting operation even without a digital module by using onboard counters. Can you please elaborate how to do this?
Thanks.
Arihant
10-17-2012 10:21 AM - edited 10-17-2012 10:26 AM
The counters are on the cDAQ chassis backplane (there are 4 of them on the 9178). So, in order to use an external signal with the counters you would need a way to route the signal to the backplane. Your available options are:
1. Any digital I/O module with 8 or less lines on it (some modules are input-only or output-only--input modules can be used for counter input tasks only, output modules can be used for counter output tasks only). Modules with over 8 lines transfer the data serially to the chassis backplane and so do not support routing signals through to the counters.
2. The 2 PFI lines on the 9178 (I should have mentioned this earlier, this might be a good option for you to route your encoder pulses without having to purchase an additional module if you only need 2 inputs--that is, no Z index signal). The bandwidth on the chassis PFI lines is lower than that of the 9401 and 9402, I believe the chassis PFI lines should take signals up to ~1 MHz.
3. An analog module with triggering capabilities (at this time only the 9205 and 9206) can route a digital signal (the 9205 and 9206 have a PFI line) or an "analog comparison event" (see my post here) to the counter terminals.
In case 1 above, you configure this by selecting the counter using the module's name (e.g. "cDAQ1Mod2/ctr0"). Default input terminals will be used (check the device pinouts for your module in Measurement and Automation Explorer) or you can select which terminals to use for your inputs using a DAQmx channel property node.
In cases 2 and 3, you would need to select the counter as the internal backplane counter (e.g. "cDAQ1/_ctr0"). You will need to select which terminal your signal is coming from (since the internal backplane counter does not have default terminals. This same method can be used to count internal signals (e.g. sample clocks, counter outputs, etc.) without having to use any of the 3 routing options mentioned above.
Best Regards,
11-26-2012 04:50 AM
I have arranged a NI 9401 module and interfaced with an encoder. The encoder is supposed to give 3000 pulses per revolution and it is giving near about the same value. But the real problem arises when encoder is connected to stepper motor (step size 1.8 degree).
As the motor will take 200 steps for one revolution, one step of motor should generate 3000/200=15 pulse count from encoder. But it is giving a count of around 500 to 600 in X4 encoding mode (with both index pulse enabled and disabled).
to crosscheck, I used "count digital events.vi" from example finder and connected A pulse and B pulse to separate counter of 9401. They are showing different count per step (500 and 700 respectively).
Please suggest any mistake that I might be commiting.
11-29-2012 05:13 PM - edited 11-29-2012 05:17 PM
I'd suggest scoping your A and B signals.
If they are noisy (which it sounds like they are), I'd suggest using the PFI filter to remove the noise (if you can determine the underlying issue responsible for the noise then by all means correct for this as well). You can turn on the PFI filters with a DAQmx channel property node, the MinPulseWidth is configurable in 10 ns increments and should be based on the observed noise with consideration for the minimum desired pulse width that you want to pass through:
(EDIT: The 10 ns filter resolution is for X Series devices--refer to the 917x manual linked above for information on how digital filtering is implemented for your hardware. As the 917x has an 80 MHz timebase the maximum resolution is 12.5 ns rather than 10 ns).
Best Regards,