how do i migrate from parallel port to mesa 5i25?
i got a mesa 5i25 and installed it in my pc. i cant figure out how to assign pin functions to match my BOB wiring. im running a c10 breakout board and have been running it on mach 3/ ess, then emc2 off of the parallel port. it was easy to setup the parallel port and linuxcnc. how can i get all my pin settings into the mesa?
i tried the PROB_RFX2 setup but the pin numbers make no sense and most of them are not available to change in pncconf.
Re: how do i migrate from parallel port to mesa 5i25?
Quote:
Originally Posted by
MCRIPPPer
i got a mesa 5i25 and installed it in my pc. i cant figure out how to assign pin functions to match my BOB wiring. im running a c10 breakout board and have been running it on mach 3/ ess, then emc2 off of the parallel port. it was easy to setup the parallel port and linuxcnc. how can i get all my pin settings into the mesa?
i tried the PROB_RFX2 setup but the pin numbers make no sense and most of them are not available to change in pncconf.
If the Probrfx2 configuration doesn't match your BOB I would take a look at the pinout files (files ending in .pin) in the 5i25.zip file
if you have a close to correct pinout in the firmware a pncconfig created hal file made for the g540x
should be close for most other simple BOBs and should require only minor editing to get going
Re: how do i migrate from parallel port to mesa 5i25?
i cant figure out how to get the g540 setup to show up in pncconf. i downloaded the "support software" and it is in my hm2 file.
the g540 setup has the step and direction pins matching my wiring.
Re: how do i migrate from parallel port to mesa 5i25?
What I would do is make a config for the probrfx2, make sure you have g540x2 firmware in the 5I25
and edit the few possible GPIO conflicts in created hal file.
Re: how do i migrate from parallel port to mesa 5i25?
McRippper,
I'm not sure of your overall familiarity or comfort level with LinuxCNC, but as Peter has mentioned if you can work with one of the probrfx2 or g540x2 files generated by PNCCONF or provided in the system 'sample' configuration files, you can edit the ini and hal files to meet your needs. Of course you still have to maintain or honor the Mesa firmware configuration, in other words set hardware configurations.
If you have not already, the LinuxCNC documentation including user manual, HAL manual, and Integrator's manual are excellent resources to help you dip your toe in the water, or dive into the deep end if you desire. The LinucCNC forum's may also have posts and experiences similar to yours regarding implementation of your hardware combination, Mesa 5i25 and Probotix RF bob.
I understand you already have the Probotix board, but have you considered a Mesa daughter card just to clear this hurdle quicker with a one vendor solution?
Good Luck, and maybe you can share your outcome for any that follow in your path.
Re: how do i migrate from parallel port to mesa 5i25?
well i just need to figure out how to get my step (pins 2,4,6) and direction(3,5,7 ) on the right pins of the parallel cable.
Re: how do i migrate from parallel port to mesa 5i25?
Quote:
Originally Posted by
MCRIPPPer
well i just need to figure out how to get my step (pins 2,4,6) and direction(3,5,7 ) on the right pins of the parallel cable.
This is done by choosing the proper firmware, and flashing that firmware into the 5I25 card
You can check for suitable pinout by looking at the various .pin files in the 5i25 support zip file
(in configs/hostmot2)
for example selecting the g540 pinout:
sudo mesaflash --device 5i25 --write 5i25_g540x2.bit
(write the bitfile 5i25_g540x2 into the 5I25s EEPROM)
sudo mesaflash --device 5i25 --reload
(reload the FPGA from the EEPROM)
you can check the pinout of the current firmware with this command:
sudo mesaflash --device 5i25 --readhmid > mypinout.txt
and then reading mypinout .txt with text editor like gedit (for LinuxCNC on Ubuntu) or mousepad (For LinuxCNC on Debian Wheezy)
Re: how do i migrate from parallel port to mesa 5i25?
so i can program the mesa via the terminal?
Re: how do i migrate from parallel port to mesa 5i25?
Quote:
Originally Posted by
PCW_MESA
This is done by choosing the proper firmware, and flashing that firmware into the 5I25 card
You can check for suitable pinout by looking at the various .pin files in the 5i25 support zip file
(in configs/hostmot2)
for example selecting the g540 pinout:
sudo mesaflash --device 5i25 --write 5i25_g540x2.bit
(write the bitfile 5i25_g540x2 into the 5I25s EEPROM)
sudo mesaflash --device 5i25 --reload
(reload the FPGA from the EEPROM)
you can check the pinout of the current firmware with this command:
sudo mesaflash --device 5i25 --readhmid > mypinout.txt
and then reading mypinout .txt with text editor like gedit (for LinuxCNC on Ubuntu) or mousepad (For LinuxCNC on Debian Wheezy)
terminal always says command not found. does pncconf flash the card or do i still need to figure out how to do it manually?
i created a setup in pncconf using 5i25_dmmbob1x2 (almost exacly like my current setup according to the pin file). but the README file pinout does not match what the .pin file says.
which row is the parallel port pin#? im guessing second row.
README generated by pncconf (only worried about the primary connector right now)
firmware is: 5i25_dmmbob1x2
** Mesa 5i25/configs/hostmot2 -> Board # 0 connector 3 **
connector board num component signal
number position type name
is this
the
pin or
#? this?
P3-1 0 (0 Pulse Width Gen-P) s-pwm-pulse
P3-3 1 (1 GPIO Input) spindle-manual-ccw
P3-5 2 (0 Dir Gen-B) x-stepgen-dir
P3-7 3 (3 GPIO Input) unused-input
P3-9 4 (0 Step Gen-A) x-stepgen-step
P3-11 5 (5 GPIO Input) unused-input
P3-13 6 (1 Dir Gen-B) y-stepgen-dir
P3-15 7 (7 GPIO Input) estop-ext
P3-17 8 (1 Step Gen-A) y-stepgen-step
P3-19 9 (2 Dir Gen-B) z-stepgen-dir
P3-21 10 (2 Step Gen-A) z-stepgen-step
P3-23 11 (11 GPIO Input) unused-input
P3-25 12 (12 GPIO Input) unused-input
P3-27 13 (13 GPIO Input) unused-input
P3-29 14 (14 GPIO Input) unused-input
P3-31 15 (15 GPIO Input) unused-input
P3-33 16 (16 GPIO Output) unused-output
P3-35 17 (0 Not Used) unused-unused
P3-37 18 (0 Not Used) unused-unused
P3-39 19 (0 Not Used) unused-unused
P3-41 20 (0 Not Used) unused-unused
P3-43 21 (0 Not Used) unused-unused
P3-45 22 (0 Not Used) unused-unused
P3-47 23 (0 Not Used) unused-unused
5i25_dmmbob1x2
Configuration pin-out:
IO Connections for P3
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir
what number is what?
1 0 IOPort PWMGen 0 PWM (Out)
14 1 IOPort None
2 2 IOPort StepGen 0 Dir (Out) step/ direction seem to be on the pins i want i think?
15 3 IOPort None
3 4 IOPort StepGen 0 Step (Out)
16 5 IOPort None
4 6 IOPort StepGen 1 Dir (Out)
17 7 IOPort None
5 8 IOPort StepGen 1 Step (Out)
6 9 IOPort StepGen 2 Dir (Out)
7 10 IOPort StepGen 2 Step (Out)
8 11 IOPort StepGen 3 Dir (Out)
9 12 IOPort StepGen 3 Step (Out)
10 13 IOPort None
11 14 IOPort QCount 0 Quad-A (In)
12 15 IOPort QCount 0 Quad-B (In)
13 16 IOPort QCount 0 Quad-IDX (In)
another issue i have with any od the configs i made with pncconf is startup error of linuxcnc.
debug section says:
Debug file information:
my_CNC_machine.hal:10: parameter or pin 'hm2_5i25.0.pwmgen.pwm_frequency' not found
2530
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
Re: how do i migrate from parallel port to mesa 5i25?
Quote:
Originally Posted by
MCRIPPPer
terminal always says command not found. does pncconf flash the card or do i still need to figure out how to do it manually?
i created a setup in pncconf using 5i25_dmmbob1x2 (almost exacly like my current setup according to the pin file). but the README file pinout does not match what the .pin file says.
which row is the parallel port pin#? im guessing second row.
README generated by pncconf (only worried about the primary connector right now)
firmware is: 5i25_dmmbob1x2
** Mesa 5i25/configs/hostmot2 -> Board # 0 connector 3 **
connector board num component signal
number position type name
is this
the
pin or
#? this?
P3-1 0 (0 Pulse Width Gen-P) s-pwm-pulse
P3-3 1 (1 GPIO Input) spindle-manual-ccw
P3-5 2 (0 Dir Gen-B) x-stepgen-dir
P3-7 3 (3 GPIO Input) unused-input
P3-9 4 (0 Step Gen-A) x-stepgen-step
P3-11 5 (5 GPIO Input) unused-input
P3-13 6 (1 Dir Gen-B) y-stepgen-dir
P3-15 7 (7 GPIO Input) estop-ext
P3-17 8 (1 Step Gen-A) y-stepgen-step
P3-19 9 (2 Dir Gen-B) z-stepgen-dir
P3-21 10 (2 Step Gen-A) z-stepgen-step
P3-23 11 (11 GPIO Input) unused-input
P3-25 12 (12 GPIO Input) unused-input
P3-27 13 (13 GPIO Input) unused-input
P3-29 14 (14 GPIO Input) unused-input
P3-31 15 (15 GPIO Input) unused-input
P3-33 16 (16 GPIO Output) unused-output
P3-35 17 (0 Not Used) unused-unused
P3-37 18 (0 Not Used) unused-unused
P3-39 19 (0 Not Used) unused-unused
P3-41 20 (0 Not Used) unused-unused
P3-43 21 (0 Not Used) unused-unused
P3-45 22 (0 Not Used) unused-unused
P3-47 23 (0 Not Used) unused-unused
5i25_dmmbob1x2
Configuration pin-out:
IO Connections for P3
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir
what number is what?
1 0 IOPort PWMGen 0 PWM (Out)
14 1 IOPort None
2 2 IOPort StepGen 0 Dir (Out) step/ direction seem to be on the pins i want i think?
15 3 IOPort None
3 4 IOPort StepGen 0 Step (Out)
16 5 IOPort None
4 6 IOPort StepGen 1 Dir (Out)
17 7 IOPort None
5 8 IOPort StepGen 1 Step (Out)
6 9 IOPort StepGen 2 Dir (Out)
7 10 IOPort StepGen 2 Step (Out)
8 11 IOPort StepGen 3 Dir (Out)
9 12 IOPort StepGen 3 Step (Out)
10 13 IOPort None
11 14 IOPort QCount 0 Quad-A (In)
12 15 IOPort QCount 0 Quad-B (In)
13 16 IOPort QCount 0 Quad-IDX (In)
another issue i have with any od the configs i made with pncconf is startup error of linuxcnc.
debug section says:
Debug file information:
my_CNC_machine.hal:10: parameter or pin 'hm2_5i25.0.pwmgen.pwm_frequency' not found
2530
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
pncconf does not change the firmware in the FPGA card, only mesaflash can do that
If you get a command not found error with mesaflash it probably means your LinuxCNC installation is not up to date
since mesaflash is installed on the latest linuxcnc versions
So for various reasons I would first update to the latest released version of linuxcnc (2.6.8)
and then use mesaflash to write the desired firmware to the 5I25 card
The hm2_5i25.0.pwmgen.pwm_frequency not found error is expected if the currently loaded firmware does not have a pwm generator
The readme pinout is not a real reference to the pinout, only
sudo mesaflash --device 5i25 --readhmid is
As the header in the printout says, the pinout table fields are:
Pin# (DB25 pin number)
I/O (GPIO number)
Pri function (always I/O port for HostMot2)
Sec Function (StepGen PWMGen etc)
Channel
Pin function (if not GPIO)
Pin direction (if not GPIO)
Re: how do i migrate from parallel port to mesa 5i25?
i updated to the latest linuxcnc right after installing from a cd about one month ago. i have mesaflash in my 5i25/utility/ folder. i just dont know how to use it. i have only just started using linux for my cnc mill so im still learning about the weird stuff i have to do to get things to work.
Re: how do i migrate from parallel port to mesa 5i25?
Quote:
Originally Posted by
MCRIPPPer
i updated to the latest linuxcnc right after installing from a cd about one month ago. i have mesaflash in my 5i25/utility/ folder. i just dont know how to use it. i have only just started using linux for my cnc mill so im still learning about the weird stuff i have to do to get things to work.
mesaflash should be installed in your system but if not, you can install it with
sudo apt-get install mesaflash
then you use it as I explained above
( first trying "sudo mesaflash --device 5i25 --readhmid" )
the mesaflash in the utilities directory is old and not used
Re: how do i migrate from parallel port to mesa 5i25?
that worked. thanks! i thought it was installed already from the support software...
Re: how do i migrate from parallel port to mesa 5i25?
i reflashed it and reloaded the fpga and read the pinout and it does not match the pinout file. (channel numbers dont line up with the same pins) im assuming each axis is a channel when it comes to step/direction.
i still get the startup error even after restart.
edit... my bad. it says 5i25_dmmbob1x2.bit cant be found. what do i need to do to find it?
Re: how do i migrate from parallel port to mesa 5i25?
anyone know where i need to put the 5i25 support software so it will work with mesaflash?
edit: got it to work by copying the .bit file to my home folder.
Re: how do i migrate from parallel port to mesa 5i25?
Quote:
Originally Posted by
MCRIPPPer
anyone know where i need to put the 5i25 support software so it will work with mesaflash?
It does not matter where you put the bitfiles, but the mesaflash command line must have a path to the file
so in the simplest case, you run mesaflash in the directory with the bitfiles so you dont need to provide a path
Re: how do i migrate from parallel port to mesa 5i25?
i got it working finally. thanks for your patience and help.
all i had to do was add a few lines into hal to reverse some pins and move my spindle wires on my BOB.
the only issue i have is that my GUI (axis) reacts slowly when the spindle is on. (it did that on the parallel port too), it is better with the mesa, but not fixed completely. but now at least i can type a letter and have a 50% chance of it entering into the MDI. before i would have to keep tapping a key for a while until it would notice. (usb keyboard)
Re: how do i migrate from parallel port to mesa 5i25?
Quote:
Originally Posted by
MCRIPPPer
i got it working finally. thanks for your patience and help.
all i had to do was add a few lines into hal to reverse some pins and move my spindle wires on my BOB.
the only issue i have is that my GUI (axis) reacts slowly when the spindle is on. (it did that on the parallel port too), it is better with the mesa, but not fixed completely. but now at least i can type a letter and have a 50% chance of it entering into the MDI. before i would have to keep tapping a key for a while until it would notice. (usb keyboard)
This may in fact be a electrical noise issue, especially if you have VFD driving your spindle...
Re: how do i migrate from parallel port to mesa 5i25?
it uses a brushless dc system, so i guess it could be pretty noisy. i will look into it.