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:

Outputting Letters instead of numbers


Recommended Posts

Hi Guys,

 First off Merry Christmas to those who celebrate, Happy Holidays to all else.

I am doing some customizing to our Okuma Post we got from our Reseller, and on the Okuma's the tool offsets use letters instead of numbers.

So for example:

  In the tool parameter page for example we use tool #1 offset #1 right? It outputs G56 H1, for the secondary offset if we typed in 21 then it outputs G56 H21.

  What we use is HA, HB and HC for our height offsets and DA, DB, DC for our Diameter offsets.

So my question is, is there a way in the format statements to set up letters? 

fs2 4   1 0 1 0      #Integer, not leading <----------This into letter format?

Thanks,

Todd

Link to comment
Share on other sites

I imagine you'll have to use a little logic to evaluate the integer value in the dialogue then output the appropriate letter based on the evaluation.  I would suggest adding a block to handle the logic so that you can only call it in the appropriate output block.  I've never had to do that one but I imagine this would be a rather easy fix.

  • Like 1
Link to comment
Share on other sites

Not going to happen the way your thinking. You need to use a string logic to control this. I came up with this for the Mazatrol tool control over a decade ago and your more than welcome to modify it for your need. The difference was the information was used in the Tool Header as we would output the decimal point for the tool for the machine to then covert to the alpha letter in the machine. You want to get alpha output so you will need to query the string output for each tool as it is called to get the correct alpha output if you use something like here where the mr2$ was being used. Not sure if you can do a t$ = one, stra or if it would be better to control this else where without having the full post. This will be some work and I would suggest you go back to the post builder and ask them to assist.

prdbsuffix_abc
      if mr2$ = 0, ".00"
      if mr2$ = 0.01,*stra
      if mr2$ = 0.02,*strb
      if mr2$ = 0.03,*strc
      if mr2$ = 0.04,*strd
      if mr2$ = 0.05,*stre
      if mr2$ = 0.06,*strf
      if mr2$ = 0.07,*strg
      if mr2$ = 0.08,*strh
      if mr2$ = 0.09,*strj
      if mr2$ = 0.11,*strk
      if mr2$ = 0.12,*strl
      if mr2$ = 0.13,*strm
      if mr2$ = 0.14,*strn
      if mr2$ = 0.15,*strp
      if mr2$ = 0.16,*strq
      if mr2$ = 0.17,*strr
      if mr2$ = 0.18,*strs
      if mr2$ = 0.19,*strt
      if mr2$ = 0.21,*stru
      if mr2$ = 0.22,*strv
      if mr2$ = 0.23,*strw
      if mr2$ = 0.24,*strx
      if mr2$ = 0.25,*stry
      if mr2$ = 0.26,*strz
      if mr2$ = 0.61,*sheavy, *stra
      if mr2$ = 0.62,*sheavy, *strb
      if mr2$ = 0.63,*sheavy, *strc
      if mr2$ = 0.64,*sheavy, *strd
      if mr2$ = 0.65,*sheavy, *stre
      if mr2$ = 0.66,*sheavy, *strf
      if mr2$ = 0.67,*sheavy, *strg
      if mr2$ = 0.68,*sheavy, *strh
      if mr2$ = 0.69,*sheavy, *strj
      if mr2$ = 0.71,*sheavy, *strk
      if mr2$ = 0.72,*sheavy, *strl
      if mr2$ = 0.73,*sheavy, *strm
      if mr2$ = 0.74,*sheavy, *strn
      if mr2$ = 0.75,*sheavy, *strp
      if mr2$ = 0.76,*sheavy, *strq
      if mr2$ = 0.77,*sheavy, *strr
      if mr2$ = 0.78,*sheavy, *strs
      if mr2$ = 0.79,*sheavy, *strt
      if mr2$ = 0.81,*sheavy, *stru
      if mr2$ = 0.82,*sheavy, *strv
      if mr2$ = 0.83,*sheavy, *strw
      if mr2$ = 0.84,*sheavy, *strx
      if mr2$ = 0.85,*sheavy, *stry
      if mr2$ = 0.86,*sheavy, *strz

Here is where they were defined:

# --------------------------------------------------------------------------
#String and string selector definitions for NC output
# --------------------------------------------------------------------------
#Address string definitions
stra        : "A"     #String for address A
strb        : "B"     #String for address B
strc        : "C"     #String for address C
strd        : "D"     #String for address D
stre        : "E"     #String for address E
strf        : "F"     #String for address F
strg        : "G"     #String for address G
strh        : "H"     #String for address H
stri        : "I"     #String for address I
strj        : "J"     #String for address J
strk        : "K"     #String for address K
strl        : "L"     #String for address L
strm        : "M"     #String for address M
strn        : "N"     #String for address N
stro        : "O"     #String for address O
strp        : "P"     #String for address P
strq        : "Q"     #String for address Q
strr        : "R"     #String for address R
strt        : "T"     #String for address T
stru        : "U"     #String for address U
strv        : "V"     #String for address V
strw        : "W"     #String for address W
srad        : "R"     #String for address R (radius)
srminus     : "R-"    #String for address R- (minus radius)
strs        : "S"     #String for address S
strx        : "X"     #String for address X
stry        : "Y"     #String for address Y
strz        : "Z"     #String for address Z
sc_minus    : "-"     #Manipulated string for signed rotary minus
sheavy      : "HEAVY " #String for Heavy Tools in Mazatrol

 

  • Like 1
Link to comment
Share on other sites
On 12/23/2018 at 2:54 PM, jlw™ said:

I imagine you'll have to use a little logic to evaluate the integer value in the dialogue then output the appropriate letter based on the evaluation.  I would suggest adding a block to handle the logic so that you can only call it in the appropriate output block.  I've never had to do that one but I imagine this would be a rather easy fix.

I have done this (in Fanuc) and it works well. I'm home until the 2nd (and coming into a "crisis" according to my e-mails). If you don't have it by them I'll see what I can do. You can do his by, reading the current offset or using mi$/mr$. Canned text can also be used but that would be more post edit work.

EDIT: I would prefer mr$ myself.

Link to comment
Share on other sites

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...