Max1971 Posted June 26, 2008 Report Share Posted June 26, 2008 Hello to everybody, I'm trying to make a gear ratio measurement and I need two encoders to read gearbox input and output position. The problem is to syncronize both start and read operation without using external signals and, hopefully, usign only Daqmx commands. Attached you will find an example of what I'm trying to do. I've found many examples on the net regarding synconism between AI, AO, AI and Counter, etc. but nothing about two counters. Thanks a lot for answers. Quote Link to comment
jdunham Posted June 26, 2008 Report Share Posted June 26, 2008 QUOTE (Max1971 @ Jun 25 2008, 06:06 AM) I've found many examples on the net regarding synconism between AI, AO, AI and Counter, etc. but nothing about two counters. You are on the right track. I don't see why those examples shouldn't help, though I could be more specific if you had links to those examples. The main reason DAQmx is better than the old driver is that the same functions work whether your tasks are AI, AO, or Counters. Int the DAQmx example ...\LabVIEW 8.5\examples\DAQmx\Synchronization\Multi-Function.llb\Multi-Function-Ctr Retrigg Pulse Train Generation for AI Sample Clock.vi, you can see that the counter channel starts counting based on a trigger from another task. You should be able to use that same subvi (...\vi.lib\DAQmx\configure\trigger.llb\DAQmx Start Trigger (Digital Edge).vi) to start your counter task from another counter task's start or input signal. Good luck. Quote Link to comment
Max1971 Posted June 27, 2008 Author Report Share Posted June 27, 2008 QUOTE(jdunham @ Jun 25 2008, 08:40 PM) You are on the right track.I don't see why those examples shouldn't help, though I could be more specific if you had links to those examples. The main reason DAQmx is better than the old driver is that the same functions work whether your tasks are AI, AO, or Counters. Int the DAQmx example ...\LabVIEW 8.5\examples\DAQmx\Synchronization\Multi-Function.llb\Multi-Function-Ctr Retrigg Pulse Train Generation for AI Sample Clock.vi, you can see that the counter channel starts counting based on a trigger from another task. You should be able to use that same subvi (...\vi.lib\DAQmx\configure\trigger.llb\DAQmx Start Trigger (Digital Edge).vi) to start your counter task from another counter task's start or input signal. Good luck. Probably I don't have the right basefloor about NIdaq and timing/triggering features, but I don't understand exactly what I have to do... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.