Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

String Select Value out of Range


Recommended Posts

I've come across an issue in a few of our posts that, while not really causing issues, is kind of annoying. Whenever using a highspeed project toolpath I'll get a post error saying "the value of the string selection variable is out of range: 15". I look up the line the error is referencing in the post and it takes me to this post block:

pstock     # Comment amount of stock to leave
           spaces$=0
           if (opcode$=13 | opcode$=14),
             [
             if opcode$ = 13 & hst_flg, n$, pspc, scomm_str, "TOOLPATH - ", *sopnotehst, scomm_end, e$
             else, n$, pspc, scomm_str, "TOOLPATH - ", *stoper, scomm_end, e$
             if tool_op$ = 132,
               [
               n$, pspc, scomm_str, "STOCK LEFT ON WALLS = ", *stock_walls, scomm_end, e$
               n$, pspc, scomm_str, "STOCK LEFT ON FLOORS = ", *stock_floors, scomm_end, e$
               ]
             else,
               [
               n$, pspc, scomm_str, "STOCK LEFT ON DRIVE SURFS = ", *stock, scomm_end, e$
               if check<>0, n$, pspc, scomm_str, "STOCK LEFT ON CHECK SURFS = ", *check, scomm_end, e$
               ]
             hst_flg = 0
             ]
           if stockleft,
             [
             if opcode$ = 1 | opcode$ = 2,
               [
               pbld, n$, scomm_str, "Z STOCK TO LEAVE  = ", *stock1, scomm_end, e$
               pbld, n$, scomm_str, "XY STOCK TO LEAVE = ", *stock, scomm_end, e$
               ]
             if opcode$ = 19, pbld, n$, scomm_str, "Z STOCK TO LEAVE  = ", *stock2, scomm_end, e$
             if opcode$ = 4, pbld, n$, scomm_str, "STOCK LEFT ON DRIVE SURFS = ", *stock, scomm_end, e$
             ]
           spaces$=sav_spc

It only has to do with posting out stock to leave, etc. so it's not really hurting anything, but it's annoying to get post errors and the other programmers might not know what it is and think something is seriously wrong. I've looked through the MP guide and found that the opcode for the Project path is 132 and it's saying it's out of range for this string select table:

#Select operation note
shst00   : "CORE ROUGHING...."      # String definition
shst01   : "AREA CLEARANCE..."      #    "       "
shst02   : "WATERLINE........"      #    "       "
shst03   : "CONSTANT STEPOVER"      #    "       "
shst04   : "HORIZONTAL......."      #    "       "
shst05   : "RASTER..........."      #    "       "
shst06   : "PENCIL..........."      #    "       "
shst07   : "FLOWLINE........."      #    "       "
shst08   : "BLEND............"      #    "       "
shst09   : "SPIRAL..........."      #    "       "
shst10   : "PROJECT.........."      #    "       "
shst11   : "ROUGH REST PASSES"      #    "       "
shst12   : "FLOWLINE........."      #    "       "
shst13   : "M.FINISH........."      #    "       "
shst14   : "M.ROUGH.........."      #    "       "

sopnotehst : ""                    # Target string
fstrsel  shst00 hststyle sopnotehst 15 -1

I'm just trying to figure out exactly how to get this all to work without error. Thanks in advance for your guys' help!

Link to comment
Share on other sites

The names and types of HST paths have been enhanced or changed since your post was written. Now, instead of having 15 choices, there are now 16 choices. The String Select table is being "overran", because HST Project has a value of '15', and your String Select Table list stops at 14. (The list uses a "zero-based" index. The first item in the list is zero. The 15th item in the list is "number 14".)

So the fix is to modify the table to include the extra entry. I'd recommend just downloading the latest copy of MPMaster from here, and copy/pasting the entire String Select Table. The reason for that is that several of the strings/OP names have been revised, so it's better to get the strings all correct, rather than just adding another line to your table.

If all you want to do is fix the error, add another line:

shst15  :  "HST Project"

And revise the "number" of entries to 16:

fstrsel shst00 hststyle sopnotehst 16 -1

  • Thanks 1
  • Like 3
Link to comment
Share on other sites
43 minutes ago, Colin Gilchrist said:

The names and types of HST paths have been enhanced or changed since your post was written. Now, instead of having 15 choices, there are now 16 choices. The String Select table is being "overran", because HST Project has a value of '15', and your String Select Table list stops at 14. (The list uses a "zero-based" index. The first item in the list is zero. The 15th item in the list is "number 14".)

So the fix is to modify the table to include the extra entry. I'd recommend just downloading the latest copy of MPMaster from here, and copy/pasting the entire String Select Table. The reason for that is that several of the strings/OP names have been revised, so it's better to get the strings all correct, rather than just adding another line to your table.

If all you want to do is fix the error, add another line:

shst15  :  "HST Project"

And revise the "number" of entries to 16:

fstrsel shst00 hststyle sopnotehst 16 -1

Thanks Colin! This makes sense. Reading through the MP guide I have seen where they're using more specific numbers for all of the new toolpaths, etc. I'll get the newest MPMaster and copy that in. Thanks again!

  • Like 1
Link to comment
Share on other sites
  • 5 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...