China CNC3040 (from Ebay) with Mesa 7i92 and TB6560 drivers

More
30 Jun 2021 21:26 #213376 by DannyG
This is just my example setup (hopefully easy to follow?).
The TB6560 drivers are what comes with the machine/router, and work ok.

Example setup instructions for China CNC3040 with Mesa 7i92 and TB6560 drivers


STEP 1

download LinuxCNC:
linuxcnc-2.8.0-buster.iso

I burn to DVD, so I can put in a sleeve and store for disaster recovery.
Bootable USB works too.

Install LinuxCNC

STEP 2

Change to network-manager app:
forum.linuxcnc.org/27-driver-boards/3559...ethernet-mesa-boards

sudo apt-get install network-manager network-manager-gnome
sudo apt-get remove wicd wicd-gtk

install GDEBI for use in a future step
sudo apt install gdebi

Reboot (not completely necessary, but I like to be safe).


STEP 3

Setup Network for Mesa cards
forum.linuxcnc.org/27-driver-boards/3559...ethernet-mesa-boards

Network setup for mesa cards:
- right click on the network manager on the bottom right side or upper right side where the clock and volume is.
- choose "edit connections"
- double click on the network you want to edit ( usually "wired connection X")
- click on the "IPv4 settings" tab
- choose "manual" on the "method" drop down menu
- click on "add"
- write the address as 10.10.10.11
- never use 10.10.10.1 or 10.10.10.10 for the above
- netmask should be left as is ( usually 8 )
- gateway should always be 10.10.10.1
- additional DNS servers should be 10.10.10.1
Save, close, left click on the network manager and click on the "wired connection X", it should take about 3 seconds to reconnect.
Now open a terminal and do Ping 10.10.10.10, you should get normal reply form the Mesa card. If you do not get a reply, double check your settings.

STEP 4

Set jumpers on Mesa card (7i92)
W5 = move towards the edge of the board
W6 = move towards center of board

connect +5V to power header (GND is at edge of board, +5V is towards center of board)

connect ethernet cable to PC and Mesa card

STEP 5

install 7i92 config tool (gnipsel.com/mesa/7i92/install.html)

download the DEB file to LinuxCNC machine (github.com/jethornton/7i96/raw/master/7i92_0.0.1_all.deb)

I needed to open GDEBI manually, as right-clicking on the DEB file did not work
from applications, select GDEBI app
from GDEBI app, open and install the downloaded DEB file

STEP 6

Open the Mesa config tool (from STEP 5)
Applications -> CNC -> 7i92 Config Tool

On Machine tab, in the Firmware group:
a.  select firmware G540x2D
b.  click Flash button
c.  close config tool app
d.  power-cycle the Mesa board
e.  re-open config tool app
f.  click Read in Firmware group (verify fw was written)
g.  close config tool app

STEP 7

Open PncConf ( Applications -> CNC -> PncConf wizard )
click START
---Start
* Create New Config
* Create Desktop Shortcut
* Create a Desktop Launcher
click Forward
---Base Infomation (complete as desired)
* Mesa0 PCI/Etho/Parport Card
* None (parport)
click Forward
---Screen (complete as desired, I leave with defaults)
click Forward
---VCP (I don't use, leave unchecked)
click Forward
---Mesa Card 0
Board Name:  7i92 internal data
Firmware:  G540x2
click Accept Components Changes
--SETUP of PORT 2 on 7i92--
select TAB:  I/O Connector 2
(this page is REALLY confusing, and doesn't correspond intuitively to pin numbers)
CNC 3040 motor driver's parallel port pinout:
X step = pin2
X dir  = pin3
Y step = pin4
Y dir  = pin 5
Z step = pin 6
Z dir  = pin 7

IO Connections for P2 (from G540x2d.pin file)
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir
 2      2   IOPort       StepGen          0        Step/Table1     (Out)
 3      4   IOPort       StepGen          0        Dir/Table2      (Out)
 4      6   IOPort       StepGen          1        Step/Table1     (Out)
 5      8   IOPort       StepGen          1        Dir/Table2      (Out)
 6      9   IOPort       StepGen          2        Step/Table1     (Out)
 7     10   IOPort       StepGen          2        Dir/Table2      (Out)
 
NUM on the I/O Connector 2 page corresponds with the Chan of the pin file.
X Step is ch0
X Dir is ch0 (check invert on X Axis StepGen -> Dir Gen-B)
Y Step is ch1
Y Dir is ch1 (check invert on Y Axis StepGen -> Dir Gen-B)
Z Step is ch2
Z Dir is ch2 (check invert on Z Axis StepGen -> Dir Gen-B)

click Forward
-- X Motor (actually, all 3 motors)
Stepper Scale   = 400 (400 steps / mm)
Step On Time    = 10000 
Step Space      = 10000
Direction Hold  = 10000
Direction Setup = 10000
(NOTE: these values will be modified later in the .INI file)
click Forward
-- X Axis
Positive Travel Distance = 300  (Y = 400, and Z = 25)
Negative Travel Distance = 0    (Y = 0, and Z = -25)

continue on for Y and Z axis.
Click Complete
this will create a "launch" icon on the desktop, and a folder on the desktop.
(if starting linuxCNC now, motors may or may not move.  if they do move, it won't be very smooth)

STEP 8

On the desktop, open the folder created from previous step
edit the .INI file (there is only one, right click and open with GEANY)
for EACH axis, modify the following lines:

DIRSTEP   = 20000
DIRHOLD   = 20000
STEPLEN   = 20000
STEPSPACE = 20000

save and close the .INI file
(NOTE:  this is only a STARTING point.  need to fine-tune based on performance)
(Warning:  DO NOT open PNCCONF Wizard to edit this config, as the INI file will get overwritten)

STEP 9

Open LinuxCNC and test out each axis
each axis should move smoothly.
now fine-tune the INI file by iteratively lowering the DIRSTEP, DIRHOLD, STEPLEN, STEPSPACE

Good luck!!!!!
The following user(s) said Thank You: BigJohnT, Alfadeko, tommylight, javanree, harry4516

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

More
30 Jun 2021 21:54 #213386 by BigJohnT
Just so you know Chris is changing the step timing limit to 50,000 in Pncconf which should cover the slowest drive on the planet. The only reason there is a limit at all is Gtk requires one.

JT

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

More
30 Jun 2021 22:03 #213388 by PCW

now fine-tune the INI file by iteratively lowering the DIRSTEP, DIRHOLD, STEPLEN, STEPSPACE
 

Note that there is really no need to tune the DIR SETUP or DIR HOLD values as there is no performance
disadvantage in making them very large.

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

More
29 Oct 2021 11:09 - 31 Oct 2021 09:04 #224639 by harry4516
thanks a lot DannyG, you are my hero !
that explains a lot in the very confusing pncconf port setup page.
Really hard to understand for a beginner, but no more problem with your explanation.

If another beginner, like me, is reading this some more clarification about
NUM on the I/O Connector 1 or 2 page:

1-digit numbers:
Channel number for alternative functions like stepper, PWM...

3-digit numbers:
I/O number in the pin file.

To get the connector-pin-number see the pin file, where Connector-Pin, I/O number and channel are listed.

Connector-Pins refer to the pinout of standard Dsub-25 parallel port connectors,
but many mesa cards use 26 pin ribbon cable connectors.

To make that clear and avoid misunderstandings I use an Excel sheet for my 7i92 with G540x2D bitfile flashed.
 

File Attachment:

File Name: ports_7i92.ods.zip
File Size:15 KB

i hope this helps someone. I was totally confused by the different numbers and it took me a day to understand how these many numbers are related to each other.
Attachments:
Last edit: 31 Oct 2021 09:04 by harry4516.

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

Moderators: PCWjmelson
Time to create page: 0.274 seconds
Powered by Kunena Forum