10-17-2013 11:39 PM
I have an encoder with an A pulsetrain of 1440 pulses per revolution and a z pulse for indexing. I've got my code set up to retrigger on the z-pulse acquiring 1440 pulses and the A pulsetrain as the external clock. This seems to work great while turning it by hand, however my final application will be running up to 2000 rpm (33.3 rev/s) which gives about 30ms intervals for the z-pulse. So, I would like to know the maximum retrigger rate that a device can handle.
The only thing that I can find is that it will not trigger while still acquiring data (it will ignore the trigger and wait for the next one). By my calculations, given that the z-pulse rising edge is 25% offset from the A pulsetrain (i.e. in the middle of a trough of A), there will be about 10 microseconds between the last acquisition and the next trigger. Will this be an issue?
Hardware: USB-6353 (X-series)
Solved! Go to Solution.
10-18-2013 07:00 PM
Hi Nathan_B,
No, this should not be an issue. X-series devices have a 100MHz internal base clock, therefore the maximum trigger rate will be 10 nanoseconds. This should be plenty for your application.
10-18-2013 10:05 PM
Thanks Stephanie. I thought that was going to be the case but just wanted to make sure.
10-31-2013 09:23 PM - edited 10-31-2013 09:24 PM
Unfortunately, I'm seeing some issues here. I'm seeing discontinuity in the acquired waveform at the trigger point. The last point before the z-pulse is significantly different (both value an slope) from the next point acquired. The only thing that I can think of that is happening is that it's missing that trigger and waiting for the next one giving every other set of data. Unfortunately, I've not been able to determine if this is the case because I don't have something set up to give me different waveforms on consecutive rotations (meaning every other rotation would have the same signal and if it's skipping a rotation, I would get the same data on every dataset).
Also, this is only happening at higher RPMs. It seems to look fine at ~400 rpm but when I try ~1000rpm it shows these discontinuities. I've attached an image of my results.
Any help would be much appreciated.
11-01-2013 04:18 PM
Are you using the retriggerable property?
Trying to restart the task in software would give you the behavior you described. If this isn't the issue, you should post your code.
Best Regards,
11-01-2013 08:02 PM
Thanks for the reply. I am using the retrigger property but I think I found the problem. I narrowed it down to a subVI that I created that did a little processing on the data before displaying (some data shifting) and I was using the VI in two places and it uses an uninitialized shift register. So, by default it was non-reentrant meaning it was accessing the same memory causing a something like a race condition but much worse.
I was able to make them run independently which fixed the problem.