Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

use z input pulse to trigger output

Hi,

I have a shaft encoder connected to an NI 9401 in a 9174 chassis. Is there an example VI on how to use the z input pulse to produce a TTL output square wave?

Thanks

0 Kudos
Message 1 of 10
(3,671 Views)

Hey Eluan,

 

If I understand correctly you want to use the Z output of the encoder to trigger a single TTL pulse.  This should be doable using the following example: https://decibel.ni.com/content/docs/DOC-25159

 

We will need to set the trigger settings to retriggerable, and choose the correct input line that the Z index is being read on.  

 

I hope that helps!

 

 

J Newk
Systems Engineer
National Instruments
0 Kudos
Message 2 of 10
(3,655 Views)

Hi,

I have labview 8.6. Can you send me the example using the 8.6 version of labview.

My task is a relatively simple one.I want to trigger my camera every one revolution. I have a shaft encoder with an A, B and Z output. I also have the 9401 module and the cdaq 9174 chassis. If you can send me a vi that can do this on labview 8.6, that would be very much appreciated.

 

Thanks a lot for your assistance

0 Kudos
Message 3 of 10
(3,650 Views)

Hi,

I have labview 8.6. Can you send me the example using the 8.6 version of labview.

My task is a relatively simple one.I want to trigger my camera every one revolution. I have a shaft encoder with an A, B and Z output. I also have the 9401 module and the cdaq 9174 chassis. If you can send me a vi that can do this on labview 8.6, that would be very much appreciated.

 

Thanks a lot for your assistance

 

And to clarify, my camera is not an IMAQ camera. I just want to output one TTL puls for every 1 z input pulse from the shaft encoder. My experiment is going to be running at 1667 rpm so I would want 1667 pulses every minute. 1 pulse for every revolution.

0 Kudos
Message 4 of 10
(3,649 Views)

Hey Eluan,

 

I have converted the example to LabVIEW 8.6 for you.

 

I hope that helps!

J Newk
Systems Engineer
National Instruments
0 Kudos
Message 5 of 10
(3,637 Views)

Hi,

I configured the front panel of the VI as such:

 

Counter:

CDAQ2Mod1/ctr0

 

Output terminal

CDAQ2Mod1/PFI3 whcih is the output of counter 0

 

Digital trigger source

CDAQ2Mod1/PFI1 which is the Z channel or index of my shaft encoder

 

I am getting the error that lines 0 through 3 are configured for input only. What changes can I make to rectify the error?

 

Thanks for your help

0 Kudos
Message 6 of 10
(3,625 Views)

I have changed my output to counter 1 and it works. However, it doesnt quite do what I expect. It just gives me a single 5 Volt pulse that continues till I stop the program.

What I want is a VI that can give me one 5 volt pulse for every 1 trigger signal from the Z index of my shaft encoder. When I connect the pulse to an oscilloscope, I want a pulse train where one pulse represents one revolution of my shaft and is triggered by the z index from the shaft encoder. I have attached an image. Thanks for your help

 

0 Kudos
Message 7 of 10
(3,623 Views)

To clarify, What I observed is either one single pulse when its not retriggerable or one continous pulse when it is retriggerable.

Could you help me modify the vi so it produces one single pulse for every one sz index trigger. Maybe put it in a loop or something like that. Otherwise, is there another vi that can accomplish this?

Thanks

0 Kudos
Message 8 of 10
(3,619 Views)

Elaun,

 

When you run the counter output task is the shaft encoder continuously spinning or are you feeding it a single pulse from a known source?

 

Another thing we can try is to have the generation trigger on the falling edge of the z index of the encoder.

 

I hope that helps!

J Newk
Systems Engineer
National Instruments
0 Kudos
Message 9 of 10
(3,599 Views)

The shaft encoder is continously spinning. I put the single pulse vi into a loop and that seems to be working. Thanks a lot for your help. I really appreciate it.

0 Kudos
Message 10 of 10
(3,586 Views)