LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating aquiring and analysing a pulse

hi 

 

i am trying to creat a digital pluse of user defined high and low pluse time, then i aquired this signal back via analog input channel of DAQ ni USB 6008.

it is giving me problem when i set the PULSE HIGH TIME to 1000ms and PULSE LOW TIME to 1000ms. it some time shows randomly nothing or some time continusly high pulse  or low, but not exactly 1 second high or 1 second low all the time. 

my first question is that is it the right approach to creat a digital pulse or there is some other efficient way to create such pulse?

second why it is skipping a cycle durring the aquasition, because when i connect the digital output to osciliscope it seems to be OK but when i aquired the same pulse back to vi it gives this kind of skips?

i am posting the vi for some good suggestions?

it really makes me worried why it is not working as expected.

 

thanks

 

0 Kudos
Message 1 of 3
(2,373 Views)

hussain wrote:

my first question is that is it the right approach to creat a digital pulse or there is some other efficient way to create such pulse?


The right way to generate a pulse is to use counters since the counters use a timebase as the source to generate the pulse and you need to always specify the duty cycle. Unfortunately, the USB-6008 and USB-6009 only support edge counting on their counters since generating a pulse requires a counter gate and a counter source, and the counter gate is not accessible on the USB-6008/6009 devices. What you are doing should work though since you are generating a pulse at such slow rate. But, remember you are essentially doing DIO with software timed in your application, so you can't expect the timing to be precise.


hussain wrote:

second why it is skipping a cycle durring the aquasition, because when i connect the digital output to osciliscope it seems to be OK but when i aquired the same pulse back to vi it gives this kind of skips?


I am not sure why you are getting the difference. How exactly have you done your reads? Again, you would need to use counters for pulse measurement if you need this to be efficient.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 3
(2,350 Views)

thanks for the suggestion Adnan

i do consider counter option but i have this USB-6008. but this application really dont need such option as it is generated slow rate.

the only thing that makes me confuse is its strange behaviour on waveform graph. when i set High pulse time to 1000ms and low pulse time to 1000ms, it starts good and trig accordingly but then after 10 or some time 13 cycles it just shows some noise for 2 to 3 cycles instead of  following the same pattren. 

so i request some one if they can check why it is happening?

thank you looking to some kind advice

 

regards 

0 Kudos
Message 3 of 3
(2,331 Views)