Results 1 to 7 of 7

Thread: No pi for me?

  1. #1
    Join Date
    Feb 2010
    Location
    , Chicago Il
    Posts
    20

    Default No pi for me?

    Hello,
    I am using ShopBot Control Software 3.6.36 and I am incorporating some angled cuts into a program. In order to do the Radian to Degree - Degree to Radian conversion within the part file I am trying to use pi per the Calculated_Functions.pdf documentation. I have been testing expressions via the ShopBot Calculator and have not been able to get it to recognize pi. Depending on the expression I will get an error stating PI is an undefined variable. I know I could define this within the part file, but I was wondering if I am missing something or this is not defined per the documentation.

    In the Calculator when I test expressions pi returns pi and (pi) returns undefined variable. Just wondering if anyone else is having this issue or if I am just missing something.

    Any help would be greatly appreciated. Thanks.

  2. #2
    Join Date
    Mar 2008
    Location
    Tulsa Oklahoma
    Posts
    1,238

    Default

    Mike- Pi is available.. it is just "hidden".

    If you look under "ACOS" you will see the code "ACOS(-1)" produces PI to the accuracy of the computer. The ACOS trick is the best way to get PI on any computer. What you can do is:

    &Pi = acos(-1)
    &Degrees = &Radians * 180.0 / &Pi

    Or as an alternative define:

    &RadiansToDegrees = 180.0 / acos(-1)
    &Degrees = &Radians * &RadiansToDegrees

    Hope that helps!
    "The best thing about building something new is either you succeed or learn something. Its a win-win situation."

    --Greg Westbrook

  3. #3
    Join Date
    Jun 2004
    Location
    Springfield Mo
    Posts
    851

    Default Convert program

    You guys have gone a bit past my math but this is handy sometimes...

    http://joshmadison.com/convert-for-windows/

    Not sure if it does pi to 20,000 places...
    The decimal point seems to be the most important on the z axis... x & y not so much....
    ShopBot... Where even the scraps and things you mess up and throw away are cool....

  4. #4
    Join Date
    Feb 2010
    Location
    , Chicago Il
    Posts
    20

    Default

    Dana,
    Thanks. I figured it was in there somewhere. Also thanks for responding so quickly.

    One additional question that you may be able to help with - Can the ShopBot handle past 3 decimal places? I have a calculation that results in .46875 and even though the variable shows that it has taken on this value, the move is only .469. Is the precision something that can be set? I understand that there are limits to the motors themselves, but can they handle this level of precision with microstepping? Thanks in advance.

    Curtiss,
    I appreciate you response as well, but I am trying to accomplish this within a part file that is calculated on the fly based on responses from the user.

  5. #5
    Join Date
    Apr 2007
    Location
    Marquette, MI
    Posts
    3,388

    Default

    Mike...
    Pi is also always in there as a variable. Look at the current system variables and the variable "&PI" is always there. Good to 6 decimal places. The only one that you cant remove.

    Try using "&PI" (without quotes, of course) in your formula.

    Software does handle above 3 places, but display doesnt. I am not sure what the current rounding is set at, my guess around 6. However if the result is going to become a move, then you have to settle for the closest increment based on your unit value/or step. Calculations can go to double digit exponents, but why would you run them on a machine with .002 repeatable accuracy?
    Gary Campbell
    GCnC Control
    GCnC411(at)gmail(dot)com
    Servo Controller Upgrades
    http://www.youtube.com/user/Islaww1


    "We can not solve our problems with the same level of thinking that created them"
    Albert Einstein


  6. #6
    Join Date
    Feb 2010
    Location
    , Chicago Il
    Posts
    20

    Default

    Gary,
    Thank you. I am using 3.6.36 and it is listed in system variables (which I should have looked at a long time ago) except it is listed as "&_PI" (no quotes). I had been trying every variation without the underscore.

    You said that a move would be limited to the "closest increment based on your unit value/or step". Where can I find this info and can I alter this to accomplish moves to 5 places? I guess another question is would I want to? I think I read somewhere on the forum about keeping track of rounding "errors" until they become large enough to include, maybe that is another option. Thanks again.

    Mike

  7. #7
    Join Date
    Apr 2007
    Location
    Marquette, MI
    Posts
    3,388

    Default

    Mike...
    I didnt relaize there was an underscore til just now.

    The current resolution is a setting based on the number of steps available per revolution, and the gear/pinion reduction into inches. Others may have more info, as most of this is over my pay grade. I am much more likely to find a way to cut 10ips to .010 tolerance than to cut at 1ips to .001 tolerance.

    Cant see any reason to try and increase the resolution. You would have to add reduction of 10 to 1 to gain 1 decimal place. 90% reduction in speed. Maybe NASA will let you borrow one of their machines. What are you trying to accomplish?
    Gary Campbell
    GCnC Control
    GCnC411(at)gmail(dot)com
    Servo Controller Upgrades
    http://www.youtube.com/user/Islaww1


    "We can not solve our problems with the same level of thinking that created them"
    Albert Einstein


Posting Permissions

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