7i76e spindle control show strange behavior

More
11 Jan 2016 18:58 - 11 Jan 2016 18:59 #68191 by newbynobi
Hallo,

so I recieved my 7i76e, like others without a name set on the card. I solved this and I am now fighting with the spindle control.

My VFD needs 0-10 V and dir signal, so it should not be a problem.

I connected
+12 V to TB4 Pin 3
- 12 V to TB4 Pin 1

my INI looks like this:
[SPINDLE_9]
P = 1.0
I = 0.0
D = 0.0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 6000.0
OUTPUT_SCALE = 7200.0
OUTPUT_MIN_LIMIT = -6000.0
OUTPUT_MAX_LIMIT = 6000.0

and this is the hal part:
#*******************
#  SPINDLE S
#*******************

setp   pid.s.Pgain     [SPINDLE_9]P
setp   pid.s.Igain     [SPINDLE_9]I
setp   pid.s.Dgain     [SPINDLE_9]D
setp   pid.s.bias      [SPINDLE_9]BIAS
setp   pid.s.FF0       [SPINDLE_9]FF0
setp   pid.s.FF1       [SPINDLE_9]FF1
setp   pid.s.FF2       [SPINDLE_9]FF2
setp   pid.s.deadband  [SPINDLE_9]DEADBAND
setp   pid.s.maxoutput [SPINDLE_9]MAX_OUTPUT
setp   pid.s.error-previous-target true
setp   pid.s.maxerror  5

net spindle-index-enable  <=> pid.s.index-enable
net spindle-enable        =>  pid.s.enable
net spindle-vel-cmd-rpm   =>  pid.s.command
net spindle-vel-fb-rpm    =>  pid.s.feedback
net spindle-output        <=  pid.s.output

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

setp   hm2_7i76e.0.7i76.0.0.spinout-minlim    [SPINDLE_9]OUTPUT_MIN_LIMIT
setp   hm2_7i76e.0.7i76.0.0.spinout-maxlim    [SPINDLE_9]OUTPUT_MAX_LIMIT
setp   hm2_7i76e.0.7i76.0.0.spinout-scalemax  [SPINDLE_9]OUTPUT_SCALE


net spindle-vel-cmd-rpm     => hm2_7i76e.0.7i76.0.0.spinout
net spindle-enable          => hm2_7i76e.0.7i76.0.0.spinena
net spindle-ccw             => hm2_7i76e.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-rpm        <=  motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs    <=  motion.spindle-speed-out-abs
net spindle-enable             <=  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-rps         =>  motion.spindle-speed-in
net spindle-index-enable      <=>  motion.spindle-index-enable

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

sets spindle-at-speed true

As you can see, I use a scale of 7200 to archive that max speed of 6000 rpm is reached with 10 V,

So here comes the wonder:
S3000 M3 gives 5.02 V on TB3 Pin 2
S3000 M4 gives 7.04 V on TB3 Pin 2

S1000 M3 gives 1.67 V on TB3 Pin 2
S1000 M4 gives 10.5 V on TB3 Pin 2

Enable and Dir are working as they should.

If I change the scale to be 6000, it results in:

S3000 M3 gives 6.03 V on TB3 Pin 2
S3000 M4 gives 6.03 V on TB3 Pin 2

S1000 M3 gives 2.00 V on TB3 Pin 2
S1000 M4 gives 10.1 V on TB3 Pin 2

Is there a way to set a separate scale for counterclockwise spindle dir?

Norbert
Last edit: 11 Jan 2016 18:59 by newbynobi.

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

More
11 Jan 2016 19:16 #68192 by newbynobi
Got it!!!

Must be:
line:
net spindle-vel-cmd-rpm => hm2_7i76e.0.7i76.0.0.spinout
net spindle-vel-cmd-rpm-abs => hm2_7i76e.0.7i76.0.0.spinout

As this connections has been made with pncconf, i consider it as a bug, I will inform Chris.

Norbert

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

More
12 Jan 2016 04:08 #68216 by cmorley
So yes there is a box missing in master to select a positive only output - i will fix soon.

As for the scaling:
an output_scale of 7200 means if linuxcnc requests 7200 RPM, that the output would be 10 volts
to limit the speed to 6000 you would need to limit the output voltage to less then 10 volts.
But you mention that you want the motor to spin at 6000rpm at 10 volts.
So you must pick one or the other :)

OUTPUT_SCALE = 6000
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 6000

would give you 0 - 10volt output for a 0 to 6000 rpm request

OUTPUT_SCALE = 7200
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 6000

would give you 0 - 8.3 volt output for a 0 to 6000 rpm request

Chris M

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

More
13 Jan 2016 16:17 - 13 Jan 2016 16:17 #68321 by newbynobi
Hallo Chris,

My spindle turns from -6000 to 6000 rpm, as it can run cw and ccw.
I do feed the 7i76e with 12V, but my vfd needs 0 to 10 V. That is the reason for the scale, as otherwise the vfd may be feeded with 12 V!!!

My vfd would accept also values from -10V to +10V for velocity control, but 7i76e potentiometer does not allow that configuration.

I also see, there is a limitation in speed using pncconf of 100 mm/min, my machine is able to do 10000 mm/min. I did set x axis limits to min=0 and max=300 in pncconf, but the ini values has been set by pncconf to 0 and 30000, so there is also something wrong.

There was also a strange scale calculation, but i will report that bug sepately, as i am not on my computer now and have to check first what i did to reproduce it.

Norbert
Last edit: 13 Jan 2016 16:17 by newbynobi.

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

More
13 Jan 2016 16:25 #68323 by andypugh

My spindle turns from -6000 to 6000 rpm, as it can run cw and ccw.
I do feed the 7i76e with 12V, but my vfd needs 0 to 10 V. That is the reason for the scale, as otherwise the vfd may be feeded with 12 V!!!


I _think_ that the 7i76 spindle output is a digital potentiometer, and the max output is whatever voltage the _VFD_ supplies to it.

So, you should not need a scale factor.

Furthemore, the 7i77 servo outputs are +/- 10V, independent of field power voltage.

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

More
13 Jan 2016 17:00 #68325 by newbynobi
Andy, you are right!

I just have a 12V power supply for other purpose and used that one for testing.
But I do not want to buy a additional 7i77, so I will use the dir pin to switch a relay to change the direction.


Norbert

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

More
13 Jan 2016 17:36 #68328 by andypugh

I just have a 12V power supply for other purpose and used that one for testing.


Probably best to derive the speed control voltage from the VFD itself.

(And the 7i77 mention was just a comment, not a suggestion that a 7i77 was any use to you)

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

Moderators: PCWjmelson
Time to create page: 0.078 seconds
Powered by Kunena Forum