7i76 and spindle output

More
29 Mar 2013 06:45 #32014 by gandalf
Hi,
I'm configuring my 7i76 and the spindle's inverter.
The inverter accept 0-10v to provide (in my case) 100-300 Hz (6000-18000 rpm).
From the inveter I have 10v and negative that is perfect for the 7i76.
Configured in PnCConf the rsult is:

- spindle enable and direction are not working but I can use an output pin as forward direction
- Potentiometer is not working.

Someone had the same experience?

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

More
29 Mar 2013 07:20 #32016 by cmorley
Replied by cmorley on topic 7i76 and spindle output
What version of linuxcnc are you using?
what was the settings for :

analog min
analog max
analog max scale

did you try the open loop test?

could you post your main HAL file.

Chris M

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

More
30 Mar 2013 05:59 #32066 by gandalf
Replied by gandalf on topic 7i76 and spindle output
I solved!
was a mix of wrong values of analog min-max-max scale on the HAL file and some things to configure on the interver.
After reading a lot of documentation and doing a lot of test, all is working well.

5i25 and 7i76 cards are working great as aspected!

Great job!

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

More
11 Feb 2015 20:07 #55890 by jorgeota
Replied by jorgeota on topic 7i76 and spindle output
Hello, I need help setting up my spindle output on a 7i76 card using the potentiometer of the card.

The reference voltage I get from the servo drive is -3.9 and +3.9 VDC.

the motor should run at up to 5000 RPM.

Problems...

1. Whenever the card has power, the motor spins, even if LinuxCNC is not ON. (If I remove the signal SPINDLEOUT from the servo drive, the motor stops).
2. Using the "STOP" button of the AXIS GUI does not stop the motor.
3. The motor stops only when I send the command "M3 S2500" or "M4 S2500" on the MDI screen of LinuxCNC.


the HAL file,
#*******************
#  SPINDLE S
#*******************


# ---digital potentionmeter output signals/setup---

setp   hm2_5i25.0.7i76.0.0.spinout-minlim    [SPINDLE_9]OUTPUT_MIN_LIMIT
setp   hm2_5i25.0.7i76.0.0.spinout-maxlim    [SPINDLE_9]OUTPUT_MAX_LIMIT
setp   hm2_5i25.0.7i76.0.0.spinout-scalemax  [SPINDLE_9]OUTPUT_SCALE
setp   hm2_5i25.0.7i76.0.0.spindir-invert   false

net spindle-vel-cmd     => hm2_5i25.0.7i76.0.0.spinout
net machine-is-enabled      => hm2_5i25.0.7i76.0.0.spinena
net spindle-ccw         => hm2_5i25.0.7i76.0.0.spindir



# ---setup spindle control signals---

net spindle-vel-cmd-rps        <=  motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs    <=  motion.spindle-speed-out-rps-abs
net spindle-vel-cmd            <=  motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs    <=  motion.spindle-speed-out-abs
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

# ---Setup spindle at speed signals---

sets spindle-at-speed true

The .ini file
#********************
# Spindle 
#********************
[SPINDLE_9]
OUTPUT_SCALE = 5000
OUTPUT_MIN_LIMIT = -5000
OUTPUT_MAX_LIMIT = 5000

I'm can see I'm missing the part where I set the scale of a "value of voltage = value of RPM" and how to tell the card the range of voltage reference.

Thank you before hand.

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

More
11 Feb 2015 20:48 #55891 by ArcEye
Replied by ArcEye on topic 7i76 and spindle output
Hi

See this post, you also have spinena connected to machine-enable instead of spindle-on

www.linuxcnc.org/index.php/english/forum...le-not-working#52970

I'm sure PCW will chime in re the rest when he awakens!

regards

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

More
11 Feb 2015 22:01 #55893 by andypugh
Replied by andypugh on topic 7i76 and spindle output

The reference voltage I get from the servo drive is -3.9 and +3.9 VDC.
...
the motor should run at up to 5000 RPM.
...
3. The motor stops only when I send the command "M3 S2500" or "M4 S2500" on the MDI screen of LinuxCNC.


It sounds like the VFD expects a potentiometer to be attached that gives zero speed in the middle and then clockwise and anticlockwise to either side of centre.

Is it possible to wire the 7i76 potentiometer between the 0V reference and the +4V pin?

It might be possible to set up the HAL to set the spindle speed to 2500 for a commanded speed of zero, but that isn't super-reliable so you definitely need to make sure that the enable output turns the drive off. (drve off is not the same thing as a set-speed of zero)

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

More
11 Feb 2015 22:38 #55894 by jorgeota
Replied by jorgeota on topic 7i76 and spindle output
Hello, thank you.
I tried changing the values as stated on the post but the result is the same.

:dry:

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

More
11 Feb 2015 22:39 #55895 by jorgeota
Replied by jorgeota on topic 7i76 and spindle output

The reference voltage I get from the servo drive is -3.9 and +3.9 VDC.
...
the motor should run at up to 5000 RPM.
...
3. The motor stops only when I send the command "M3 S2500" or "M4 S2500" on the MDI screen of LinuxCNC.


It sounds like the VFD expects a potentiometer to be attached that gives zero speed in the middle and then clockwise and anticlockwise to either side of centre.

Is it possible to wire the 7i76 potentiometer between the 0V reference and the +4V pin?

It might be possible to set up the HAL to set the spindle speed to 2500 for a commanded speed of zero, but that isn't super-reliable so you definitely need to make sure that the enable output turns the drive off. (drve off is not the same thing as a set-speed of zero)


I do not know where 0V is for the reference voltage.

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

More
11 Feb 2015 23:21 #55896 by PCW
Replied by PCW on topic 7i76 and spindle output
In addition to what Andy mentioned about

net machine-is-enabled => hm2_5i25.0.7i76.0.0.spinena

being wrong

I also sounds like you dont have the VFD enabled by the 7I76 spindle enable output
This is something that really needs to be fixed before proceeding.


If the VFD uses a bipolar speed control input, (and thats the only option)
that is it goes forward on positive voltages and reverse on negative voltages
and does not use a direction pin or forward and reverse pins to change direction,
you will have to offset the command to the 7I76 using the scale component:

INI file
#********************
# Spindle 
#********************
[SPINDLE_9]
OUTPUT_SCALE = 10000
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 10000

HAL file (assuming scale is not already used)
loadrt scale count=1
addf scale.0 servo-thread
setp scale.0.gain 1
setp scale.0.offset 5000
# net spindle-vel-cmd     => hm2_5i25.0.7i76.0.0.spinout   # Note find and comment out old connection
# net spindle-vel-cmd     <=  motion.spindle-speed-out       # Note find and comment out old connection
net spindle-vel-cmd motion.spindle-speed-out scale.0.in
net offset-spindle-vel-cmd    scale.0.out hm2_5i25.0.7i76.0.0.spinout
The following user(s) said Thank You: jorgeota

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

More
11 Feb 2015 23:28 #55897 by andypugh
Replied by andypugh on topic 7i76 and spindle output

you will have to offset the command to the 7I76 using the scale component:


It might be more elegant to do it with a biased PID for closed-loop control.

However, that can wait.

First of all you need to connect the HAL pin hm2_5i25.0.7i76.0.0.spinena to motion.spindle.is-on and then connect the VFD enable inputs to the 7i76 enable pins to make sure that M5 stops the spindle regardless of the speed command to the digital potentiometer.

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

Moderators: cmorley
Time to create page: 0.077 seconds
Powered by Kunena Forum