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:

G50'S WITH "J"


Recommended Posts

Greetings,

Does anyone know what it takes to have my code post G50 offsets with a J added for offsets after G59? Example: G54J2 G54J3 and so on. I did a quick search for topics on this but did not come up with anything. I contacted my reseller and have not heard back from them yet.

 

Thanks,

rchipper

Link to comment
Share on other sites

Yasnac?

 

I"ll dig through my library when I get in tonight and see if I have something, pretty sure I do....

 

I have handled this 2 ways.

 

String Selection table

&

modified PWCS section

Link to comment
Share on other sites

See if this helps point you in the right direction. This is for X9 MPMaster. I removed the HAAS logic from the post.

pwcs            #G54+ coordinate setting at toolchange
      if wcstype = two | wcstype > three,
        [
        sav_frc_wcs = force_wcs
        if sub_level$ > zero, force_wcs = zero
        if sav_mi9 = 1, workofs$ = sav_workofs
        if workofs$ < 0, workofs$ = 0
        if workofs$ <> prv_workofs$ | (force_wcs & toolchng) | sof,
          [
          if workofs$ < 6,
            [
            g_wcs = workofs$ + 54
            *g_wcs
            ]
          else,
            [
            spaces$ = 0
            j_wcs = workofs$ - five
            "G54", *j_wcs
            spaces$ = sav_spc
            ]
          ]
        force_wcs = sav_frc_wcs
        !workofs$
        ]

This is for the Generic X9 Fanuc 3 Axis post:

pwcs            #G54+ coordinate setting at toolchange
      if mi1$ > one,
        [
        sav_frc_wcs = force_wcs
        if sub_level$ > 0, force_wcs = zero
        if workofs$ <> prv_workofs$ | (force_wcs & toolchng),
          [
          if workofs$ < 6,
            [
            g_wcs = workofs$ + 54
            *g_wcs
            ]
          else,
            [
            spaces$ = 0
            j_wcs = workofs$ - five
            "G54", *j_wcs
            spaces$ = sav_spc
            ]
          ]
        force_wcs = sav_frc_wcs
        !workofs$
        ]

Add this format statement to either one in the g_wcs or p_wcs area of the post.:

fmt  "J" 4  j_wcs       #WCS J address

I think that will give you what you need.

  • Like 1
Link to comment
Share on other sites

Thank you Ron.

I will try to figure this out. I have very limited experience with editing posts. I am in the shop for the next day or so, I will probably work on it this weekend and test it on Monday.

 

What I put up is about as easy as you can get. Backup your post and try it out. Get stuck post p your steps and someone should be able to help you get it sorted out.

Link to comment
Share on other sites

Because of the way the Yasnac recycles the G54 and J values, I use two lookup tables, and a simple pwcs statement.

lookup table 4 sets the correct G54-G59, and lookup table 5 sets the J value.

This allows

G54 thru G59 to use J2,

G54 thru G59 to use J3,

G54 thru G59 to use J4,

on, and on, to J9

 

Example: Mastercam work offset 6 = G54 J2, work offset 7 = G55 J2, work offset 12 = G54 J3

 

 

lookup tables:

# --------------------------------------------------------------------------
# Define work offset G5X values
flktbl  4       48      #Lookup table definition - table no. - no. entries
    54  6
    55  7
    56  8
    57  9
    58  10
    59  11
    54  12
    55  13
    56  14
    57  15
    58  16
    59  17
    54  18
    55  19
    56  20
    57  21
    58  22
    59  23
    54  24
    55  25
    56  26
    57  27
    58  28
    59  29
    54  30
    55  31
    56  32
    57  33
    58  34
    59  35
    54  36
    55  37
    56  38
    57  39
    58  40
    59  41
    54  42
    55  43
    56  44
    57  45
    58  46
    59  47
    54  48
    55  49
    56  50
    57  51
    58  52
    59  53

# --------------------------------------------------------------------------
# Define work offset JX values
flktbl  5       48      #Lookup table definition - table no. - no. entries
    2   6
    2   7
    2   8
    2   9
    2   10
    2   11
    3   12
    3   13
    3   14
    3   15
    3   16
    3   17
    4   18
    4   19
    4   20
    4   21
    4   22
    4   23
    5   24
    5   25
    5   26
    5   27
    5   28
    5   29
    6   30
    6   31
    6   32
    6   33
    6   34
    6   35
    7   36
    7   37
    7   38
    7   39
    7   40
    7   41
    8   42
    8   43
    8   44
    8   45
    8   46
    8   47
    9   48
    9   49
    9   50
    9   51
    9   52
    9   53



In pwcs post block:

 ### LOOKUP  and POST G5X AND JX VALUES
            g_wcs = flook(four, p_wcs)
            j_wcs = flook(five, p_wcs)
            *g_wcs, *j_wcs
  • Like 1
Link to comment
Share on other sites

JParis,

Yes Yasnac. Did you come up with anything? I am still fairly new to Mastercam especially when it comes to posts. I have very little experience editing but I am a fast learner.

 

Sorry for the delay....busy as hell with work.....I checked and I for the life of me can't find either of those posts.....

 

It looks like though you have the code here to get what you need....

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