Prototrak Plus Retrofit with Mesa 7i77 & 5i25 cards

18 Feb 2017 22:38 #88199 by new2linux
Dan, thanks for your interest, your project looks great! Keep up the good work. I have read thru your project, and followed along, I have just got to a point where I am somewhat stuck. I cut/paste the errors from a linuxcnc launch, I just not shore what to be looking for.

emc@cnc ~ $ linuxcnc
LINUXCNC - 2.7.8
Machine configuration directory is '/home/emc/linuxcnc/configs/1st_LinuxCNC_Bridgeport'
Machine configuration file is '1st_LinuxCNC_Bridgeport.ini'
Starting LinuxCNC...
Found file(REL): ./1st_LinuxCNC_Bridgeport.hal
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.7
hm2_pci: discovered 5i25 at 0000:04:04.0
hm2/hm2_5i25.0: Smart Serial Firmware Version 43
Board hm2_5i25.0.7i77.0.0 Hardware Mode 0 = standard
Board hm2_5i25.0.7i77.0.0 Software Mode 0 = input_output
Board hm2_5i25.0.7i77.0.0 Software Mode 1 = io_analog
Board hm2_5i25.0.7i77.0.0 Software Mode 2 = io_analog_fieldvoltage
Board hm2_5i25.0.7i77.0.0 Software Mode 3 = io_encoder_analog_fieldvoltage
Board hm2_5i25.0.7i77.0.1 Hardware Mode 0 = standard
Board hm2_5i25.0.7i77.0.1 Software Mode 0 = analogout_enables
hm2/hm2_5i25.0: 34 I/O Pins used:
hm2/hm2_5i25.0: IO Pin 000 (P3-01): IOPort
hm2/hm2_5i25.0: IO Pin 001 (P3-14): IOPort
hm2/hm2_5i25.0: IO Pin 002 (P3-02): IOPort
hm2/hm2_5i25.0: IO Pin 003 (P3-15): Smart Serial Interface #0, pin TxData1 (Output)
hm2/hm2_5i25.0: IO Pin 004 (P3-03): Smart Serial Interface #0, pin RxData1 (Input)
hm2/hm2_5i25.0: IO Pin 005 (P3-16): Smart Serial Interface #0, pin TxData0 (Output)
hm2/hm2_5i25.0: IO Pin 006 (P3-04): Smart Serial Interface #0, pin RxData0 (Input)
hm2/hm2_5i25.0: IO Pin 007 (P3-17): Muxed Encoder Select #0, pin Mux Select 0 (Output)
hm2/hm2_5i25.0: IO Pin 008 (P3-05): Muxed Encoder #0, pin Muxed A (Input)
hm2/hm2_5i25.0: IO Pin 009 (P3-06): Muxed Encoder #0, pin Muxed B (Input)
hm2/hm2_5i25.0: IO Pin 010 (P3-07): Muxed Encoder #0, pin Muxed Index (Input)
hm2/hm2_5i25.0: IO Pin 011 (P3-08): Muxed Encoder #1, pin Muxed A (Input)
hm2/hm2_5i25.0: IO Pin 012 (P3-09): Muxed Encoder #1, pin Muxed B (Input)
hm2/hm2_5i25.0: IO Pin 013 (P3-10): Muxed Encoder #1, pin Muxed Index (Input)
hm2/hm2_5i25.0: IO Pin 014 (P3-11): Muxed Encoder #2, pin Muxed A (Input)
hm2/hm2_5i25.0: IO Pin 015 (P3-12): Muxed Encoder #2, pin Muxed B (Input)
hm2/hm2_5i25.0: IO Pin 016 (P3-13): Muxed Encoder #2, pin Muxed Index (Input)
hm2/hm2_5i25.0: IO Pin 017 (P2-01): IOPort
hm2/hm2_5i25.0: IO Pin 018 (P2-14): IOPort
hm2/hm2_5i25.0: IO Pin 019 (P2-02): IOPort
hm2/hm2_5i25.0: IO Pin 020 (P2-15): IOPort
hm2/hm2_5i25.0: IO Pin 021 (P2-03): IOPort
hm2/hm2_5i25.0: IO Pin 022 (P2-16): IOPort
hm2/hm2_5i25.0: IO Pin 023 (P2-04): IOPort
hm2/hm2_5i25.0: IO Pin 024 (P2-17): IOPort
hm2/hm2_5i25.0: IO Pin 025 (P2-05): IOPort
hm2/hm2_5i25.0: IO Pin 026 (P2-06): IOPort
hm2/hm2_5i25.0: IO Pin 027 (P2-07): IOPort
hm2/hm2_5i25.0: IO Pin 028 (P2-08): IOPort
hm2/hm2_5i25.0: IO Pin 029 (P2-09): IOPort
hm2/hm2_5i25.0: IO Pin 030 (P2-10): IOPort
hm2/hm2_5i25.0: IO Pin 031 (P2-11): IOPort
hm2/hm2_5i25.0: IO Pin 032 (P2-12): IOPort
hm2/hm2_5i25.0: IO Pin 033 (P2-13): IOPort
hm2/hm2_5i25.0: registered
hm2_5i25.0: initialized AnyIO board at 0000:04:04.0
Found file(REL): ./custom.hal
USRMOT: ERROR: invalid command
Linear move on line 11 would exceed joint 2's positive limit

this is where I am, any help would be greatly appreciated!!
18 Feb 2017 22:46 #88200 by tommylight
That means you can start Linuxcnc, but can not run a gcode program, right?
That error means that you have gcode going in negative direction, or to far in positive direction, OR that you do not have the ini settings as they should be for your machine.
In the in you have for each axis values for :
MIN_LIMIT = -100 <=== change this
MAX_LIMIT = 2000.0 <=== change this
you have to do that twice for each axis, if you are using 2.8pre, only once per axis if using 2.7 or earlier version of linuxcnc.
The following user(s) said Thank You: new2linux
18 Feb 2017 22:59 #88203 by new2linux
tommylight, many thanks to you!! I still can't get the servo to run under power. I have disconnected the other servo as to just work the one at a time.

Thanks for your help!
18 Feb 2017 23:40 - 18 Feb 2017 23:44 #88208 by lakeweb
So you can hit the E-Stop and hit the servo button and the control panel ungrays? No errors in the lower right? The panel has to ungray out to be up and running. If it is and you jog and the table doesn't move, you should absolutely get an error.

Update: and I checked, it would be a joint 0 following error
Best, Dan.
Last edit: 18 Feb 2017 23:44 by lakeweb.
The following user(s) said Thank You: new2linux
19 Feb 2017 00:52 #88211 by tommylight

Still not finished, but plenty of info so do give it a go and report back, also feedback on how useful it is or what should be added/removed/changed would be greatly appreciated.
The following user(s) said Thank You: new2linux
19 Feb 2017 11:57 #88251 by new2linux
tommylight, you have done a great job putting that sequence of steps together, many thanks!! Knowing with total confidence that I have gotten the setup close enough that I should see motion, but this is not so. I have gotten to this part of your Servo Tuning post.
" Plug only one and check if it functions properly enabling the drive when you press F2 on Linuxcnc. If it works, plug in the next one, if nor reverse the wires on the plug and test again, repeat for each drive separately. "

I know very early in the process, the one thing that I may have not considered enough is that earlier while moving all the components I shorted out the servo drive card thus allowing out some "magic smoke" and even though the power supply and servo drive work together with the original Ptrak, it appears it may have goofed up, this plug and play conf of linuxcnc. If there is something I'm missing in my approach or if possible to test another set of non standard, say go to (TB3 & TB4) ENCODER 2 & ENCODER 3 with (TB5) DRV 2 & DRV 3, just wondering.
19 Feb 2017 13:49 #88267 by tommylight
You can change ports as you like, but you will have to edit the hal file to get what you need at those ports. If i understood correctly, you asked if you can use other ports on the mesa card for tuning, right?
It does not mater what port for the output/enable/encoder you use, as long as you have them properly set in hal.
Please be aware that pncconf sometimes puts axis X at the analogout3 and encoder0, it did that twice on my configs, so it has to be edited or connectors plugged acordingly.
Just keep in mind that the first connector on the mesa board is always 0 in hal, for everything like analogout/encoder/input/output.
The following user(s) said Thank You: new2linux
20 Feb 2017 18:10 #88367 by new2linux
tommmylight, thank you for all your help! Attached are the error files after trying ENCODER 2 & 3; DRV 2 & 3 with "z" configured to 4. I had a few errors that I missed when reconfigured and have fixed those.

But cannot find " 'axis.3.motor-pos-cmd' does not exist"

Found line that looks close but it looks ok to me, for what thats worth. I attached all files that may help, please point me in the right direction.

Many thanks to all who may be able to help!
20 Feb 2017 18:31 #88368 by PCW
That error is should be expected (unless you have a 4 axis config)
since with a simple XYZ machine you would only have


Also you have a rather bizzare axis --> hardware mapping

Normally you would have
X mapped to encoder 0, analog out 0, axis command and feedback 0
Y mapped to encoder 1, analog out 1, axis command and feedback 1
Z mapped to encoder 2, analog out 2, axis command and feedback 2
The following user(s) said Thank You: new2linux
20 Feb 2017 18:47 - 20 Feb 2017 18:50 #88371 by lakeweb
I am a novice but starting with pncconf looks, well... For instance it has you using joints 2, 3, and 4 rather than 0, 1, and 2. I've never started with pncconf so can't say. I started with the from Mesa. I can't find the link with a google search, they must have a no robots on the folder. I'll find it if you are interested.

But it just worked pretty much right out of the box with x,y, and z where they should be. I'm going to do the research as to why you don't have linux joints above axis.2. But out of the box I've only ever see x,y, and z.

I'm following a long as I'm learning as much as talking too much. :) But personally I'd use 0,1, and 2 rather than try to make it work with 2,3, and 4.

Best, Dan.

jAnd there it is from Peter. You can change your ini and hal files that you have now or get the zip.
Last edit: 20 Feb 2017 18:50 by lakeweb.
Moderators: piasdom
Time to create page: 0.107 seconds
Powered by Kunena Forum