using 2 boards for 8 axis robot

Home Forums TinyG TinyG Support using 2 boards for 8 axis robot

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #11745
    tookys
    Member

    I have 2 boards, and I’m able to talk to them using a RS-485 adapter that i have, and can control them 1 board at a time using CoolTerm fine. But i cant seem to get them to work with higher axis’s.

    RS-485 adapter I’m using -> https://www.automationdirect.com/adc/shopping/catalog/drives_-a-_soft_starters/ac_variable_frequency_drives_(vfd)/micro/software_-a-_communications/usb-485m

    I’m needing to make a 8 axis robot.

    I’ve told one board to remap the motors to be B,C,D,E axis, but it doesn’t respond. I’m aware that D,and E, aren’t normally mapped axis, but even the B,and C axis don’t respond.

    And I can tell motor 4 to be an E(axis#7), but when i tell the board to move axis E it gives an error

    So i have 2 questions,
    1.What do i have to do to get the B and C axis to work over RS-485, (I can get X,Y,Z,A to work fine)

    2. Is there something special im needing to do to be able to get the total of 8 independent axis working? (Since they advertised a theoretical 1000 axes, how do i use this feature?) It doesn’t need to be super synchronized, and it can be slow, i just need it working.

    #11746
    tookys
    Member

    (sorry for double post, couldn’t figure out how to edit my original post)

    OK, i figured out that the B and C axis’s had to be explicitly enabled with axis mode commands.

    $bam=1
    $cam=1

    So I’m able to control 6 axis using my rs485 adapter with the 2 boards.

    Now, the question is how do you use more axes than just the X,Y,Z,A,B,C?

    like said I’m aware that they wont be synchronized, I just need to be able to talk to 8 axes atm.

    #11747
    cmcgrath5035
    Moderator

    The tinyG wiki is here, it might come in handy
    https://github.com/synthetos/TinyG/wiki

    TinyG firmware only recognizes 6 axes names
    X,Y,Z which are linear motion
    A,B,C which are rotational (but can be spoofed to do linear motion)

    Since you have two boards, I’ll talk to your issue referring to Board 0 with axes X,Y,Z and A, and Board 1 with axes X1, Y1, Z1 and A1.

    I’ll assume you are generating your Gcode manually with commands for X,Y,Z,A,X1,Y1,Z1 and A1.
    Whatever your Gcode sender is, you will have to separate commands for X1,Y1,Z1 and A1 axes, rename them to X,Y,Z and A before sending those to Board 1.
    I am not sure how much coordination you need among the 8 axes, you may need to generate the Gcode such that Board 0 commands run, then Board 1 commands run for every move, it will be slow

    The tinyG motion planner might get in your way as well. Basically, the firmware reads ahead several Gcode moves and computes third order polynomial inertia modified (jerk) motion equation to traverse that continuous path while maintaining accurate adherence to the specified path.

    I’ll stop here and see if this makes any sense to you

    #11750
    tookys
    Member

    It makes sense, the question is how do i assign an axis as X1?

    The wiki says to set up a motor with a 0-5 number for x-c axis.

    What number is used for x1?

    Nothing in the wiki talks about using additional axis beyond the x-c. Or about how to network 2 boards.

    $1MA – MAp motor to axis

    Axes must be input as numbers, with X=0, Y=1, Z=2, A=3, B=4 and C=5. As you might expect, mapping motor 1 to X will cause X movement to drive motor 1. The example below is a way to run a dual-Y gantry such as a 4 motor Shapeoko setup. Movement in Y will drive both motor2 and motor4.

    $1ma=0 Maps motor 1 to the X axis
    $2ma=1 Maps motor 2 to the Y axis
    $3ma=2 Maps motor 3 to the Z axis
    $4ma=1 Maps motor 4 to the Y axis

    How do i tell the gcode how to designate which board to use? or how do i know the rs485 address of a board and put it into the g code?

    #11751
    tookys
    Member

    OK, i misunderstood what you were saying.

    Your saying i need to have 2 separate g-code senders talking to each board on a separate com connection in order to do this.

    Ok…

    But the board is advertised as being able to be linked with RS-485 to be able to network 1000 axes. This is what I want to do. How do i do this?

    I’m wanting 1 G-code sender, to talk over 1 RS-485 line to handle 8 axis. This is what is advertised as a feature of this product. And is what i want to do. But the documentation page on the wiki about networking is blank.

    • This reply was modified 4 years, 10 months ago by tookys.
    #11753
    cmcgrath5035
    Moderator

    I am a forum guy, not a developer and am aware of the RS485 link, you are only the second in 5 years I have had show interest/ask questions. The other individual needed 6 motor drivers. I have never seen a reference to networking 1000 axes, so not sure what application was intended. Send me a link if you still have it.

    Each instance of tinyG FW can decode up to 6 axes of motion, but only 4 of six can be connected to stepper drivers, the on-board ones or external.

    #11758
    tookys
    Member

    Both the Adafruit store and synthetos advertises the RS485 networking feature saying it could do up to 1000 axes, but i cant find anybody that has used it.

    Adafruit -> https://www.adafruit.com/product/1749

    Synthetos itself -> https://synthetos.comproject/tinyg

    Like said Ive been able to get it to work for the 6 axis, across 2 board with rs485. How do we control more?

    I would think that a minor code change on the tinyg could be to change the axis name that the board recognizes from X, to AX, BX, etc. The rest of the code could be left alone.

    Unfortunately that is outside the scope of my programming knowledge.

    • This reply was modified 4 years, 10 months ago by tookys.
    #11760
    tookys
    Member

    Like said, my programming experince is minimal, so im not sure what impact the following changes would have. But i believe this would be all that is needed to allow them to handle more axes. (least 26×6 = 156).

    https://github.com/synthetos/TinyG/blob/master/firmware/tinyg/gcode_parser.c

      Line 172

    static stat_t _get_next_gcode_word(char **pstr, char short *letter, float *value)
    {
    if (**pstr == NUL)
    return (STAT_COMPLETE); // no more words to process

    // get letter part
    if(isupper(**pstr) == false)
    return (STAT_INVALID_OR_MALFORMED_COMMAND);
    *letter = **pstr;
    (*pstr)++;

    [Add code to check if there are 1 or 2 letters in the line]

      Line 376

    case ‘X AX’: SET_NON_MODAL (target[AXIS_X], value);
    case ‘Y AY’: SET_NON_MODAL (target[AXIS_Y], value);
    case ‘Z AZ’: SET_NON_MODAL (target[AXIS_Z], value);
    case ‘A AA’: SET_NON_MODAL (target[AXIS_A], value);
    case ‘B AB’: SET_NON_MODAL (target[AXIS_B], value);
    case ‘C AC’: SET_NON_MODAL (target[AXIS_C], value);

    • This reply was modified 4 years, 10 months ago by tookys.
    #11762
    cmcgrath5035
    Moderator

    I am going to ask a developer to weigh in on this.

    It is not 100% clear the full RS485 network functionality was completed.
    The references you provide (thanks) are very old.
    There may be some undocumented ways to achieve your goal.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.