Interfacing Mesa 7i77 to retrofit servo hardware
03 Aug 2016 19:42 - 03 Aug 2016 19:44 #78336
by jwsigler
Interfacing Mesa 7i77 to retrofit servo hardware was created by jwsigler
I have my Journeyman Tree 325 retrofit complete as far as the hardware goes. All I have left to do is to tie LinuxCNC into the 7i77 hardware through the hal interface, which is where I could use some help.
As you can see from the attached photos, in my cabinet I have the Linux PC (E), a 24 VDC power Supply (C), a switched power strip ( D ), the Mesa 7i77 board (A), the original control relays from the Dynapath Delta 20 ( F ) and a connector panel ( B ). My control panel, shown in the second photo, is based upon a ACER T232HL touchscreen monitor. The monitor came with a clear bottom bezel which I machined for the control buttons and then painted the back side black and mounted a rear shield over the bezel to cover the switches. The control panel has a single SPST switch which applies 110VAC to the power strip inside the cabinet. The PC has been modified so that as soon as it sees 110VAC power coming into the power supply, it will boot up so I never have to open the cabinet when I am machining. The switched power strip also turns on the 24 VDC power supply which powers the 7i77 board. I did retain most of the wiring from the original Dynapath controller which was on the mill. This included the relays ( F ) which enable the machine, function the drawbar, handle excess errors, and provide an interlock when the spindle is running. I kept the original wiring harnesses and fabricated a connector Panel ( B ) containing 37 and 15 DP connectors for the original Dynapath cables. I added two 25 DP connectors for cables running to the control panel and the MPG handwheel.
Now the big question is how do I set this puppy up for the hardware and software interface?
If I can get some help understanding a couple basic examples, I should be able to figure out the rest. I have looked at PNCConf, and generated a basic file, but my control approach is a more custom design than what is offered in the generic options provided by PNCconf. I would rather be able to understand the basic hal commands and then simply create a hal file using a text editor. I think I would be able to understand what I am doing better this way, and I can include a multitude of comment statements in my hal file so I can remember what each line is doing. There may also be the option of using Classic Ladder to program the controller logic, but I am not sure if that is a good approach or not.
Following are the basic examples I am looking to figure out:
1) on the 7i77 board, hm2_5i25.0.7i77.0.0.input-6 senses a 24 VDC signal coming from my "Reset" button. If the 7i77 senses power on this input, I want the 7i77 to momentarily, for as long as the "Reset" button is ON, turn ON, apply power through, hm2_5i25.0.7i77.0.0.output-03, which will apply power to one of my existing relays. I think I need two hal statements; one which says turn on output3 when input6 is on, and one which says turn output3 off when input 6 is off, in order to get the momentary functionality. This would not be a time critical function, so it could operate at the slower cycle rate, not at the faster servo period. What would be the hal commands to make this work?
2) on the 7i77 board, hm2_5i25.0.7i77.0.0.input-00 will read a voltage between 0 and 24 VDC. this voltage comes through a variable resistor on the control panel and is used to adjust the feed rate from 0 to 150%. Any suggestions as the hal commands to make this work?
3) I am using the 7i77 board configuration because I am running the original servos on my machine. I had the wiring schematics from the old Dynapath controller so I wired the X axis servo (as an example) to pins 1 through 8 on connector TB3 exactly as it should be, (QA0, QB0, etc) and I wired the analog signal to power the X axis to the AOUT0 and Gnd of pins 4 and 3 on connector TB5. (I am not using the ENA0- and ENA0+ signals because the way the old Dynapath was wired, if anything goes wrong, (limit switch, E-stop, motor overload, etc), relay number one gets turned off and it disables all the servos). Can anyone give me an example of their Hal file which shows how any one of the servos is called out. I looked at the Hal file my attempt at using PNCconf created, but I do not see where in the Hal file it defines where the QA0, /QA0. QB0,/QB), etc, connections are specified. I may have totally screwed this part of the PNCconf setup up. I will include the hal and ini files that I created using PNCconf, but do not laugh and do not assume that these are any good at all.
Finally, if anyone has a set of hal and an ini files for a system that uses servos through a MESA 7i77 board, I would greatly appreciate it if you can send me those files so I can use them as a template. Also, if I am going at this totally wrong and I should be using Classic Ladder for setting up my control logic, please let me know.
Thanks.
As you can see from the attached photos, in my cabinet I have the Linux PC (E), a 24 VDC power Supply (C), a switched power strip ( D ), the Mesa 7i77 board (A), the original control relays from the Dynapath Delta 20 ( F ) and a connector panel ( B ). My control panel, shown in the second photo, is based upon a ACER T232HL touchscreen monitor. The monitor came with a clear bottom bezel which I machined for the control buttons and then painted the back side black and mounted a rear shield over the bezel to cover the switches. The control panel has a single SPST switch which applies 110VAC to the power strip inside the cabinet. The PC has been modified so that as soon as it sees 110VAC power coming into the power supply, it will boot up so I never have to open the cabinet when I am machining. The switched power strip also turns on the 24 VDC power supply which powers the 7i77 board. I did retain most of the wiring from the original Dynapath controller which was on the mill. This included the relays ( F ) which enable the machine, function the drawbar, handle excess errors, and provide an interlock when the spindle is running. I kept the original wiring harnesses and fabricated a connector Panel ( B ) containing 37 and 15 DP connectors for the original Dynapath cables. I added two 25 DP connectors for cables running to the control panel and the MPG handwheel.
Now the big question is how do I set this puppy up for the hardware and software interface?
If I can get some help understanding a couple basic examples, I should be able to figure out the rest. I have looked at PNCConf, and generated a basic file, but my control approach is a more custom design than what is offered in the generic options provided by PNCconf. I would rather be able to understand the basic hal commands and then simply create a hal file using a text editor. I think I would be able to understand what I am doing better this way, and I can include a multitude of comment statements in my hal file so I can remember what each line is doing. There may also be the option of using Classic Ladder to program the controller logic, but I am not sure if that is a good approach or not.
Following are the basic examples I am looking to figure out:
1) on the 7i77 board, hm2_5i25.0.7i77.0.0.input-6 senses a 24 VDC signal coming from my "Reset" button. If the 7i77 senses power on this input, I want the 7i77 to momentarily, for as long as the "Reset" button is ON, turn ON, apply power through, hm2_5i25.0.7i77.0.0.output-03, which will apply power to one of my existing relays. I think I need two hal statements; one which says turn on output3 when input6 is on, and one which says turn output3 off when input 6 is off, in order to get the momentary functionality. This would not be a time critical function, so it could operate at the slower cycle rate, not at the faster servo period. What would be the hal commands to make this work?
2) on the 7i77 board, hm2_5i25.0.7i77.0.0.input-00 will read a voltage between 0 and 24 VDC. this voltage comes through a variable resistor on the control panel and is used to adjust the feed rate from 0 to 150%. Any suggestions as the hal commands to make this work?
3) I am using the 7i77 board configuration because I am running the original servos on my machine. I had the wiring schematics from the old Dynapath controller so I wired the X axis servo (as an example) to pins 1 through 8 on connector TB3 exactly as it should be, (QA0, QB0, etc) and I wired the analog signal to power the X axis to the AOUT0 and Gnd of pins 4 and 3 on connector TB5. (I am not using the ENA0- and ENA0+ signals because the way the old Dynapath was wired, if anything goes wrong, (limit switch, E-stop, motor overload, etc), relay number one gets turned off and it disables all the servos). Can anyone give me an example of their Hal file which shows how any one of the servos is called out. I looked at the Hal file my attempt at using PNCconf created, but I do not see where in the Hal file it defines where the QA0, /QA0. QB0,/QB), etc, connections are specified. I may have totally screwed this part of the PNCconf setup up. I will include the hal and ini files that I created using PNCconf, but do not laugh and do not assume that these are any good at all.
Finally, if anyone has a set of hal and an ini files for a system that uses servos through a MESA 7i77 board, I would greatly appreciate it if you can send me those files so I can use them as a template. Also, if I am going at this totally wrong and I should be using Classic Ladder for setting up my control logic, please let me know.
Thanks.
Last edit: 03 Aug 2016 19:44 by jwsigler.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1414
03 Aug 2016 21:13 #78339
by Todd Zuercher
Replied by Todd Zuercher on topic Interfacing Mesa 7i77 to retrofit servo hardware
I'm not sure how much help it will be for you but here is a link to a 5i25/7i77 config I have running 4 torque mode servos (XYZW axis), using duel PID loops.
forum.linuxcnc.org/media/kunena/attachments/3190/slave-zw.zip
The config started out as an ordinary one made by PNCconfig.
It's been a long time since I made that setup and I am fuzzy on the details, but I don't think you need to worry about QA0, /QA0. QB0,/QB those connections are handled inside the hardware driver, you just assign the x-encoder to the appropriate set of connectors (0-5) and PNCconf takes care of the rest.
(not sure about #2 I haven't used that feature, but it you search around the forums the answer is there, I just don't remember the details.)
forum.linuxcnc.org/media/kunena/attachments/3190/slave-zw.zip
The config started out as an ordinary one made by PNCconfig.
It's been a long time since I made that setup and I am fuzzy on the details, but I don't think you need to worry about QA0, /QA0. QB0,/QB those connections are handled inside the hardware driver, you just assign the x-encoder to the appropriate set of connectors (0-5) and PNCconf takes care of the rest.
(not sure about #2 I haven't used that feature, but it you search around the forums the answer is there, I just don't remember the details.)
Please Log in or Create an account to join the conversation.
15 Aug 2016 15:45 #78805
by andypugh
This might be as simple as
You might want to use the "oneshot" HAL component to provide a pulse of fixed length:linuxcnc.org/docs/2.7/html/man/man9/oneshot.9.html
where "..." represents any existing parameters you have in there. At that point you should see a set of analogue value pins appear for inputs 0 to 3. (I _think_ that the 7i77 GPIO is in channel 0-0, if it doesn't work then try 020000)
Replied by andypugh on topic Interfacing Mesa 7i77 to retrofit servo hardware
1) on the 7i77 board, hm2_5i25.0.7i77.0.0.input-6 senses a 24 VDC signal coming from my "Reset" button. If the 7i77 senses power on this input, I want the 7i77 to momentarily, for as long as the "Reset" button is ON, turn ON, apply power through, hm2_5i25.0.7i77.0.0.output-03, which will apply power to one of my existing relays. I think I need two hal statements; one which says turn on output3 when input6 is on, and one which says turn output3 off when input 6 is off, in order to get the momentary functionality. This would not be a time critical function, so it could operate at the slower cycle rate, not at the faster servo period. What would be the hal commands to make this work?
This might be as simple as
net passthrough hm2_5i25.0.7i77.0.0.input-06 => hm2_5i25.0.7i77.0.0.output-03
You might want to use the "oneshot" HAL component to provide a pulse of fixed length:
loadrt oneshot
...
addf oneshot.0 servo-thread
...
net trigger hm2_5i25.0.7i77.0.0.input-06 => oneshot.0.in
net pulse oneshot.0.out => hm2_5i25.0.7i77.0.0.output-03
setp oneshot.0.width 0.25
You need to set the 7i77 card to mode 1 or 2. (default is 0). This is done by setting a parameter in the "loadrt hm2_pci" HAL line2) on the 7i77 board, hm2_5i25.0.7i77.0.0.input-00 will read a voltage between 0 and 24 VDC. this voltage comes through a variable resistor on the control panel and is used to adjust the feed rate from 0 to 150%. Any suggestions as the hal commands to make this work?
loadrt hm2_pci config="... sserial_port_0=20000000 ..."
Please Log in or Create an account to join the conversation.
Time to create page: 0.065 seconds