Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Edge counting with digitial pause trigger

Hi there,
 
You have set a finite number of samples to be outputted and set this value to 1.
This will cause the program to output a single sample and then the task will stop.
 
If you increase the numSamples to say 10000 what happens then?
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 21 of 52
(2,376 Views)

Hi there,

I am not getting any samples if I have number of samples as 1, 1o or even 100. For me it s like no pulse is being generated with finite pulse.

Thanks

0 Kudos
Message 22 of 52
(2,372 Views)

Hey,

Have you put a scope on the counter output?

Are there any errors being generated from the code?

AdamB

Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 23 of 52
(2,368 Views)
Hi
 
Yes, Actually there is not errors being generated. But also I think no pulse is also generated when I give finite pulse, Bcoz I have given the counter output as trigger source,
If it s continuous signal, I can get the trigger source to get some signals from the pulse, in other case If I have finite signal I am not getting any signal in trigger source, Hope my program will explain how I have related the tasks.
 
Thanks
0 Kudos
Message 24 of 52
(2,364 Views)
Have you looked here?
 
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 25 of 52
(2,363 Views)

Hi again

I had a look at that program, I have used same method of defining and using the functions. But It s not workin in Finite mode in my program. If possible please have a look at the program.

Thanks

0 Kudos
Message 26 of 52
(2,356 Views)

Hey there,

I've tried the code and it works fine on the outputs.  I have a scope attached and the finite samples are being produced.  I used a numSamplesPerChannel set to 10000 and the output lasted 100 seconds and then stopped.

AdamB

Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 27 of 52
(2,355 Views)
Hi,
 
what value u ahve given for frequency and duty cycle?  Could you please try the same frequency and try it for 1 samples? or 10 samples?
 
Thanks
0 Kudos
Message 28 of 52
(2,351 Views)
Hey again,
 
I have kept the default values you have on the form.
It works perfectly with 1, 10, 100, 1000 and 10000.  They produce the finite number of pulses and then stop producint pulses alltogether.
 
Thanx
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 29 of 52
(2,352 Views)
Hi there,
 
This is strange, After writing the program and tried it running with finite samples of 1 and 10, it stopped exactly after reaching the sample specified. But now I try the same values, but it s not working out.  I can explain the problem.
 
I start generating the pulse with frequency : 1 Hz and Duty cycle : 0.9 with the counter0Internal output as trigger source, with trigger level as high and rising edge.
Number of samples specified was 30. It works ok until it reaches 23 samples then it loses the pulse generation signal and ignore the trigger completely. What should be the problem?
 
Thanks
0 Kudos
Message 30 of 52
(2,344 Views)