02-23-2018 02:12 AM
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?
02-23-2018 02:17 AM
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?
02-23-2018 06:33 AM
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.
02-23-2018 07:03 AM - edited 02-23-2018 07:06 AM
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!
02-26-2018 04:17 AM
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?
02-26-2018 04:24 AM
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!