Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

pulse train using counter on 6070e

 

Hi,

 

There is an strange problem with my DAQ board 6070E. When I am to use the pulse train of ctr0 as the source for DAQ Timing, I can not see the ctr0! I mean that from the list of sources to choose for DAQ Timing, I can see PFIs, PXI_Trigs, sample clocks and etc but there is no option for Dev1/ctr output.

 

Is there something wrong with my DAQ Board, or I am using wrong method to use a pulse train as the source of Timing?

 

 

Best,

Hosa

0 Kudos
Message 1 of 12
(6,891 Views)

Dev1/ctr0 output connected to one of the PFI output, check device pinouts to define which PFI is "Dev1/ctr0 output"

Find your devise on Measurment and  automotisation, right click on devise then => select device pinouts option

--

Regards,

Alexander

0 Kudos
Message 2 of 12
(6,888 Views)

 

Dear Alex,

 

I did what you said. But none of both ctr outputs are on PFI. Only the ctr source and gate are on PFIs.

 

Best

0 Kudos
Message 3 of 12
(6,885 Views)

Hi,

your card has AI START input on PFI-0, check board manual and find pinout for this input, then connect it with counter output on your screw terminal or connector block,

Use PFI-0 for start sync!

--

A.

Message 4 of 12
(6,882 Views)

Hi Alex,

 

It worked, Thanks for your suggestion. But, there is something that I need to ask you. I wanted to repeat the sample provided by NI with my DAQ Board 6070E. Please see here: http://zone.ni.com/devzone/cda/tut/p/id/4322 figure 3. The sample is a general sample for using pulse trains for synchronization. But When I check it, the sampling runs once and contunues no more. Can you help me on that?

 

Best,

Hosa

0 Kudos
Message 5 of 12
(6,865 Views)

Hi,

last post i recommend you to use PFI-0, but it will be better to use PFI-1 as external timebase, PFI-0 generally used for start sync, but it doesn't matter. PFI-1 will work a bit faster.

 

I recommend you to use standard DAQ assistant for measurments, this function very easy to use:

Functions >> Measurment I/O >> NI DAQmx >> DAQ Assistant

Labview will ask you for measurment type, device ID, channels, etc. Select Voltage, your device ID and channel ID,

After that configure Assistant: Aquisition mode = continuous samples,

Same screen: select Advanced timing => Sample clock type = external, source = PFI-1  (or PFI-0)

 

Press OK, labview will promt a question to you: Confirm auto loop creation, press ok

I post example in attach

--

Regards, Alexander

 

 

Message 6 of 12
(6,860 Views)

Hi Hosa,

 

This bit of code should do what you are looking to do. You can use /DeviceName/CtrXInternalOutput as the terminal name for the sample clock of you AI task. CtrXInternalOutput is an advanced terminal, which you can enable for controls and constants by following this KnowledgeBase:

 

KB 3G0G2IZH: Enabling the Advanced Channels on a DAQmx Terminal Control/Constant

 

AIusingCounter.png

 

I've also attached the LabVIEW VI.

Steven K.
National Instruments
Software Engineer
Message 7 of 12
(6,850 Views)

 

 

Thanks to Alex and Steven,

 

Both of your examples worked great as expected. There is one thing remained about the usage of pulse train. I mean, after successful generation of a pulse train, how to tell the DAQmx Read.vi to acquire more than one sample at each clock cycle? That is, for now the DAQ acquires only one sample at each clock cycle during the duty cyle. So, for example, if I want to get 100 samples at each duty cycle, how can I do that?

 

Best,

Hosa

0 Kudos
Message 8 of 12
(6,843 Views)

Hi,

 

If I understand correctly, you want to aquire voltage signal at a frequency rate of 100 times greater than the timer output?

I dont think it is possible, you need timebase with same frequency rate.

0 Kudos
Message 9 of 12
(6,832 Views)

As an example, for a counter with rate 1 Hz and duty cycle 0.5, it comes that the high part of clock takes half a second and low part of clock does the same. So, if I want to take more than one sample at the time clock is at high level, how can I do that? This is needed for averaging the samples at each clock pulse.

 

The other thing that comes in mind is that, am I going in right direction or not? I mean for the application I am considering, is this correct to use a pulse train as the clock or I just need a triggering plan to do the same application?

 

Thanks,

Hosa

0 Kudos
Message 10 of 12
(6,823 Views)