Page 1 of 2 12 LastLast
Results 1 to 12 of 16

Thread: simplemotion for 6-axis

  1. #1
    Registered
    Join Date
    Sep 2011
    Location
    Brazil
    Posts
    8
    Downloads
    0
    Uploads
    0

    Lightbulb simplemotion for 6-axis

    Hi everybody. My project is to retrofit a old six axis robot that mechanically is great but electronic and software doesn't exist anymore. I already purchased a granite VSD-E and i want to use simplemotion to command the six axis synchronously and simultaneously. Low cost is important.
    My first simple ideia is to connect the six usb cables in pc and develop a C program that reads a static text with the trajectory in lines (references for each axis) divided in 10 miliseconds. Later i will elaborate a more sophisticated robotic software

    The C program will do the sequence:

    While (~end_of_trajectory)

    Read line to know the references
    send reference 1 to axis 1 trough 1ª USB SPI
    send reference 2 to axis 2 trough 2ª USB SPI
    send reference 3 to axis 3 trough 3ª USB SPI
    send reference 4 to axis 4 trough 4ª USB SPI
    send reference 5 to axis 5 trough 5ª USB SPI
    send reference 6 to axis 6 trough 6ª USB SPI
    Wait 10 miliseconds
    end

    The precision 10 miliseconds timing will not be a problem in principle, later i can use a Real time operacional system.

    I read something about USB7AX but i can wait for...maybe in future projects.

    The question is:

    a) simplemotion can handle on this?
    b) Am i forgetting something?
    c) Someone tried it before?
    d) suggestions?

    Thanks


  2. #2
    Registered
    Join Date
    Sep 2011
    Location
    Brazil
    Posts
    8
    Downloads
    0
    Uploads
    0

    Smile robot control

    Hi there.

    I don't have my drivers yet but i made some tests. I have some FTDI chips and i made a simple program to drive six chips through simplemotion. The ideia was exposed before.
    Of course the simplemotion generated a bad CRC error, but the idea can be tested.
    The good news is that it can be done, all six axes received de commands but the time is a problem.
    I realized that simplemotion writes and read the answear from drive. It took 15 miliseconds in average to execute smcommand 1000 times. See graph:
    http://dl.dropbox.com/u/5363316/smcommand_seconds.jpg
    If i have to send six commands for positioning and six for speed limit:
    12*15ms=180ms in average for each point. That is too long for robot controlling.

    I tried to put each smCommand in a thread but this generate bad communication errors. I don't know if it is a simplemotion limitation or ftdi limitation. The fact is that communications doesn't work paralleling.

    Xerxes, is there a rawcommand that only write references and don't read the answear from drive?
    Do you know what is the problem with the thread approach?

    Thank you.


  3. #3
    Registered Xerxes's Avatar
    Join Date
    Sep 2004
    Location
    Finland
    Posts
    1,201
    Downloads
    0
    Uploads
    0
    The problem is USB latency. There's no way eliminating it completely.

    In my tests I have reached up to 400 raw drive commands/s on USB cable and that's when one drive is operated. The rate may reduce when multiple FTDI cables are doing this simultaneously. Anyway the bigger problem here will be the non-realtimeness (USB can't be realtime) which will make motion jerky even if high average update rate is achieved.

    So, I think you need to rethink some other way to send position data to drives. I would recommend SmoothStepper like pulse generators. They make motion smooth over USB due to data buffering.


  4. #4
    Registered
    Join Date
    Sep 2011
    Location
    Brazil
    Posts
    8
    Downloads
    0
    Uploads
    0
    Thank you for your considerations.

    But my hopes are still alive...
    My real time requirements aren't soo hard that needed in machining. I need 1 meter per minute because my process is welding.

    I read about a welding robot that works very well in 10Hz/100ms of position and speed limit actualization rate. Not only position was sent to drive but speed limit too each step, making a "first order hold" movement.
    2 miliseconds of non-determinist time would not affect this system.

    If everything goes wrong i have two possibilities:

    -Use a realtime windows extension like Interval Zero | RTX Hard Real-Time Platform
    -Adapt the simplemotion to a realtime linux

    If everything goes wrong again i can use Emc2 or mach3 to generate steps. But flexibility will be a problem in this case.

    Next week i'll test it all. I will post the results here.
    Thanks



    Quote Originally Posted by Xerxes View Post
    The problem is USB latency. There's no way eliminating it completely.

    In my tests I have reached up to 400 raw drive commands/s on USB cable and that's when one drive is operated. The rate may reduce when multiple FTDI cables are doing this simultaneously. Anyway the bigger problem here will be the non-realtimeness (USB can't be realtime) which will make motion jerky even if high average update rate is achieved.

    So, I think you need to rethink some other way to send position data to drives. I would recommend SmoothStepper like pulse generators. They make motion smooth over USB due to data buffering.


  • #5
    Registered
    Join Date
    Jul 2003
    Location
    Holmen, WI
    Posts
    1,193
    Downloads
    0
    Uploads
    0
    I would seriously look at emc2. It can to kins and already has a serial kins module. (stack robot arm where each joint is connected to the previous joint)

    EMC Documentation Wiki: Kinematics
    KINS

    it does all the forward and inverse calculations going from machine space to part space. (then you could use normall xyzabc gcode to run it)


    Here is a video of a welding robot someone made using emc.


    sam


  • #6
    Registered Xerxes's Avatar
    Join Date
    Sep 2004
    Location
    Finland
    Posts
    1,201
    Downloads
    0
    Uploads
    0
    I would still skip the USB on this to avoid possible dead end and re-doing it from start. USB won't become realtime even when realtime OS is being used. Actually app might hang on realtime OS because OS expects the app to be able to run at deterministic speed. No software can push USB to respond any faster.


  • #7
    Registered
    Join Date
    Mar 2009
    Location
    Netherlands
    Posts
    7
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Xerxes View Post
    I would still skip the USB on this to avoid possible dead end and re-doing it from start. USB won't become realtime even when realtime OS is being used. Actually app might hang on realtime OS because OS expects the app to be able to run at deterministic speed. No software can push USB to respond any faster.
    I second that. I've seen USB devices sending data, that is never recevied at all as soon as a realtime procees/thread is present. IMHO USB is only suited in CNC as a medium to sent (preprocessed) gcode to a trajectory controller.

    Probably the most troubleless, inexpensive and simple to setup way would be to get one of the Mesa FPGA cards, a breakoutboard or optiisolator card for it. Install EMC2 start pncconf, select your FPGA card, select the SV12 or SVST8_4 firware configure 6 PWM generators, 0 STEP generators. Hook up the VSD-E's to the PWM+DIR and encoder inputs. Tune the torque loop in the VSD-E, put it in torque mode. Start EMC and tune the position loop. Hookup error outputs from the drives, e-stops etc to the GP IO pins and configure them, write some hal components, pyvcp, etc.


  • #8
    Registered
    Join Date
    Sep 2011
    Location
    Brazil
    Posts
    8
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Xerxes View Post
    I would still skip the USB on this to avoid possible dead end and re-doing it from start. USB won't become realtime even when realtime OS is being used. Actually app might hang on realtime OS because OS expects the app to be able to run at deterministic speed. No software can push USB to respond any faster.
    Xerxes, what about adapt the simplemotion to use parallel LPT instead USB to generate SPI commands?
    My idea is to send six spi commands paralleling through one or two LPT interfaces to reduce realtime problem. Aparently rutex uses this approach with SPI DLL. see R2040 - Rutex, USA

    I read in simplemotion lib code that the function smSPIword must be changed, so my question:
    Do you have a code for smSPIword function for LPT or something like this
    to share?
    Thanks in advance

    Ps. I receive the drives and started the tests. I would like to say that the product is very very good, well finished, best resources, congratulations.


  • #9
    Registered
    Join Date
    Sep 2011
    Location
    Brazil
    Posts
    8
    Downloads
    0
    Uploads
    0

    Talking

    Xerxes, would it be a problem if you share de diagram of vsdepi board?
    cassbonin gmail

    It will save me a lot of time...no problem if you can´t. Thank you


  • #10
    Registered Xerxes's Avatar
    Join Date
    Sep 2004
    Location
    Finland
    Posts
    1,201
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by cassbonin View Post
    Xerxes, would it be a problem if you share de diagram of vsdepi board?
    cassbonin gmail

    It will save me a lot of time...no problem if you can´t. Thank you
    Sure, its available at:
    http://www.students.tut.fi/~kontkant...schematics.pdf

    And yes, you can generate SPI data from parallel port and this can be used to avoid USB latencies. You can do it with parapin library and by modifying part of SimpleMotion code. As attachment you can find simple SPI command example that use parapin.
    Attached Files Attached Files


  • #11
    Registered
    Join Date
    Sep 2011
    Location
    Brazil
    Posts
    8
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Xerxes View Post
    Sure, its available at:
    http://www.students.tut.fi/~kontkant...schematics.pdf

    And yes, you can generate SPI data from parallel port and this can be used to avoid USB latencies. You can do it with parapin library and by modifying part of SimpleMotion code. As attachment you can find simple SPI command example that use parapin.

    Works fine here! thanks. In your example the return parameter is set to CAPTURE_RAW_POS, this is an undocumented feature that seems very nice. Looking at vsd_cmd.h there is a list of possible parameters but no ideia how to use...

    I am using SPI and would be great to use the vsd inputs/outputs for general purpose, in other words, using SPI command to set an output or to read an analog value. If is it possible, vsd can be the definitive motion and control solution.

    Is there a SPI command to use:

    -HSIN1 and HSIN2 as digital input for general use?
    -AIN1 and AIN2 as analog inputs?
    -OUT2 as digital output for general use?

    Thanks.


  • #12
    Registered
    Join Date
    Sep 2011
    Location
    Brazil
    Posts
    8
    Downloads
    0
    Uploads
    0
    I got problems to set HSIN1 as a disable in and clear fault signal. It just doesn't work. I point Opto-in 1 in gdtool as a disable in, see attachment. Any suggestions?
    Attached Files Attached Files


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. SimpleMotion control library
      By Xerxes in forum Granite Devices
      Replies: 31
      Last Post: 12-11-2012, 10:30 PM
    2. Replies: 0
      Last Post: 07-29-2011, 05:40 AM
    3. Problem- a problem with slaved A-axis moving properly relative to Y-axis
      By zool in forum Mach Software (ArtSoft software)
      Replies: 34
      Last Post: 07-05-2011, 10:45 PM
    4. Compare Catia and MCX2 for multi axis lathe/4 axis mill
      By bob1112 in forum General CAM Discussion
      Replies: 0
      Last Post: 10-10-2008, 08:15 PM
    5. New Design - Hybrid 3-Axis Router/4-axis Foam Hot Wire Cutter
      By the__extreme in forum CNC Wood Router Project Log
      Replies: 3
      Last Post: 02-26-2007, 03:58 PM

    Tags for this Thread

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.