LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

internal clock as gate signal

Hello,

I'm a absolute beginner with LabView. (Hope I don't bother you with my simple question.)

I found the following example, which is exactely what I need:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E0CB56A4E034080020E74861

But I don't know how to use an internal clock as gate signal. Can you help me?

Thanks,
you.did
0 Kudos
Message 1 of 21
(4,762 Views)
Hello you.did,

What clock would you like to use as a gate? The timebase? Try setting the Gate Specification control to "RTSI0", then use a Route Signal.vi as shown in the attached image to route the onboard clock to RTSI0.

Alternateively, I would recommend using DAQmx to program this board. There is a similar example program in the Example Finder (Help >> Find Examples from LabVIEW). Browse to Hardware Input and Output >> DAQmx >> Counter Measurements >> Position >> Meas Angular Position-Buffered-Cont-Ext Clk.vi. In this example, simply set the "Sample Clock Source" control to "Dev5/20MHzTimebase" or whichever timebase you would like to use.

Let me know if you have any further questions.

Regards,
Sean C.
0 Kudos
Message 2 of 21
(4,743 Views)
Hello Sean,

Thanks for your reply. I tried both methods you suggested but did not succeed anyway. In fact I have no idea what clock/timebase I need and what clock/timebase there are. (I try to read the input of two interferometers with an PCI-6602 card.)

When I do it like in your attached example the following error occurs:
Error -10341 occurred at Route Signal
NI-DAQ LV: The RTSI or PFI signal/line cannot be connected as specified.

I also tried the NI-example. There was a error saying:
Error -200141 occurred at DAQmx Read (Counter 1D U32 1Chan NSamp).vi
Possible reason(s): Data was overwritten before it could be read by the system.
If Data Transfer Mechanism is Interrupts, try using DMA. Otherwise, divide the input signal before taking the measurement.

What can I do now?

Thanks,
Judith
0 Kudos
Message 3 of 21
(4,739 Views)
Hi Judith,

It sounds like the internal clock that you are using for your "Sample Clock Source" is too fast for this application. Try running the VI with the "Timing Parameters" set as shown in the attached image. The "Channel Parameters" values may be different depending on the device number of your 6602, and the type of encoder that you are using. Does this still generate an error?

If this clock is also too fast for your application, you will have to generate a pulse train in a different counter and use that as a "Sample Clock Source" or use some external source to clock your VI.

I hope this helps. Let me know if you have any further questions.

Regards,
Sean C.
0 Kudos
Message 4 of 21
(4,712 Views)
Hi Sean,

unfortunately your solution does not work. There ist an error saying, that the specified route cannot be satisfied, because the hardware does not support it.

How can I "generate a pulse train in a different counter and use that as a "Sample Clock Source" or use some external source"???

Thanks for your help,
Judith
0 Kudos
Message 5 of 21
(4,705 Views)
Hi Judith,

Try opening a fresh instance of Meas Angular Position-Buffered-Cont-Ext Clk.vi and running it with the Timing Parameters set as shown in the previous post. Make sure that the "Counter(s)" and "Sample Clock Source" controls are set to the correct device number. (In the image, "Dev1" is the name of my board in MAX.)

Does this work for you?

Regards,
Sean C.

Message Edited by Sean C. on 05-18-2005 06:15 PM

Message Edited by Sean C. on 05-18-2005 06:15 PM

0 Kudos
Message 6 of 21
(4,691 Views)
Hi Sean,

in my application the device number is 1, too. I tried it with a fresh instance of the exemple and the same error occured. But I just realized that I can choose the 100kHz timebase in the test penal of 6602 and there it works!?

Regards,
Judith
0 Kudos
Message 7 of 21
(4,673 Views)
Hi Judith,

I apologize, you cannot route the 100 kHz clock to the counter's gate. However, you can route that clock to a PFI line, then use the PFI line as the clock source.

Alternatively, you can use the attached VI and generate your own clock using a counter.

Let me know if you have any further questions.

Regards,
Sean C.
0 Kudos
Message 8 of 21
(4,658 Views)
Hi Sean,

I'm sorry, I can't find the attachement.

Regards,
Judith
0 Kudos
Message 9 of 21
(4,651 Views)
Hello Judith,

I apologize... Here is the file.

Regards,
Sean C.
0 Kudos
Message 10 of 21
(4,637 Views)