Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use USB-6501 to generate a stable pulse wave?

My teacher only gave me a USB-6501, but he asked me to measure a positive square wave and nine negative square waves. I think as long as a stable pulse wave with a duty cycle equal to 10% is generated.What can I do? Measure or make wave? And how?

0 Kudos
Message 1 of 9
(5,458 Views)
0 Kudos
Message 2 of 9
(5,402 Views)

Hi

The attachment is my labview program. But the program has a 200077 error. Can you help me? 

0 Kudos
Message 3 of 9
(5,383 Views)

Hi,

 

This error might be because the USB 6501 is not capable of Counter Output and can only be used for measuring (Counter Input).

 

The USB 6501 is software-timed, so the pulse generated will not be as accurate as a hardware-timed device.

This post might help you: 

https://forums.ni.com/t5/Digital-I-O/USB-6501-pulse-train/td-p/253690?profile.language=en

https://forums.ni.com/t5/Digital-I-O/NI-USB-6501/m-p/3239247#M20624

0 Kudos
Message 4 of 9
(5,376 Views)

Hi Carmen, 

 

For this topic:

6501 only support  24 channels DIO and a counter.

If we want to use it to generate the pulse, then we need to set the bit to 1 and 0 toggling with dedicated delay, to meet the requirement of the duty cycle.

Since this is software timing, and not so accurate, then could be used in the simply scenario, or  low frequency.

Please correct me, thanks.

Learning from other people, sharing ! bruce.xw.zhou@foxmail.com
0 Kudos
Message 5 of 9
(3,397 Views)

Hi Sir,

 

Since it is software timing, so the accuracy depends on the accuracy of your system(IPC) clock, right ? 

 

Thanks.

 

Bruce

Learning from other people, sharing ! bruce.xw.zhou@foxmail.com
0 Kudos
Message 6 of 9
(627 Views)

You can refer to the example code here as reference if you are using USB-6501. 

 

https://forums.ni.com/t5/Example-Code/Software-Timed-Pulse-Width-Modulation/ta-p/3507768

0 Kudos
Message 7 of 9
(324 Views)

@Brzhou wrote:

Hi Sir,

 

Since it is software timing, so the accuracy depends on the accuracy of your system(IPC) clock, right ? 

 

Thanks.

 

Bruce


The accuracy of your computer's clock and the timing precision provided by the Operating System. Typically, it is in the order of ms. Another important thing is hope that your OS doesn't block the execution of the software because it has some other priority software executing, such as Windows Update; in this case, your generation will be stuck and will not update.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution
Message 8 of 9
(306 Views)

Hi Sir,

 

Thanks for your information, as long as i get a chance, will give a try.

Learning from other people, sharing ! bruce.xw.zhou@foxmail.com
0 Kudos
Message 9 of 9
(244 Views)