- Posts: 19306
- Thank you received: 0
pwm to esc converter
billykid wrote: but it can be removed?
If the HAL isn't referencing it, yes. Or, if you prefer, you could store the numerical constants there.
Please Log in to join the conversation.
However, I managed to get the right timing and the motor works.
surely there will be lines that are useless but the important thing that makes the engine run.
thank you
Mauro
Please Log in to join the conversation.
andypugh wrote: Something isn't right here. You can't do a 350Hz PWM with a 20mS off-time. ]
that I know it's impossible
were 3 ms, the rest had to make the PIC12F629
now it works but I can not adjust well to early 1.5 ms.
as I have already fully functional CNC 4 axis servo spindle _ dc 0 -6000 rpm
this configuration has to go only the spindle 30,000 rpm for chisels
in practice it should clean up everything about the spindle in particular
(spindle_9) and put only what you need for this signal.
Now the parameters in the ini file interfere with those hal and I do not understand anything
if you can help me to clean it up you do me a big favor
thank you
Mauro
Please Log in to join the conversation.
billykid wrote: Now the parameters in the ini file interfere with those hal and I do not understand anything
In this case it is fairly simple.
The HAL file can either contain numerical values, or it can look in the INI file for numerical values.
It is entirely up to you where your HAL file gets the values from. If you prefer to keep the constants in the INI then that is fine, if you prefer to type them directly in the HAL, then just do that
There shouldn't be any conflict. Either the HAL looks in the iNI for a value or it doesn't.
Please Log in to join the conversation.
It seems not to have the parameters min-dc max-dc that are in pwmgen software is not it?
Please Log in to join the conversation.
billykid wrote: I read in the integrator manual hostmot2 pwmgen ..
It seems not to have the parameters min-dc max-dc that are in pwmgen software is not it?
No, you are right that the limit pins do not exist.
You can use the HAL "limit" component on the input value, though.
Please Log in to join the conversation.
I replaced the 7i43 with 5i23 to have more lines for high-speed spindle, extruder for 3d and others.
I upload a picture to show you but I could not ... it's better that you look here:
plus.google.com/u/0/102645633885240141617/posts
Please Log in to join the conversation.
without the limit1 ranges from 0.1 ms to about 5 ms
loadrt trivkins
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt hostmot2
loadrt scale
loadrt hm2_pci config="firmware=hm2/5i23/SVST4_8.BIT num_encoders=4 num_pwmgens=1 num_stepgens=5"
setp hm2_5i23.0.pwmgen.pwm_frequency 50
setp hm2_5i23.0.watchdog.timeout_ns 5000000
addf scale.0 servo-thread
setp scale.0.gain 0.4166 #(6000 * 0.4166 = 2.5%)
setp scale.0.offset 7.5
setp hm2_5i23.0.pwmgen.00.scale 1000 #(so the pwmgen is working in %)
loadrt limit1 count=1
addf limit1.0 servo-thread
setp limit1.0.min 50
setp limit1.0.max 150
net spindle-vel-cmd limit1.0.in
net spindle-vel-cmd-limited limit1.0.out => hm2_5i23.0.pwmgen.00.value
Please Log in to join the conversation.
It doesn't matter what units you use, but they need to be consistent.
Please Log in to join the conversation.
min 50 make 1.5 ms to give stationary spindle
Max has no effect
Please Log in to join the conversation.
