g2 icon indicating copy to clipboard operation
g2 copied to clipboard

Active 5 and 6 axis

Open qiwalker opened this issue 5 years ago • 48 comments

Hi.... I already flash g2core to my due But only detect 4 axis.. How to active axis 5 and 6

Thanks Rizki

qiwalker avatar Apr 13 '19 15:04 qiwalker

Look at this commit from my fork https://github.com/MitchBradley/g2/commit/b93e22160b00d048da1fef2982b24036e338f38e

MitchBradley avatar Apr 13 '19 16:04 MitchBradley

Hi mr.mitch

Great work.... Can u send me .bin file And one more question and request How to enable corexy ?

Thanks Rizki

qiwalker avatar Apr 14 '19 10:04 qiwalker

My .bin file would not work for you because my motor configuration is different than yours. g2core must be configured before compilation, depending on your drivers and motors. My Due has a gShield, but the pinout is different than normal because I have external drivers for some axes instead of using the X and Y drivers on the gShield. And I have limit switches on unusual pins, and other differences from the 'stock' gShield pinout file. What do you mean by "corexy"?

MitchBradley avatar Apr 14 '19 18:04 MitchBradley

Instructions for compiling in the cloud:

Create an account on https://cloud.google.com . If you follow the steps below, you should remain in the "free tier" and not incur any monetary charges.

When you get to the dashboard/console page, click on the "Activate Cloud Shell" button at the top, as shown. Capture

In the shell window, clone the git repository and compile. Here is the sequence that I used, but you should use your fork instead of mine.

git clone --recursive https://github.com/MitchBradley/g2
cd g2/g2core
make BOARD=gShield SETTINGS_FILE=settings_othermill.h

Here are some changes you will need to make

  • Clone from your repo instead of mine
  • Patch your repo with the commit that I referenced above https://github.com/MitchBradley/g2/commit/b93e22160b00d048da1fef2982b24036e338f38e
  • Also apply this patch https://github.com/MitchBradley/g2/commit/1b74b1ceaf94d2fa8adaaff3b53cf69af5df705d which fixes this problem https://github.com/synthetos/g2/issues/367
  • Create a settings file for your machine and use it instead of the one I listed above

Then you can use "Download file" from the ... menu to get the binary file. The download dialog requires a full path name to the binary file. Get the prefix by typing "pwd". In my case the prefix was "/home/wombatpie/g2/g2core". The suffix is derived by replacing ".elf" with ".bin" in the "filename" that was displayed at the end of the "make" step. In my case, the filename was "bin/gShield/g2core.elf", so the full pathname to download was "/home/wombatpie/g2/g2core/bin/gShield/g2core.bin"

MitchBradley avatar Apr 14 '19 21:04 MitchBradley

Hi mr.mitch

Core xy is invers kinematic, type of belt drive... Im still confuse with g2core firmware 😭😭

Anyway thank you so much for your guidance

Now im try to move from grbl to g2core firmware..

Thanks Rizki

qiwalker avatar Apr 19 '19 12:04 qiwalker

Hi mr mitch

Can you show me some configuration for g2core before i compailed the file

Use nema 23 Gt2 timing belt 30 teeth

Thanks Rizki

qiwalker avatar Apr 20 '19 23:04 qiwalker

It seems that you are trying to build a complex system without understanding how it works. In order to create a g2core configuration, you need to understand a lot of different things, including, but not limited to:

  • What kind of machine - mill, lathe, 3D printer, plotter, router, laser engraver, ...
  • What kind of driver board is attached to the microprocessor
  • Which microprocessor pins are connected to which functions on the driver board
  • Which channels on the driver board are connected to which motors
  • The polarity of the motors
  • The strength of the motors (just saying Nema 23 doesn't help - Nema 23 motors come in different strengths)
  • The coupling between the motors and the mechanical system (Gt2 timing belt 30 teeth is part of that, but not all)
  • The allowable accelerations and speeds for the mechanical system
  • The configuration of limit and homing switches, if any
  • The way the spindle (or laser, or extruder, or pen, or knife, or whatever) is controlled

The g2core source code contains example settings files for several different types of machines. I have no way of knowing which one of them might apply to your system. It as is if you had asked me how to operate a machine with a 1 kilowatt motor, but I don't know if your machine is a lawn mower, or a scooter, or a washing machine, or a bicycle, or an airplane, or a saw. And the fact that you don't seem to know which information to supply makes me think that you need to do a lot more study before taking the next step.

MitchBradley avatar Apr 20 '19 23:04 MitchBradley

Hi mr. Mitch

13746

I want to build screw fastening machine like above picture sir For the motor and machine

  1. Nema 23 3,2A
  2. Gt2 30 teeth pitch 2mm
  3. Arduino Due

Thanks Rizki

qiwalker avatar Apr 21 '19 22:04 qiwalker

How will you drive the motors? You can't connect them directly to the Due. You need some sort of driver board. You also need some way to control the screwdriver precisely.

MitchBradley avatar Apr 21 '19 22:04 MitchBradley

for driver i use smart stepper with magnetic encoder for screw driver i use atlas copco the intelegent screw driver will combine with festo cylinder (down mechanism) + z axis

can i configure the firmware setting after flashing to the board ? will the configuration save as i know due dont have EPROM ?

thanks Rizki

qiwalker avatar Apr 22 '19 01:04 qiwalker

for cylinderl i will use gcode like M3, M4, M7, M8 for the trigger

qiwalker avatar Apr 22 '19 01:04 qiwalker

You must configure at compile time.

Go into g2core/board/ArduinoDue/, make a copy of gShield-pinout.h under a different name, and edit it to set the pins that connect to your steppers. The lines you need to change have names like kSocket1_StepPinNumber, kSocket_DirPinNumber, etc. kSocket1 is for the first motor, kSocket2 is for the second motor, etc. You can set the Microstep PinNumber entries to -1 under the assumption that your smart steppers have some external setting for their microstepping configuration.

If you want to use spindle control gcodes to turn the screwdriver on and off, set kSpindle_EnablePinNumber and kSpindle_DirPinNumber.

Set the kInput _PinNumber to the pins you will use for limit switches or other inputs to the controller.

Set kOutput _PinNumber to any other pins you will you for other outputs.

Then go into g2core/settings and make a copy of settings_othermill.h under a different name. Edit it to configure all aspects of your machine. For example, the setting M1_STEP_ANGLE applies to motor 1, which corresponds to kSocket1 in the pinout file. For a 200 steps/rev stepper, its value is 1.8 because 360 degrees / 200 is 1.8 degrees/step. M1_TRAVEL_PER_REV is the number of milllimeters the associated axis moves when the motor turns one rev. M1_MOTOR_MAP tells which axis that motor controls.

The settings like X_VELOCITY_MAX control how fast that axis is allowed to go. VELOCITY is the speed for rapid moves (G0) while FEEDRATE is the maximum speed for G1 moves (but you can make it go slower with the F word in the GCode). The TRAVEL settings tell how far the axis is allowed to move; set them to the actual size of your machine. The JERK setting control how quickly the machine will accelerate. If you have smart steppers the JERK probably doesn't matter because the smart stepper will figure it out.

The settings like DI1_MODE let you configure inputs like limit switches or probes.

Finally, edit g2core/boards.mk and add a section for your boards. Make a new CONFIG name for your machine (for example Screwdriver), set BOARD to the name of the pinout file you created in the first step, and set SETTINGS_FILE to your settings file.

Then you can compile with

make CONFIG=Screwdriver

MitchBradley avatar Apr 22 '19 01:04 MitchBradley

thanks you very much mr. Mitch, il will follow your guidance for VELOCITY how to calculate it Sir ?

Thanks Rizki

qiwalker avatar Apr 22 '19 01:04 qiwalker

Experiment with different values to see how fast the machine will go without stalling the motors or causing mechanical instability, then reduce the number to give a safety factor. The number will probably be different for different axes.

MitchBradley avatar Apr 22 '19 05:04 MitchBradley

You can experiment with different velocity settings without recompiling. In a console window, you can type, for example:

$xvm=1000
G0 X100
G0 X0

That will set the max velocity for the X axis to 1000 mm/min, then go at the rapid rate to X=100, then go back to X=0. Then when you have found a good value, put it in the settings file and recompile to make it permanent.

MitchBradley avatar Apr 22 '19 08:04 MitchBradley

Ok mr.Mitch

thankyou very much for your guidance and advice will update my work to you

thanks Rizki

qiwalker avatar Apr 23 '19 00:04 qiwalker

Dear Mr. Mitch

i change my idea of robot by build scara robot below picture for my scara kindly please help me again :D should i change x, y to rotary for move my scara and let z axis like usual and i very thanks for your help before now i can compile g2core.. :)

IMG_3190

thanks Rizki

qiwalker avatar May 08 '19 16:05 qiwalker

I'm sorry, I have no experience with non-cartesian setups so I can't help. Perhaps you should use firmware that already supports SCARA. A web search showed a few possibilities.

MitchBradley avatar May 08 '19 17:05 MitchBradley

it's ok mr.mitch

for cartesian unit for screw fastening on progress,

it would be great if i can make screw fastening robot and soldering robot in one machine but for soldering robot need feeder for solder wire, can i add extruder setting (use for feeding solder wire) ? now i already use 5 axis (3 Axis_standar, 2 Axis_radius ) and want to use axis number 6 for extruder is it possible sir ? if yes, kindly please help me to get the setting

thank you very much rizki

qiwalker avatar May 13 '19 10:05 qiwalker

The instructions that I posted three weeks ago, telling how to edit the configuration files to set pin numbers and motor speeds for different axes, apply to axis 6 the same as any other axis.

MitchBradley avatar May 13 '19 16:05 MitchBradley

Dear Mr. Mitch

Noted sir can i check pin use using in Due using command (json)

thanks Rizki

qiwalker avatar May 17 '19 15:05 qiwalker

https://github.com/synthetos/g2/wiki/Digital-IO I found that by searching for "g2core GPIO"

MitchBradley avatar May 17 '19 17:05 MitchBradley

Dear Mr. Mitch

how are u Sir ?

qiwalker avatar Apr 30 '20 01:04 qiwalker

Do you have a question?

MitchBradley avatar Apr 30 '20 01:04 MitchBradley

can i use eeprom with g2core ?

qiwalker avatar Apr 30 '20 01:04 qiwalker

can i use eeprom with g2core ?

Due does not have EEPROM. Synthetos is working on some new boards that have EEPROM but they are not for sale yet.

MitchBradley avatar Apr 30 '20 01:04 MitchBradley

ouh oke thanks for ur answer, how to calculate step per mm ?

qiwalker avatar Apr 30 '20 01:04 qiwalker

Look it up on the internet. Here is one reference that shows the math http://diymachining.com/grbl-settings-101-a-how-to-guide/

MitchBradley avatar Apr 30 '20 05:04 MitchBradley

thanks mr. Mitch btw i already flashing gcore to arduino DUE and connect to use CNCJS but jog is disable :(

image

qiwalker avatar May 01 '20 22:05 qiwalker

I don't think it is succeeding in connecting to g2core because there is no response to those commands in the Console window. Maybe you are using the wrong COM port, or the wrong usb port on the DUE.

MitchBradley avatar May 02 '20 00:05 MitchBradley