Need Help Conf PWM Servo 5i20 w/ 7147S & 7I42
27 Apr 2011 05:23 #9359
by Maglin
Need Help Conf PWM Servo 5i20 w/ 7147S & 7I42 was created by Maglin
OK Well here is my deal. First the hardware. I'm using PWM/Dir control. Using AMC Servo drives I need -PMW, -Dir, and -Inh for my drives. I might have made a mistake getting the 7i47S for this setup. Used pncconf to get me going. I have my encoders working a,b,X in differential configuration. My Servo's will come on full speed (PWM pin goes to ground) until I bring up the test servo in the pncconf screen. The TX outputs on the 7i37S are also differential and I'm using the negative side to run the drives. I need the pwm, and dir pins to stay high. I'm not to sure how to change my config to do that. Other than that I am able to control the servo's and see my encoder counting. The INH input on the drives are normally high and will shut the drive off if brought low, but I'm currently not planning on using it. Might at some time down the road for additional E-Stop protection.
Another question in the pncconf it will only let me run 2 PWM servo's. It's only using TX0-3 for the PWM/Dir signals. How would I also use the TX4-7 pins so I can run all 3 servo's and encoders and spindle all on one board? I plan to use the 7i42 for my limits/home, estop, flood and any future input/output I may need. So I'm almost running. I'm testing w/o an estop but I'm also just having my servo's on the bench. I'm just trying to get this configured and working w/o surprised. The servo coming on full speed would be very bad once I have it hooked up to a machine.
If anyone happens to have a config they would share for me to have a pretty good starting point I would really appreciate it.
thank you,
Maglin
Another question in the pncconf it will only let me run 2 PWM servo's. It's only using TX0-3 for the PWM/Dir signals. How would I also use the TX4-7 pins so I can run all 3 servo's and encoders and spindle all on one board? I plan to use the 7i42 for my limits/home, estop, flood and any future input/output I may need. So I'm almost running. I'm testing w/o an estop but I'm also just having my servo's on the bench. I'm just trying to get this configured and working w/o surprised. The servo coming on full speed would be very bad once I have it hooked up to a machine.
If anyone happens to have a config they would share for me to have a pretty good starting point I would really appreciate it.
thank you,
Maglin
Please Log in or Create an account to join the conversation.
27 Apr 2011 14:03 #9393
by PCW
Replied by PCW on topic Re:Need Help Conf PWM Servo 5i20 w/ 7147S & 7I42
You always want to have your servos power up in a off state!
First If you chose the other side of the PWM differential outputs, you will will start out with the PWM off (and watchdog timeouts will set PWM off - this is a good thing) . If you do this you will also have to set the output invert option for the pins that drive the PWM signals. You could also use the inhibit input, this is normally done via the ENA signal.
The normal 7I47S config is used for step+dir drives, I can make a PWM output version bitfile, but you will have to forgo pncconf and edit the HAL file directly to use this (I think 4 axis of PWM/DIR are possible on the 7I47S)
First If you chose the other side of the PWM differential outputs, you will will start out with the PWM off (and watchdog timeouts will set PWM off - this is a good thing) . If you do this you will also have to set the output invert option for the pins that drive the PWM signals. You could also use the inhibit input, this is normally done via the ENA signal.
The normal 7I47S config is used for step+dir drives, I can make a PWM output version bitfile, but you will have to forgo pncconf and edit the HAL file directly to use this (I think 4 axis of PWM/DIR are possible on the 7I47S)
Please Log in or Create an account to join the conversation.
27 Apr 2011 20:34 #9426
by Maglin
Replied by Maglin on topic Re:Need Help Conf PWM Servo 5i20 w/ 7147S & 7I42
It would be great if you would do that for me. I've read through the intergrators manual and I'm just trying to use something to go by to either make my own or modify to get my machine up and running. I was wanting to invert some pins but for something else and I am just not seeing where it's calling out the pins for the drives.
I definitely want my servo's powered off when I power up. The drives have an Inhibit signal instead of an enable signal. So It has to be pulled low to disable the drives. I was thinking of using a pin from the 7i42 to Inhibit the drives as well as wire it into the E-Stop for the extra insurance that I will be able to shut down the drives manually.
So I need to use the + side of the differential outputs and invert the pins so it's - which will power up and not activate? Seems simple enough. If you can send me a modified bitfile I can compare it to the standard file and probably get an understanding of how to change the bitfiles to suit my needs. I'll PM you with my email. Thank you so much.
I definitely want my servo's powered off when I power up. The drives have an Inhibit signal instead of an enable signal. So It has to be pulled low to disable the drives. I was thinking of using a pin from the 7i42 to Inhibit the drives as well as wire it into the E-Stop for the extra insurance that I will be able to shut down the drives manually.
So I need to use the + side of the differential outputs and invert the pins so it's - which will power up and not activate? Seems simple enough. If you can send me a modified bitfile I can compare it to the standard file and probably get an understanding of how to change the bitfiles to suit my needs. I'll PM you with my email. Thank you so much.
Please Log in or Create an account to join the conversation.
27 Apr 2011 22:30 #9431
by PCW
Replied by PCW on topic Re:Need Help Conf PWM Servo 5i20 w/ 7147S & 7I42
Comparing the bitfiles will not help (they are like compiled code)
I have included the one changed VHDL file that controls the contents and pinout
of the bitfile to show you how these are specified in the firmware source code.
Heres a new bitfile : SV4_7I47S.BIT specifically pinned out out for 7I47S.
This has 5 PWM/DIR outputs (4 for axis, one for spindle), 4 encoder inputs,
and no step/dir outputs
freeby.mesanet.com/5i20sv4_7i47s.zip
I have included the one changed VHDL file that controls the contents and pinout
of the bitfile to show you how these are specified in the firmware source code.
Heres a new bitfile : SV4_7I47S.BIT specifically pinned out out for 7I47S.
This has 5 PWM/DIR outputs (4 for axis, one for spindle), 4 encoder inputs,
and no step/dir outputs
freeby.mesanet.com/5i20sv4_7i47s.zip
Please Log in or Create an account to join the conversation.
28 Apr 2011 00:42 #9435
by Maglin
Replied by Maglin on topic Re:Need Help Conf PWM Servo 5i20 w/ 7147S & 7I42
Thank you for this. Much appreacated. Now I've been looking for where this is placed. I have 2.4.6 and 2.6.0 pre installed. I used the EMCLinux install CD and can't access Root which I'm guessing is where EMC is located and the files I need to add/replace. I'm doing more digging. I read the pin out and it's exactly what I was looking for. I'll just put the .bit file in my config folder and path it their for now.
Please Log in or Create an account to join the conversation.
28 Apr 2011 11:42 #9453
by BigJohnT
Replied by BigJohnT on topic Re:Need Help Conf PWM Servo 5i20 w/ 7147S & 7I42
The installed bit files are located in lib/firmware/hm2/
You can perform root things by using sudo then the command.
Some basic terminal commands are here.
www.linuxcnc.org/docview/html/common_Linux_FAQ.html
John
You can perform root things by using sudo then the command.
Some basic terminal commands are here.
www.linuxcnc.org/docview/html/common_Linux_FAQ.html
John
Please Log in or Create an account to join the conversation.
28 Apr 2011 20:51 #9467
by Maglin
Replied by Maglin on topic Re:Need Help Conf PWM Servo 5i20 w/ 7147S & 7I42
Thank you. I wish I would have learned Linux in the 90's instead of DOS. It's true as you get older it does take a little longer to learn stuff. I hope to this this running tonight with good results.
Please Log in or Create an account to join the conversation.
01 May 2011 18:02 #9527
by Maglin
Replied by Maglin on topic Re:Need Help Conf PWM Servo 5i20 w/ 7147S & 7I42
Where do I put the .vhd file? I placed it with the .bit file in the firmware directory. I think I'm starting to get a grasp on how the ini and hal files work together. The HAL file has the pins and the ini has most of the values to use.
So I'm starting off with a pncconf file since it makes calls for the 7i47S pins. Here is my X section:
#*******************
# AXIS X
#*******************
setp pid.x.Pgain [AXIS_0]P
setp pid.x.Igain [AXIS_0]I
setp pid.x.Dgain [AXIS_0]D
setp pid.x.bias [AXIS_0]BIAS
setp pid.x.FF0 [AXIS_0]FF0
setp pid.x.FF1 [AXIS_0]FF1
setp pid.x.FF2 [AXIS_0]FF2
setp pid.x.deadband [AXIS_0]DEADBAND
setp pid.x.maxoutput [AXIS_0]MAX_OUTPUT
net x-index-enable <=> pid.x.index-enable
# ---PWM Generator signals/setup---
setp hm2_5i20.0.pwmgen.00.output-type 1
setp hm2_5i20.0.pwmgen.00.scale [AXIS_0]OUTPUT_SCALE
net xenable => pid.x.enable
net xoutput pid.x.output => hm2_5i20.0.pwmgen.00.value
net xpos-cmd axis.0.motor-pos-cmd => pid.x.command
net xenable axis.0.amp-enable-out => hm2_5i20.0.pwmgen.00.enable
To invert the output would I change
setp hm2_5i20.0.pwmgen.00.output-type 1
to
setp hm2_5i20.0.pwmgen.00.output-type 1 invert
I've been busy and today I have the time to get this all setup. I'm thinking it would be ok to use the pncconf files and modify them to use the right bit file and change the outputs and what not to work. I also know I can't use pncconf to do any changes down the road and I'll have to do that manually. I'm going to just comment out stuff not implamented yet but that I'm going to add down the road so I already have it in my file.
So I'm starting off with a pncconf file since it makes calls for the 7i47S pins. Here is my X section:
#*******************
# AXIS X
#*******************
setp pid.x.Pgain [AXIS_0]P
setp pid.x.Igain [AXIS_0]I
setp pid.x.Dgain [AXIS_0]D
setp pid.x.bias [AXIS_0]BIAS
setp pid.x.FF0 [AXIS_0]FF0
setp pid.x.FF1 [AXIS_0]FF1
setp pid.x.FF2 [AXIS_0]FF2
setp pid.x.deadband [AXIS_0]DEADBAND
setp pid.x.maxoutput [AXIS_0]MAX_OUTPUT
net x-index-enable <=> pid.x.index-enable
# ---PWM Generator signals/setup---
setp hm2_5i20.0.pwmgen.00.output-type 1
setp hm2_5i20.0.pwmgen.00.scale [AXIS_0]OUTPUT_SCALE
net xenable => pid.x.enable
net xoutput pid.x.output => hm2_5i20.0.pwmgen.00.value
net xpos-cmd axis.0.motor-pos-cmd => pid.x.command
net xenable axis.0.amp-enable-out => hm2_5i20.0.pwmgen.00.enable
To invert the output would I change
setp hm2_5i20.0.pwmgen.00.output-type 1
to
setp hm2_5i20.0.pwmgen.00.output-type 1 invert
I've been busy and today I have the time to get this all setup. I'm thinking it would be ok to use the pncconf files and modify them to use the right bit file and change the outputs and what not to work. I also know I can't use pncconf to do any changes down the road and I'll have to do that manually. I'm going to just comment out stuff not implamented yet but that I'm going to add down the road so I already have it in my file.
Please Log in or Create an account to join the conversation.
01 May 2011 23:10 - 01 May 2011 23:13 #9530
by PCW
Replied by PCW on topic Re:Need Help Conf PWM Servo 5i20 w/ 7147S & 7I42
The .vhd file is of no particular use. Unless you are curious about what is changed in the firmware source to get the desired pinout. you can just delete it.
To invert any output (PWM, Step,Dir,GPIO) you invert the output at the actual pin. This is in the GPIO section of the HostMot2 manual. You can use the included .pin file to figure out what the GPIO number of the PWM output you want to invert is.
The command will be something like:
setp hm2_5i20.0.gpio.xxx.invert_output 1
Where xxx is the actual GPIO number
To invert any output (PWM, Step,Dir,GPIO) you invert the output at the actual pin. This is in the GPIO section of the HostMot2 manual. You can use the included .pin file to figure out what the GPIO number of the PWM output you want to invert is.
The command will be something like:
setp hm2_5i20.0.gpio.xxx.invert_output 1
Where xxx is the actual GPIO number
Last edit: 01 May 2011 23:13 by PCW.
Please Log in or Create an account to join the conversation.
Time to create page: 0.070 seconds