pwm to esc converter
04 Jan 2016 17:29 #67859
by andypugh
If the HAL isn't referencing it, yes. Or, if you prefer, you could store the numerical constants there.
Replied by andypugh on topic pwm to esc converter
but it can be removed?
If the HAL isn't referencing it, yes. Or, if you prefer, you could store the numerical constants there.
The following user(s) said Thank You: billykid
Please Log in or Create an account to join the conversation.
04 Jan 2016 20:00 #67869
by billykid
Replied by billykid on topic pwm to esc converter
it is true there are references in hal and can not be removed.
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
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 or Create an account to join the conversation.
05 Jan 2016 09:58 - 05 Jan 2016 09:59 #67911
by billykid
Replied by billykid on topic pwm to esc converter
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
Last edit: 05 Jan 2016 09:59 by billykid.
Please Log in or Create an account to join the conversation.
05 Jan 2016 13:08 #67921
by andypugh
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.
Replied by andypugh on topic pwm to esc converter
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 or Create an account to join the conversation.
05 Jan 2016 13:21 #67922
by billykid
Replied by billykid on topic pwm to esc converter
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?
It seems not to have the parameters min-dc max-dc that are in pwmgen software is not it?
Please Log in or Create an account to join the conversation.
05 Jan 2016 13:32 #67923
by andypugh
No, you are right that the limit pins do not exist.
You can use the HAL "limit" component on the input value, though.
Replied by andypugh on topic pwm to esc converter
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 or Create an account to join the conversation.
05 Jan 2016 17:41 - 05 Jan 2016 18:37 #67933
by billykid
Replied by billykid on topic pwm to esc converter
Thanks Andy, now I begin to understand something was years since I changed nothing.
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
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
Last edit: 05 Jan 2016 18:37 by billykid. Reason: wrong link
Please Log in or Create an account to join the conversation.
06 Jan 2016 14:46 #67968
by billykid
Replied by billykid on topic pwm to esc converter
It definitely something goes wrong only at least 1.5 ms.
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
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 or Create an account to join the conversation.
06 Jan 2016 15:31 #67971
by andypugh
Replied by andypugh on topic pwm to esc converter
The scale gain and offset are in % duty cycle, the limit is in something else (50 and 150 what?) and the pwm scale is set to 1000 for some reason.
It doesn't matter what units you use, but they need to be consistent.
It doesn't matter what units you use, but they need to be consistent.
Please Log in or Create an account to join the conversation.
06 Jan 2016 15:40 #67972
by billykid
Replied by billykid on topic pwm to esc converter
50 150 and I put them at random to try ..
min 50 make 1.5 ms to give stationary spindle
Max has no effect
min 50 make 1.5 ms to give stationary spindle
Max has no effect
Please Log in or Create an account to join the conversation.
Time to create page: 0.100 seconds