Mori MVJR Build Log

More
03 Sep 2011 18:47 #12929 by schmidtmotorworks
Progress Report::
Figuring out some of the HAL connections OK, confused by a few things though.

I find the words" High and Low" in the docs but I'm not familiar with them, I am guessing that going high means changing voltage from either a negative value to zero or to a positive value and going low means the opposite, is that about right? I am trying to find examples on Google but in Germany the search is very difficult (mostly in German).

The main thing that I'm wondering about now is the 7i48 Six Channel Analog Servo Amp Interface.

The HAL file that PCW made for me has sections for each axis.

I see the lines that seem to refer to the encoder
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.counter-mode 0
I guess I need to somehow specify the connection to the encoder wires.
Looking at the 7i48 manual it seems that both the servo and the encoder wires connect to the 7i48.
Does anyone know if or how I need to modify these sections?

# ################
# X [0] Axis
# ################

# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable => pid.0.enable
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.enable
net emcmot.00.enable <= axis.0.amp-enable-out 

# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask-invert 0

setp  hm2_[HOSTMOT2](BOARD).0.encoder.00.scale  [AXIS_0]INPUT_SCALE
net motor.00.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.00.position => pid.0.feedback
net motor.00.pos-fb => axis.0.motor-pos-fb #push copy back to Axis GUI

# set PID loop gains from inifile
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND
setp pid.0.maxoutput [AXIS_0]MAX_OUTPUT

# position command signals
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.output-type 2 #PWM up on pin0, #PWM down on pin1
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.scale  [AXIS_0]OUTPUT_SCALE

net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
net motor.00.command  pid.0.output  =>  hm2_[HOSTMOT2](BOARD).0.pwmgen.00.value

Here is a wiring diagram for the encoder connections.
Attachments:

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

More
03 Sep 2011 19:01 #12930 by schmidtmotorworks
The servo wiring diagram looks like this:




From piecing together info from a few manuals I found these explanations for the abbreviations:
Honda Pin1 SVONX  SERVO ON At LOW the controller is ready to operate.
Make a sequence so that SVON signal is turned on after power is applied 
to the controller and main circuit.
Adjusting SERVO ON signal to HIGH turns off control power and main
circuit power

Honda Pin 2 (empty)

Honda Pin 3 OL(X) Overload (normally closed)

Honda Pin 4 SRD(X) Servo Ready

Honda Pin 5 TG ON TGONX TG ON turns low when motor exceeds 1/10 of rated speed

Honda Pin 6 BT(X) Motor terminal B

Honda Pin 7 DA(X) (don't know yet)

Honda Pin 8 (empty)

Honda Pin 9 FU(X) FU Signal becomes low when a fuse blows in the servo

Honda Pin 10 AL(X) Alarm (normally closed)

Honda Pin 11 TG ON TGONX TG ON turns low when motor exceeds 1/10 of rated speed

Honda Pin 12 AT(X) Motor Terminal A or Connected to TG terminal + (manual seems contradictary)

Honda Pin 13 SG(X)  Signal grounding

Honda Pin 14 (empty)

Honda Pin 15 (empty) 

Honda Pin 16 OC 

Honda Pin 17 OC 

Honda Pin 18 OC 

Honda Pin 19 OC

Honda Pin 20 Ground
Attachments:

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

More
03 Sep 2011 19:51 #12931 by andypugh
Replied by andypugh on topic Re:Mori MVJR Build Log
schmidtmotorworks wrote:

I find the words" High and Low" in the docs but I'm not familiar with them, I am guessing that going high means changing voltage from either a negative value to zero or to a positive value and going low means the opposite, is that about right?

Almost. In the hardware "high" means at +5V, or +12V, or whatever is being used. In the software "high" means logical true, represented by the number 1.
Low is 0V, or 0 or false.

I guess I need to somehow specify the connection to the encoder wires.

Not as such. The 7i48 will plug into the FPGA card and all the encoder signals will automatically go to the right places.
In HAL you don't see A, B, Z etc, you see HAL pins for total counts and scaled position as numerical values to be used by the EMC2 system.

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

More
03 Sep 2011 20:54 - 03 Sep 2011 21:03 #12932 by schmidtmotorworks

Not as such. The 7i48 will plug into the FPGA card and all the encoder signals will automatically go to the right places.
In HAL you don't see A, B, Z etc, you see HAL pins for total counts and scaled position as numerical values to be used by the EMC2 system.


Sorry I am so slow to get this. At least one good thing will come from someone with minimla electronics experience doing this and taking notes; I should be able to write this out so anyone like me could do a similar machine in a day or two.

If I understand correctly then, all I have to do is figure out how to match-up the mesa diagram for the 7i48 and the wiring diagrams from Yaskawa and connect the wires and the rest should work?

Now I'm wondering does the spindle get connected to the 7i48 too? or can it be handled with gpio alone?

Thanks

Jon Schmidt
Last edit: 03 Sep 2011 21:03 by schmidtmotorworks.

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

More
03 Sep 2011 22:33 #12936 by andypugh
Replied by andypugh on topic Re:Mori MVJR Build Log
schmidtmotorworks wrote:

If I understand correctly then, all I have to do is figure out how to match-up the mesa diagram for the 7i48 and the wiring diagrams from Yaskawa and connect the wires and the rest should work?

Yes, pretty much.

Now I'm wondering does the spindle get connected to the 7i48 too?

What is the spindle drive? if it is a conventional VFD then you can use a spare Pwm-Voltage output from the 7i48 for speed, and a couple of 7i65 outputs for enable and direction.

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

More
03 Sep 2011 22:38 #12937 by andypugh
Replied by andypugh on topic Re:Mori MVJR Build Log
I don't understand your encoder wiring, but as long as the drives do, it might not matter.
Does the drive pass-through quadrature pulses at all?

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

More
04 Sep 2011 03:37 - 04 Sep 2011 03:37 #12942 by schmidtmotorworks

What is the spindle drive? if it is a conventional VFD then you can use a spare Pwm-Voltage output from the 7i48 for speed, and a couple of 7i65 outputs for enable and direction.


Thanks for all your help, my ToDo list is less than one page long now.

Yes it is a VFD.

I think I can figure out the 7i65 for enable and direction.

Setting up the PWM-Voltage from the 7i48 is more mysterious,

This spindle example seems like it might be useful but I will need to convert it so that it works from 7i48 & 7i65 instead of what appears to be a parport.

www.linuxcnc.org/docview/html/examples_spindle.html

I'm guessing I might usesome of the code from one of the axis.

If anyone has an example of this with a 7i65 and 7i48 (or something like it), please post it.
Last edit: 04 Sep 2011 03:37 by schmidtmotorworks.

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

More
04 Sep 2011 03:40 #12943 by schmidtmotorworks
andypugh wrote:

I don't understand your encoder wiring, but as long as the drives do, it might not matter.
Does the drive pass-through quadrature pulses at all?


All I know so far is what I see in the diagrams, if I understand correctly, I think the drive does not pass through quadrature pulses but I don't really understand any of that in fact I am just trying to read up on it now.

Best Regards

Jon Schmidt

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

More
04 Sep 2011 06:38 - 04 Sep 2011 06:43 #12945 by schmidtmotorworks
OK This is what I pieced together for the spindle mostly from:
www.linuxcnc.org/docview/html/examples_spindle.html

I couldn't figure out what to do where it says "<your DAC pin name>" (I think this would go through the 7i48)

Note: I still have to set the pin numbers.

Just to make sure I understand something about how these boards work:
If I want to send 12volt power to some destination, I need to use two pins; one to connect the power to and one to send the power out right?
Similarly if I need to accept power from a wire I will also need a pin to connect to ground, right?

If this is right, can one pin be used as a power source or ground for multiple other pins or do I need to make one matching power or ground pin for each input or output?

Then finally (I hope) if I need matching pars, should they be adjacent pins or some other arrangement?
#*******************
#  SPINDLE S
#*******************

# From:
# http://www.linuxcnc.org/docview/html/examples_spindle.html

#-----------------
# Spindle Speed
#-----------------
loadrt scale count=1
addf scale.0 servo-thread
# Gain computation: RPM/Voltage=0.002 Assumes 0-10Volt and 5000 RPM
setp scale.0.gain 0.002
net spindle-speed-scale motion.spindle-speed-out => scale.0.in
net spindle-speed-DAC scale.0.out => <your DAC pin name>
#-----------------
# Spindle Enable
#-----------------
net spindle-enable motion.spindle-on =>       hm2_5i23.0.7i64.0.0.out 

#-----------------
# Spindle Motion
#-----------------
net spindle-fwd     motion.spindle-forward => hm2_5i23.0.7i64.0.0.out 
net spindle-rev     motion.spindle-reverse => hm2_5i23.0.7i64.0.0.out 
net spindle-brake   motion.spindle-brake   => hm2_5i23.0.7i64.0.0.out

#--------------------------------------------------------------------------------
#motion.spindle-revs
#(float, in) For correct operation of spindle synchronized moves, 
#this signal must be hooked to the position pin of the spindle encoder. 
#The spindle encoder position should be scaled such that spindle-revs
#increases by 1.0 for each rotation of the spindle in the clockwise (M3) direction.

net spindle-revs          hm2_5i23.0.7i64.0.0.in  =>  motion.spindle-revs
#--------------------------------------------------------------------------------

#--------------------------------------------------------------------------------
#motion.spindle-at-speed
#(bit, in) Motion will pause until this pin is TRUE, under the following conditions: 
#before the first feed move after each spindle start or speed change; before the start 
#of every chain of spindle-synchronized moves; and if in CSS mode, at every rapid to 
#feed transition. This input can be used to ensure that the spindle is up to speed 
#before starting a cut, or that a lathe spindle in CSS mode has slowed down after a 
#large to small facing pass before starting the next pass at the large diameter. 
#Many VFDs have an "at speed" output. Otherwise, it is easy to generate this signal 
#with the HAL near component, by comparing requested and actual spindle speeds.

net spindle-at-speed      hm2_5i23.0.7i64.0.0.in  =>  motion.spindle-at-speed
#--------------------------------------------------------------------------------

#--------------------------------------------------------------------------------
#motion.spindle-speed-in
#(float, in) Feedback of actual spindle speed in rotations per second. 
#This is used by feed-per-revolution motion (G95). 
#If your spindle encoder driver does not have a velocity output,
#you can generate a suitable one by sending the spindle position through a ddt component

net spindle-speed-in      hm2_5i23.0.7i64.0.0.in  =>  motion.spindle-speed-in
#--------------------------------------------------------------------------------

Last edit: 04 Sep 2011 06:43 by schmidtmotorworks.

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

More
04 Sep 2011 13:44 #12955 by andypugh
Replied by andypugh on topic Re:Mori MVJR Build Log
schmidtmotorworks wrote:

I couldn't figure out what to do where it says "<your DAC pin name>" (I think this would go through the 7i48)

Well, I don't have your config so don't know what modules you have loaded and hence what pins you have, but my guess would be that if you are using 4 servo axes, so that the spindle ends up using the 5th encoder and pwm to voltage converter, that the pin would be hm2_5i23.0.pwmgen.4.value. So, the spindle speed demend out of EMC2 goes (via HAL) to a PWM generator on the 5i23, which creates a PWM signal which is converted to a 0-10V signal on the 7i48 which is then connected to the VFD. (DAC means "Digital to Analogue", PWM is a digital signal)

If I want to send 12volt power to some destination, I need to use two pins; one to connect the power to and one to send the power out right?
Similarly if I need to accept power from a wire I will also need a pin to connect to ground, right?
If this is right, can one pin be used as a power source or ground for multiple other pins or do I need to make one matching power or ground pin for each input or output?

It is probably easier to think of current flow rather than voltages. COnsider the inputs as light-bulbs and the outputs as switches (especially in the case of the 7i65). Setting one of the 7i65 outputs to 1 in HAL allows current to flow from the + terminal out of the - terminal on the 7i65. So, you can share 0V lines and 12V lines, and you can even use a common 0V line between several 7i65 outputs, even if those outputs are switching different voltages, assuming that the power supply 0V lines are all common.
Similarly, the inputs to the 7i65 only send a signal to HAL when current flows through the connectors from + to -. You can put the switches, sensors, etc either on the high-side or the low side (ie, between 12V and the + terminal, with the - terminal to 0V) or the low-side (with 12V direct to the + terminal and the switch between the - terminal and 0V). You can even have a switch on both the high-side and the low side, but I don't know why you would want to. (switches in series both on the same side as the same effect, and would be simpler to wire back to the board)

If you have any voltage-sourcing sensors then those would go direct to + and -. But I can't think of many.

> net spindle-speed-DAC scale.0.out => <your DAC pin name>
net spindle-speed-DAC scale.0.out => hm2_5i23.0.pwmgen.04.value

> net spindle-revs hm2_5i23.0.7i64.0.0.in => motion.spindle-revs
No, this input to EMC2 needs to be the spindle position, not a pulse input. It is more likely to be:
net spindle-revs hm2_5i23.0.encoder.04.position => motion.spindle-revs

> net spindle-at-speed hm2_5i23.0.7i64.0.0.in => motion.spindle-at-speed
Only of the VFD does actually have a spindle-at-speed output, otherwise the machine will never move, and you will wonder why (it will be waiting for a spindle-speed-good signal)

> net spindle-speed-in hm2_5i23.0.7i64.0.0.in => motion.spindle-speed-in
Again, this is a numerical value, from the encoder counter function. HAL won't even let you net a digital value to that input pin:
net spindle-speed-in hm2_5i23.0.encoder.04.velocity => motion.spindle-speed-in

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

Moderators: cncbasher
Time to create page: 0.102 seconds
Powered by Kunena Forum