Current turning capabilities status

More
13 years 8 months ago #30400 by emcPT
Thank you,

Can't I/should not I configure manually the output pins rather than use the Pncconfig?

There will be a situation that PNCconfig will not be able to help me, and when I reach there I should be able to deal myself with the configuration, or in your opinion this is too complicated for now and not advisable?

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #30409 by BigJohnT
It is normal once you get a working configuration with a wizard to have to hand edit the files to get custom things done. Usually you just add to the custom.hal file if you have one.

John

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #30438 by cmorley
In the beginning it's common to make little changes often.
Invert this input, move that output, adjust this encoder scale...

This is where PNCconf is really good. You don't need to know every file to look at or the complete syntax of HAL, INI and gladeVCP .
I often leave PNCconf running after saving (just because it takes a long time to load), and run linuxcnc to test then change something in PNCconf, save....

If you use the open loop test you can check for obvious problems like servo run-away do to the encoder and analog not not agreeing on direction.
You can add gladevcp options and get an idea how that's done.

When you get to toolchangers, gear changes, odd optional equipment, you need to learn more about linuxcnc and edit by hand.

So keep things easy until you get the basic machine running then go ahead and add things bit by bit to add capability.
Somewhere along the way PNCconf will be holding you back and you will know enough to start making changes without it.
With care, Pncconf can be used with complicated custom HAL files, it just takes a little planning.

If it were me I would use PNCconf to connect as many as the output and inputs as I could.
You can even make custom signal names to connect to a custom HAl file.

Chris M

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #30579 by emcPT
Things are getting to make sense and I can have the spindle working, set the speed and get the speed back from the encoder that I installed on the spindle.
At this point I correctly have spindle feedback, but I am running a open loop, as the spindle feedback is not being used for control the analog signal, but only for observe the speed at a determined instant.

Now I would like to control the output of my pwmgen.03 output based on the current spindle speed.
My .hal that have the spindle current control is below.
The example that I saw was: wiki.linuxcnc.org/cgi-bin/wiki.pl?Closed...pindle_Speed_Control but it is for the parallel port, and I will probably not get it right for my current set up.
Can some one give me a help here? Maybe an example using a 5i20 + 3i33 would be enough for me to start.
Thank you


#*******************
# SPINDLE S
#*******************

# ---PWM Generator signals/setup---

setp hm2_5i20.0.pwmgen.03.output-type 1
setp hm2_5i20.0.pwmgen.03.scale [SPINDLE_9]OUTPUT_SCALE


# ---I added this to make the output 0-10V
loadrt abs count=2
addf abs.0 servo-thread # analog output
addf abs.1 servo-thread # spindle speed display

net spindle-vel-cmd => abs.0.in
net absolute-spindle-vel-cmd <= abs.0.out
net absolute-spindle-vel-cmd => hm2_5i20.0.pwmgen.03.value



net machine-is-enabled => hm2_5i20.0.pwmgen.03.enable

# ---Encoder feedback signals/setup---

setp hm2_5i20.0.encoder.03.counter-mode 0
setp hm2_5i20.0.encoder.03.filter 1
setp hm2_5i20.0.encoder.03.index-invert 0
setp hm2_5i20.0.encoder.03.index-mask 0
setp hm2_5i20.0.encoder.03.index-mask-invert 0
setp hm2_5i20.0.encoder.03.scale [SPINDLE_9]ENCODER_SCALE

net spindle-revs <= hm2_5i20.0.encoder.03.position
net spindle-vel-fb <= hm2_5i20.0.encoder.03.velocity
net spindle-index-enable <=> hm2_5i20.0.encoder.03.index-enable

# ---setup spindle control signals---

net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd <= motion.spindle-speed-out
net spindle-on <= motion.spindle-on
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
net spindle-at-speed => motion.spindle-at-speed
net spindle-vel-fb => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable


net spindle-vel-fb => abs.1.in
loadrt scale count=1
addf scale.0 servo-thread
setp scale.0.gain 60 # spindle fb*60 (rpm)
net absolute-spindle-vel-measured-per_second <= abs.1.out
net absolute-spindle-vel-measured-per_second => scale.0.in
net absolute-spindle-vel-measured <= scale.0.out


# ---Setup spindle at speed signals---
loadrt near
addf near.0 servo-thread

net spindle-vel-cmd-rps => near.0.in1 # commanded
net spindle-vel-fb => near.0.in2 # real
net spindle-at-speed motion.spindle-at-speed <= near.0.out
setp near.0.scale 1.2

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #30584 by andypugh
I made a start on this, but need to know how you control the spindle direction.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #30594 by emcPT
Currently I am controlling the spindle using an analog output from the 7i33 (0-10V) with direction from the 7i37.
I have an quadrature encoder 1000ppr in the spindle back with index going straight to the 7i33. Encoder is working and apparent real speed is received.
I think it is the most common setup for linuxcnc users.
If any more information is needed please inform.

Please Log in or Create an account to join the conversation.

Time to create page: 0.233 seconds
Powered by Kunena Forum