Need Help! Determining the velocity of an axis near real-time


Results 1 to 11 of 11

Thread: Determining the velocity of an axis near real-time

  1. #1
    Member
    Join Date
    Sep 2005
    Location
    United States
    Posts
    38
    Downloads
    0
    Uploads
    0

    Default Determining the velocity of an axis near real-time

    Hi,
    This is Nuri from MakerStorage LLC.
    I need your help on Determining the velocity of an axis near real-time with brains (or maybe with vb script) with Mach3
    I want to send this information via Modbus. I know the Modbus part but need help on getting the current velocity of one axis.
    Thanks for your help

    Regards,
    Nuri
    MakerStorage

    Similar Threads:


  2. #2
    Member Mecanix's Avatar
    Join Date
    Aug 2019
    Posts
    295
    Downloads
    0
    Uploads
    0

    Default Re: Determining the velocity of an axis near real-time

    Unclear what you are trying to determine, axis angular or linear velocity?
    With knowledge of the radius and feedrate (to my limited knowledge I think M3 can provide real-time), velocity for both seems pretty easy to calc



  3. #3
    Member
    Join Date
    Dec 2009
    Location
    Australia
    Posts
    157
    Downloads
    0
    Uploads
    0

    Default Re: Determining the velocity of an axis near real-time

    Maybe something like this 813 GetDRO/SetDRO Blended Velocity DRO 813



  4. #4
    Member
    Join Date
    Sep 2005
    Location
    United States
    Posts
    38
    Downloads
    0
    Uploads
    0

    Default Re: Determining the velocity of an axis near real-time

    Quote Originally Posted by Mecanix View Post
    Unclear what you are trying to determine, axis angular or linear velocity?
    With knowledge of the radius and feedrate (to my limited knowledge I think M3 can provide real-time), velocity for both seems pretty easy to calc
    What I am trying to get is the velocity of the A axis. ( linear velocity). I have a pallet extruder with a huge motor driven by a VFD. I will connect to the VFD over Modbus and send a frequency value in accordance with the speed of the A axis.
    I am trying to read the DRO of the A axis with 100ms intervals and use the difference as a velocity indicator.

    I am sure you guys have better solution than this.

    Regards
    Nuri
    www.makerstorage.com



  5. #5
    Member Mecanix's Avatar
    Join Date
    Aug 2019
    Posts
    295
    Downloads
    0
    Uploads
    0

    Default Re: Determining the velocity of an axis near real-time

    Quote Originally Posted by nerginer View Post
    I am sure you guys have better solution than this.
    Could be.
    I'd just hook up an optical or magnetic encoder IC with an affordable xilinx spartan-3 or 6 to the A axis directly and send that pulse over the vfd (if that'd be me).
    Just never know what this bug'gy M3 could do... hence a hardware solution.
    Have a look at the AM4096 12-bit magnetic encoder. Pretty lightweight and low cost implementation, if you need precision.
    I see you are in embed from your url so that proposition might be a day work or two for you.

    Otherwise no idea how you could pull this data out from M3 in a stable/real-time fashion way. Not too experienced with M3, just a user



  6. #6
    Member
    Join Date
    Sep 2005
    Location
    United States
    Posts
    38
    Downloads
    0
    Uploads
    0

    Default Re: Determining the velocity of an axis near real-time

    Quote Originally Posted by Mecanix View Post
    Could be.
    I'd just hook up an optical or magnetic encoder IC with an affordable xilinx spartan-3 or 6 to the A axis directly and send that pulse over the vfd (if that'd be me).
    Just never know what this bug'gy M3 could do... hence a hardware solution.
    Have a look at the AM4096 12-bit magnetic encoder. Pretty lightweight and low cost implementation, if you need precision.
    I see you are in embed from your url so that proposition might be a day work or two for you.

    Otherwise no idea how you could pull this data out from M3 in a stable/real-time fashion way. Not too experienced with M3, just a user
    I think it is the correct way of doing this. I really want to see your solution. The Xilinx spartan-3 or 6 has the step pulses and the encoder feedback and calculates the error and trying to compensate it with a PID algorithm?

    My solution can be very cost-effective because having the velocity of the A-axis from the brain and send it directly via Modbus to VFD with a cheap USB to RS484 converter dongle.

    Anyway I am open to any idea. Thanks for sharing.

    Regards
    Nuri
    www.makerstorage.com



  7. #7
    Member
    Join Date
    Aug 2009
    Location
    USA
    Posts
    219
    Downloads
    0
    Uploads
    0

    Default Re: Determining the velocity of an axis near real-time

    Depending on the level of precision required, and the update rate, you could even skip the FPGA, and just use a microcontroller for this - perhaps some variant of Arduino (something SAMD21 based? Like the Arduino Zero, or an Adafruit Feather M0).

    If I was going to use a FPGA, however, I think I'd probably go for an ICE40; because there is an open-source toolchain available for it, and that toolchain isn't 7 or so GB to download; and isn't dependent on obsolete versions of either Windows or Linux... but that's me - YMMV.





  8. #8
    Member
    Join Date
    Sep 2005
    Location
    United States
    Posts
    38
    Downloads
    0
    Uploads
    0

    Default Re: Determining the velocity of an axis near real-time

    Quote Originally Posted by __Britt View Post
    Depending on the level of precision required, and the update rate, you could even skip the FPGA, and just use a microcontroller for this - perhaps some variant of Arduino (something SAMD21 based? Like the Arduino Zero, or an Adafruit Feather M0).

    If I was going to use a FPGA, however, I think I'd probably go for an ICE40; because there is an open-source toolchain available for it, and that toolchain isn't 7 or so GB to download; and isn't dependent on obsolete versions of either Windows or Linux... but that's me - YMMV.

    I do not know if samd21 can handle both the step pulse and the encoder feedback at the same time with a PID calculation. Sand21 is a great chip and runs at 48Mhz but I have some doubts about the required CPU time.

    Regards
    Nuri
    www.makerstorage.com



  9. #9
    Member Mecanix's Avatar
    Join Date
    Aug 2019
    Posts
    295
    Downloads
    0
    Uploads
    0

    Default Re: Determining the velocity of an axis near real-time

    Quote Originally Posted by nerginer View Post
    The Xilinx spartan-3 or 6 has the step pulses and the encoder feedback and calculates the error and trying to compensate it with a PID algorithm?
    Pretty much. A 50mhz crystal to an input pin and off you go, can pulse/duty or correct what you want based on that clock really. Good project for you to bring in hdl to your existing toolbox, if you haven't done much already.
    Briit could be right about an even low'er cost ARV though, was just suggesting one of those ridiculously cheap fpga for parallel (real-time?) and speed/precision.
    I really can't help on the M3 part, never really bothered too much with it, partly due to its ancient and bug'ed reputation, perhaps lol. Sure someone more familiar with it can chime in.
    G'luck



  10. #10
    Member
    Join Date
    Mar 2017
    Location
    United States
    Posts
    241
    Downloads
    0
    Uploads
    0

    Default Re: Determining the velocity of an axis near real-time

    Since, all you need is a the velocity for the A axis, you don't need an encoder, you just need the pulse rate of the step signal driving that axis. Since you know the step size, the pulse rate will give you the velocity. You can also use the direction signal for obvious reasons.

    You could read the signal with an off-the-shelf Arduino. Add a Modbus shield to the Arduino, and you can send the data directly to the VFD.

    Edit:

    I am assuming that it is Modbus over RTU, not TCP and that your VFD has a RS485 port with published specs.

    Last edited by maxspongebob; 10-21-2019 at 03:14 PM.


  11. #11
    Member
    Join Date
    Sep 2005
    Location
    United States
    Posts
    38
    Downloads
    0
    Uploads
    0

    Default Re: Determining the velocity of an axis near real-time

    Quote Originally Posted by maxspongebob View Post
    Since, all you need is a the velocity for the A axis, you don't need an encoder, you just need the pulse rate of the step signal driving that axis. Since you know the step size, the pulse rate will give you the velocity. You can also use the direction signal for obvious reasons.

    You could read the signal with an off-the-shelf Arduino. Add a Modbus shield to the Arduino, and you can send the data directly to the VFD.

    Edit:

    I am assuming that it is Modbus over RTU, not TCP and that your VFD has a RS485 port with published specs.

    Yes, This can be the best open-loop solution. I can set an interrupt and start a timer up to the next interrupt. This calculated time must be proportional to the axis velocity. With proper scaling, I can send it to VFD via Modbus RTU.
    Thanks for the response.

    Regards,
    Nuri
    www.makerstorge.com



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Determining the velocity of an axis near real-time

Determining the velocity of an axis near real-time

Determining the velocity of an axis near real-time