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:

How to reliably scan NCI 1051 (machine name) ?


Recommended Posts

I still don't get opinfo, even after reading the docs a thousand times.

NCI 1051 contains "Machine name" that is (almost) always same for every op. So I need to retrieve it only once. However, the following naive code works for all but not for Contour (Ramp), in which case it return with NCI 1051 not found message, even though NCI 1051 is there. Why?

In pheader$ postblock:

    while smachine_name = "" | smachine_name = "-99999",
    [
        smachine_name = opinfo(1051, op_index, 0000)
        *smachine_name, e$
        op_index = op_index + 1
        if op_index > 10000, result = mprint("NCI 1051 not found"), exitpost$
    ]

What is the preferred to way to get NCI 1051 and return immediately?

pcomment$ is not an option. I need the information in pheader$.
Link to comment
Share on other sites
On 11/16/2022 at 4:41 AM, SlaveCam said:

Still same...

It's odd that only if Contour Ramp is included, the scanning fails. Feels like a bug, anyone else?

I looked at the NCI and each operation (even contour ramp) contains a 1051 after the 999.  I've also had no trouble doing the following...

#// Postblock
op_index       : 0

operation_id   : 0
s_machine_name : ""

p_write_machine_names
    op_index = 0
    while s_machine_name <> "-99999",
    [
        operation_id = opinfo(1, op_index)
        s_machine_name = opinfo(1051, op_index)

        *operation_id, s_machine_name, e$

        op_index = op_index + 1
        s_machine_name = opinfo(1051, op_index)
    ]

#// Call
pheader$         #Call before start of file
    p_write_machine_names
  
// Sample output
operation_id 1. Mill Default
operation_id 2. Mill Default
%
O0000(T)
(DATE=DD-MM-YY - 19-11-22 TIME=HH:MM - 11:07)
(MCAM FILE - T)

 

My operations.

image.png

 

Can you share a bit more about what you are trying to do?

  • Like 1
Link to comment
Share on other sites

I created a test post from your example with a single addition, the first line (how do you get syntax highlighting?):

[POST_VERSION] #DO NOT MOVE OR ALTER THIS LINE# V23.00 P4 E1 W23.00 T1610470599 M23.00 I0 O10

op_index       : 0

operation_id   : 0
s_machine_name : ""

p_write_machine_names
    op_index = 0
    while s_machine_name <> "-99999",
    [
        operation_id = opinfo(1, op_index)
        s_machine_name = opinfo(1051, op_index)

        *operation_id, s_machine_name, e$

        op_index = op_index + 1
        s_machine_name = opinfo(1051, op_index)
    ]

#// Call
pheader$         #Call before start of file
    p_write_machine_names
  

Then I posted a single Contour operation and got:

operation_id 1, -99999

image.png.d31d6012d0d23ee62362962a5422ce40.png

Maybe a switch issue? Machine or control definition issue? This is mcam 2021

On 11/19/2022 at 6:11 PM, Zaffin_D said:

Can you share a bit more about what you are trying to do?

NCI 1051 contains "Machine name" that is (almost) always same for every op. So I need to retrieve it only once.

 

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