Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Active 5 and 6 axis #411

Closed
qiwalker opened this issue Apr 13, 2019 · 48 comments
Closed

Active 5 and 6 axis #411

qiwalker opened this issue Apr 13, 2019 · 48 comments

Comments

@qiwalker
Copy link

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

Thanks
Rizki

@MitchBradley
Copy link
Contributor

Look at this commit from my fork MitchBradley@b93e221

@qiwalker
Copy link
Author

Hi mr.mitch

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

Thanks
Rizki

@MitchBradley
Copy link
Contributor

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
Copy link
Contributor

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

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"

@qiwalker
Copy link
Author

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
Copy link
Author

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

@MitchBradley
Copy link
Contributor

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.

@qiwalker
Copy link
Author

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

@MitchBradley
Copy link
Contributor

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.

@qiwalker
Copy link
Author

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
Copy link
Author

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

@MitchBradley
Copy link
Contributor

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

@qiwalker
Copy link
Author

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

Thanks
Rizki

@MitchBradley
Copy link
Contributor

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
Copy link
Contributor

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.

@qiwalker
Copy link
Author

Ok mr.Mitch

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

thanks
Rizki

@qiwalker
Copy link
Author

qiwalker commented May 8, 2019

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

@MitchBradley
Copy link
Contributor

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.

@qiwalker
Copy link
Author

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

@MitchBradley
Copy link
Contributor

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.

@qiwalker
Copy link
Author

Dear Mr. Mitch

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

thanks
Rizki

@MitchBradley
Copy link
Contributor

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

@qiwalker
Copy link
Author

Dear Mr. Mitch

how are u Sir ?

@MitchBradley
Copy link
Contributor

Do you have a question?

@qiwalker
Copy link
Author

can i use eeprom with g2core ?

@MitchBradley
Copy link
Contributor

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.

@qiwalker
Copy link
Author

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

@MitchBradley
Copy link
Contributor

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

@qiwalker
Copy link
Author

qiwalker commented May 1, 2020

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

image

@MitchBradley
Copy link
Contributor

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.

@qiwalker
Copy link
Author

qiwalker commented May 2, 2020

i try to connect using arduino IDE
here is the output

image

@justinclift
Copy link
Member

Interesting. The COM6 option seems correct from the Arduino IDE, but the output showing in the console of your CNCjs screenshot shows it wasn't working.

As a concept, Windows only lets one application access a given COM port at once. Is there any chance some other applications (Arduino IDE or anything) was using COM6 already, when you tried it with CNCjs?

If you're not sure and want to test again, then try rebooting your computer and using CNCjs right away before anything else. If that works, that might help figure out a real solution. 😄

@qiwalker
Copy link
Author

qiwalker commented May 2, 2020

already follow your instruction still cannot connect using CNCjs

but i try using g2core-api its working.

any idea ?

@justinclift
Copy link
Member

Hmmm. This is being an interesting challenge.

With CNCjs, try uninstalling the one you have, and using this exact download instead:

    https://github.com/cncjs/cncjs/releases/download/v1.9.22/cncjs-app-1.9.22-win-x64.exe

Saying that just because "something" seems to be not happy with your current CNCjs install. Hopefully this new one fixes it. 😄

If that doesn't work, then I'd probably try Universal Gcode Sender instead, and see if that works:

    https://winder.github.io/ugs_website/download/

In the list of downloads there, you'd want the "2.0 Platform" one. Either the "Nightly build" or the "Beta" one. Either should work. 😄

@qiwalker
Copy link
Author

qiwalker commented May 2, 2020

Universal GCode Sender work perfecly
thankyou very much for your suggestion

for now im still curious how to use g2core-api, im very confuse because my first time to deal with API ahahhaha

@justinclift
Copy link
Member

Awesome, glad you got it working. 😄

With g2core-api... I'm not personally sure as it's not something I've really touched. 😉

@qiwalker
Copy link
Author

qiwalker commented May 4, 2020

btw, is there any setting corexy in g2core ?

@justinclift
Copy link
Member

I think, but am not 100% sure, there's is initial CoreXY support in the edge-preview branch:

It's probably using the same config options as the example from the older 168-gquinitic branch here:

@qiwalker
Copy link
Author

qiwalker commented May 5, 2020

thank you so much @justinclift it running perfectly.
for g2core GUI, is there someone build it using C# or VB ?

@justinclift
Copy link
Member

Not as far as I know. The only one's I've seen so far are in javascript (CNCjs) or java (UGS, Goko).

@qiwalker
Copy link
Author

i found liteplacer but its for pnp machine

@ril3y
Copy link
Member

ril3y commented May 13, 2020

@rickcaddell wrote a program called "CHIP" in VB a few years ago for "TinyG". Might take a little work to get it working properly with g2.

https://github.com/rickcaddell/Chip

@qiwalker
Copy link
Author

hi @ril3y thank you for ur reply, i already look at this link but there's no source code :(

@ril3y
Copy link
Member

ril3y commented May 14, 2020

I have the source code. I can clone his repo and post it. I know rick did not care if it was shared.

@ril3y
Copy link
Member

ril3y commented May 14, 2020

@justinclift
Copy link
Member

Oh, that's cool. 😄

I had the same thought as @qiwalker when you posted the initial link. "Just an exe, no source. 😦"

@Symeth
Copy link

Symeth commented Oct 26, 2020

hi @justinclift

is there any stable release for corexy machine ?

@justinclift
Copy link
Member

@Symeth Haven't personally taken a look at the CoreXY stuff, but it still seems to be only in the edge-preview branch.

So, code is there but not well tested. aka Definitely not yet a stable release. 🤷

@ril3y ril3y closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants