Jump to content

two conter syncronization on PCI 6221


Max1971

Recommended Posts

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.

Link to comment

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.

Link to comment

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...

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.