Results 1 to 5 of 5

Thread: mathematical functions supported by Open SBP Programming Extension

  1. #1
    Join Date
    Feb 2009
    Location
    Rocking Frog, LLC, Cary NC
    Posts
    34

    Default mathematical functions supported by Open SBP Programming Extension

    Hi, y'all!

    I have been using Excel to generate some fairly simple 3D cutting instructions. But I'm quickly getting to the point where I need to start programming nested loops and that's just not something Excel is terribly good at. (The reason I'm generating cutting paths directly rather than using a tool is that I need to/want to calculate them based on parameters.)

    Rather than switching to a real programming language, I thought I'd try skipping the middle man and program directly in Open SBP. However, the SB programming manual is a bit sparse on information regarding support for mathematical functions. It just says "most mathematical functions are supported" and goes on to suggest I just try it in the calculator. Surely somewhere there's a list of the supported functions and how they're implemented in SBP?

    I've found that trigonometric functions (at least sine) are supported. That's great. Unfortunately they take radians as an argument and I can't figure out a function to convert from degrees to radians or a function or system parameter for 'pi'. (I'm also just pig-headed enough not to just set &pi=3.14159265. Why? Because I shouldn't have to!)

    So, if you're still with me, you will be my hero if you can tell me:
    a) Where are the supported math functions documented?
    b) Specifically, what is the function to convert degrees to radians? Or, how do you get SBP to spit out the number 'pi'?

    Thanks for reading!
    Andy

  2. #2
    Join Date
    Sep 2009
    Location
    Surrey, UK
    Posts
    1,271

    Default

    a) The programming handbook is it.
    b) set &pi=3.14159265

    As a programming language SBP is very clunky, as a control language I find it great compared to the alternatives I've used.

    I find I can do most things I want in it but when I can't I use a "proper" programming language and write the SBP file out from that with all the numbers calculated and in place already.

  3. #3
    Join Date
    Oct 2000
    Location
    Willis Wharf, VA
    Posts
    1,769

    Default

    Andy,

    The available functions are documented in "Calculated_Functions.pdf" that's installed in the C:\Program Files\ShopBot\ShopBot 3\Help folder

    Every time the ShopBot software is started, a variable for pi is loaded into memory and available for your use. It's &_PI

  4. #4
    Join Date
    Feb 2009
    Location
    Rocking Frog, LLC, Cary NC
    Posts
    34

    Default

    Adrian - It's supposedly loosely based on BASIC, so clunky is a given. And, no, you don't get to be my hero for giving snarky answers.

    Bill - You, on the other hand, are absolutely my hero! Thank you!

  5. #5
    Join Date
    Sep 2009
    Location
    Surrey, UK
    Posts
    1,271

    Default

    Oh well, looks like I only think I know everything.

Similar Threads

  1. Collet Extension?
    By shilala in forum ShopBotter Message Board
    Replies: 10
    Last Post: 09-06-2014, 06:01 PM
  2. Z axis extension?
    By elcar903 in forum ShopBot Buddy
    Replies: 7
    Last Post: 02-16-2014, 02:03 PM
  3. OPEN RAIL Open Source Linear Bearing System
    By myxpykalix in forum ShopBotter Message Board
    Replies: 0
    Last Post: 06-14-2012, 09:04 PM
  4. Keypad functions backwards
    By jim_rutske in forum ShopBotter Message Board
    Replies: 1
    Last Post: 09-25-2010, 09:38 PM
  5. Max and min functions
    By blairjj in forum Archives2006
    Replies: 0
    Last Post: 11-13-2006, 04:52 AM

Posting Permissions

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