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:

ISO GROUP - Material call out


Recommended Posts

Hello everyone,
   I am trying to call out the ISO Group, is there a way I can call out the individual?

P - General Steel
M - Stainless and Cast Steel
K - Cast Iron
N - Aluminum, Copper and Non-Metallic
S - High Temperature Supper Alloys
H - Hardened Steel and Cast Iron


I've tried to look for PARAMETER# just for ISO Group and I couldn't find it.  I would like to call the ISO Group out base on the drop down selected. 


Thank you for you guys help,
    S.Luong

Material table call out.png

Link to comment
Share on other sites
On 4/26/2018 at 1:19 PM, geirsj said:

Hi!

Can you use parameter 19123 for your task?

see picture 

 

G

 

19123.PNG

 

Hi GieSJ,
   This is what I tried...

 

MaterialNameList: 0

fmt "" 4 MaterialNameList


if prmcode$ = 19123, MaterialNameList = rpar(sparameter$, 1)

*MaterialNameList, e$

# --------------------------------------------------------------------------
# ISO Group Material String Select
#ISOGroup0 : ""
#ISOGroup1 : "Unknown"
#ISOGroup2 : "General Steel"
#ISOGroup3 : "Stainless And Cast Steel"
#ISOGroup4 : "Cast Iron"
#ISOGroup5 : "Aluminum, Copper And Non-Metallic"
#ISOGroup6 : "High Temperature Super Allows"
#ISOGroup7 : "Hardened Steel And Cast Iron"
#ISOGroup  : ""         #Target string

fstrsel ISOGroup0 ISOGroup ISO_Group 8 -1


============= OUTPUT============

0

and it should appear like : N - Aluminum, Copper and Non-Metallic


 
Link to comment
Share on other sites

I dumped all the machine group parameters and that string wasn't in there, so I don't think you can capture data from that combo box. 

Parameter 19123 returns the string from the material textbox, so it won't work with a string select table(also, your table is defined incorrectly).  If you are in Mastercam 2017+ you can (and should) use the groupinfo function to capture that string, but in X9 you'll have to use the pmachineinfo$ post block.

Link to comment
Share on other sites
2 hours ago, jeff.D said:

I dumped all the machine group parameters and that string wasn't in there, so I don't think you can capture data from that combo box. 

Parameter 19123 returns the string from the material textbox, so it won't work with a string select table(also, your table is defined incorrectly).  If you are in Mastercam 2017+ you can (and should) use the groupinfo function to capture that string, but in X9 you'll have to use the pmachineinfo$ post block.

Hi Jeff,
   Thank you for your valuable respond.  I am using MasterCam2018 and how can I use the ""groupinfo" function in this case for the string? 

 

Thank you.

Link to comment
Share on other sites
57 minutes ago, PcRobotic said:

Hi Jeff,
   Thank you for your valuable respond.  I am using MasterCam2018 and how can I use the ""groupinfo" function in this case for the string? 

 

Thank you.

Below is an example of how to use the groupinfo function.

smaterialTextbox : ""

pheader$
       smaterialTextbox = groupinfo(19123)
       n$, smaterialTextbox, e$

 

Link to comment
Share on other sites
3 hours ago, jeff.D said:

I dumped all the machine group parameters and that string wasn't in there, so I don't think you can capture data from that combo box. 

Parameter 19123 returns the string from the material textbox, so it won't work with a string select table(also, your table is defined incorrectly).  If you are in Mastercam 2017+ you can (and should) use the groupinfo function to capture that string, but in X9 you'll have to use the pmachineinfo$ post block.

 

This is what I did, and I think I am wrong but don't know how to fix it.  Would you please point out my mistakes?  Thank you.

=======================
ISO_Group: 0
sUnknown : 0
sGeneralSteel: 0
sStainlessAndCastSteel: 0
sCastIron: 0
sAluminumCopperAndNonMetallic: 0
sHighTemperatureSupperAlloys: 0
sHardenedSteelAndIastIron: 0

=======================

fmt "Unknown" 4 sUnknown
fmt "P - General Steel" 4 sGeneralSteel
fmt "M - StainlessAndCastSteel" 4 sStainlessAndCastSteel
fmt "K - Cast Iron" 4 sCastIron
fmt "N - Aluminum Copper And Non-Metallic" 4 sAluminumCopperAndNonMetallic
fmt "S - HighTemperatureSupperAlloys" 4 sHighTemperatureSupperAlloys
fmt "H - HardenedSteelAndIastIron" 4 sHardenedSteelAndIastIron

=======================
pmachineinfo$   #Machine information parameters postblock
      #rd_md is used to call pmachineinfo postblock and read the parameters of the selected axis combination machine entity set in rd_mch_ent_no
      #rd_cd is used to call pmachineinfo postblock and read the active control definition parameters
      #rd_tlpathgrp is used to call pmachineinfo postblock and read the active toolpath group parameters
      #"-->pmachineinfo", ~prmcode$, "  ", ~sparameter$, e$  #Do not uncomment if being called from pprep$ - see pprep comment

      if prmcode$ = 19123,
	   [
	    sUnknown = rpar(sparameter$, 0) 
		sGeneralSteel = rpar(sparameter$, 1) 
		sStainlessAndCastSteel = rpar(sparameter$, 2) 
		sCastIron = rpar(sparameter$, 3) 
		sAluminumCopperAndNonMetallic = rpar(sparameter$, 4) 
		sHighTemperatureSupperAlloys = rpar(sparameter$, 5) 
		sHardenedSteelAndIastIron = rpar(sparameter$, 6) 
	   ]
===================================
pmachineinfo$ #Machine information parameters postblock #rd_md is used to call pmachineinfo postblock and read the parameters of the selected axis combination machine entity set in rd_mch_ent_no #rd_cd is used to call pmachineinfo postblock and read the active control definition parameters #rd_tlpathgrp is used to call pmachineinfo postblock and read the active toolpath group parameters #"-->pmachineinfo", ~prmcode$, " ", ~sparameter$, e$ #Do not uncomment if being called from pprep$ - see pprep comment if prmcode$ = 19123, 
 [ 
  sUnknown = rpar(sparameter$, 0) 
  sGeneralSteel = rpar(sparameter$, 1) 
  sStainlessAndCastSteel = rpar(sparameter$, 2) 
  sCastIron = rpar(sparameter$, 3) 
  sAluminumCopperAndNonMetallic = rpar(sparameter$, 4) 
  sHighTemperatureSupperAlloys = rpar(sparameter$, 5) 
  sHardenedSteelAndIastIron = rpar(sparameter$, 6) 
 ]


 

pheader$         #Call before start of file  
	  *ISO_Group, "(GROUP HERE)", e$
	  if sUnknown = 1, *sUnknown, "(GROUP HERE)", e$
	  if sGeneralSteel = 0, *sGeneralSteel, "(GROUP HERE)", e$
	  if sStainlessAndCastSteel = 1, *sStainlessAndCastSteel, "(GROUP HERE)", e$
	  if sCastIron = 1, *sCastIron, "(GROUP HERE)", e$
	  if sAluminumCopperAndNonMetallic = 1, *sAluminumCopperAndNonMetallic, "(GROUP HERE)", e$
	  if sHighTemperatureSupperAlloys = 1, *sHighTemperatureSupperAlloys, "(GROUP HERE)", e$
	  #if sHardenedSteelAndIastIron = 1, *sHardenedSteelAndIastIron, "(GROUP HERE)", e$
	  

 

Link to comment
Share on other sites
4 minutes ago, jeff.D said:

Below is an example of how to use the groupinfo function.


smaterialTextbox : ""

pheader$
       smaterialTextbox = groupinfo(19123)
       n$, smaterialTextbox, e$

 

I did as you instructed and it didn't show anything at all.  Did I miss somewhere needs to be justified?  Thank you.

 

Thank you for your help.

Link to comment
Share on other sites
4 minutes ago, PcRobotic said:

I think lathe is different than Mill.  I think I did something wrong but in the moment I can't think of it.

 

 

Thank you.

Odd,  I've tested the above code in Mill and Lathe and I get the expected results.  Are you sure you are editing the correct post? 

  • Like 1
Link to comment
Share on other sites
47 minutes ago, jeff.D said:

Odd,  I've tested the above code in Mill and Lathe and I get the expected results.  Are you sure you are editing the correct post? 

Hi Jeff, 
   This is what I found out.  After several tests, it did show the material but.... but only... "MATERIAL NAME" not the ISO GROUP.  I would like it shows in ISO GROUP as selected like N- ALUMINUM, COPPER AND NON-METALLIC.  Please see detailed images.

Untitled.png

Link to comment
Share on other sites
5 hours ago, jeff.D said:

'I dumped all the machine group parameters and that string wasn't in there, so I don't think you can capture data from that combo box...' 

Sorry, but based on the parameter dump I did this morning, I don't believe that data is available.  

Link to comment
Share on other sites

Hi!

1 minute ago, PcRobotic said:

  I would like it shows in ISO GROUP as selected like N- ALUMINUM, COPPER AND NON-METALLIC.  Please see detailed images.

 

Hi!

Jeff pointed out that the info of the combo box was not available for any parameter, as what I too has found out during search this weekend in the nci reference, 

the only parameter available seems to be 19123.

 

So, the question is why you want that information?

 

As a workaround you could name your Material Name the same as ISO Group if you just want to grab the information. then you could use nr 19123

 

If you want to be sure the information on material name match up with the iso group for further comparing values it seems you are not being able to do so, since

the combo drop down box does not have any parameter available for us to grab.

Link to comment
Share on other sites
4 minutes ago, jeff.D said:

Sorry, but based on the parameter dump I did this morning, I don't believe that data is available.  

And in searching in the NCI reference guides no luck of finding other info either, anyway thanks Jeff!, you also learned me something of groupinfo with your guidance by replying too!

Link to comment
Share on other sites
39 minutes ago, jeff.D said:

Sorry, but based on the parameter dump I did this morning, I don't believe that data is available.  

Hi Jeff,
  Thank you for your big help that you have put your time into my concern.  One of the reasons I would like to call out the ISO GROUP because I want to use "IF function" for these following....

 

IF "N- ALUMINUM, COPPER AND NON-METALLIC", then warning "NO COOLANT"

If "S - High Temperature Supper Alloys", then allowing no coolant but output this note "APPLY MONKEY xxxx  ON TAP" OR....
If "S - High Temperature Supper Alloys", then DO NOT ALLOW ANY SURFACE SPEED MORE THAN..... "1000" OR....

I know may be people don't like the idea because it is "OVER KILL", and trust me some programmers, their speed and feeds would kill the spindle easily.

Once again, thank you for all of your help and valuable time.

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