LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate pulse greater than 50000Hz

Hello everyone, I'm new in Labview. I want to control the Delta A2 servo motor with PWM. I try many way to do, but the program broke when the frequency is over than 1000Hz. I found the counter ran fast enough. Is there any way to solve it?

 

Question:How to modify this program and let it reach 50000Hz?

Download All
0 Kudos
Message 1 of 6
(2,401 Views)

Hi dog,

 

How to modify this program and let it reach 50000Hz?

Your "program" just consists of a control and an indicator connected by a wire.

So the answer to your question is: just input 50k into the control…

 

but the program broke when the frequency is over than 1000Hz.

How can your "program" brake - atleast the version you attached to your message?

 

I found the counter ran fast enough

There is no counter in your snippet…

 

Why don't you attach the full VI? Which DAQ hardware do you use?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(2,400 Views)

Sorry, upload the wrong snippet and maybe I give the question not that clearly.

First, there are two block called "Enter N pulse" and "Already run", I call them counter because they count how much pulse already ran.

Then the program broken means there are something wrong in it.

Below are two .VI with my two ways to make pulse but no one can reach my target.

I use SB-9632.

Download All
0 Kudos
Message 3 of 6
(2,369 Views)

Hi dog,

 

Then the program broken means there are something wrong in it.

What is wrong?

(Well, there are a lot of questionable things…)

 

but no one can reach my target.

You should use the FPGA to reach stable PWMs with high frequencies. Point.

Both your tries use a 1kHz clock: you will not get better resolution than 1ms using this clock!!!

(You might try the 1MHz clock, but this will probably result in jitter…)

 

That being said: clean up your VI.

- remove Rube-Goldbergs!

- remove local variables!

- use correct datatypes to avoid coercion dots!

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,366 Views)

I try to use FPGA this time, but the program can not run. The error says "The specified FPGA VI must be compiled in order to be used from the FPGA Interface."

What happen? What it means?

0 Kudos
Message 5 of 6
(2,337 Views)

Hi dog,

 

do exactly as the error message says: you need to compile the FPGA VI before you can use it…

See the "build specs" entry in the FPGA sub-tree? I also recommend this one!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(2,335 Views)