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:

Does anybody know how to set the precision of the NCI file?


Recommended Posts

I am wondering how to set the precision for some values, for example:

code:

1050

11 36 30 5 2008 10 20 0 D:MCAMXMCXLINECONTOUR.MCX

999

1 0 1

1051

Generic Mill

1053

Machine Group-1

1011

0. 0. 0. 0. 0. 0. 0. 0. 0. 0.

1012

2 0 0 0 0 0 0 0 0 0

1013

0 5. 0. 1 1 0. 0. 0. 2 D:MCAMXMILLTOOLSFLATMILL.mcx

1014

1. 0. 0. 0. 1. 0. 0. 0. 1.

1016

1 10 1 1 0. 0. 0. 41 0 1 4 0 0. -1 0 2 1

1017

1. 0. 0. 0. 1. 0. 0. 0. 1.

950

0 0 0 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1025

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1027

1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0.

1028

0 0 0. 0. 1. 0. 0. 1. 0 0 0 0

1029

0. 0. 0. 0. 0. 0. 0. 0. 0. 0 0

1020

35.355339 35.355339 0. 17.67767 17.67767 0. 0 0. 0. 0. 0. 0 50000 ALUMINUM mm - 2024

20010

TOP

20011

 

20012

TOP

20013

 

20014

TOP

20015

 

20016

ALUMINUM mm - 2024

20017

 

20018

Toolpath Group-1

20019

 

20001

5. FLAT ENDMILL

20002

 

20003

 

20004

214 10 1 0 5. 0. 0. 180. 214 214 1.790625 1.790625 1.790625 0 16 4

20006

0 50. 50. 25. 25. 0. 0. 0.

20007

0. 50. 75. 60. 5. 50. 25. 0 25. 25. 1

20008

0. 0. 1. 0 0. 0. 0 0. 0.

1001

0 100 2 214 214 214 0 0 1.790625 0 -1.76776695 1.76776695 50. 250. 250. 250. 0 0.

0

0 -1.76776695 1.76776695 50. -2. 0

0

0 -1.76776695 1.76776695 10. -2. 0

1

0 -1.76776695 1.76776695 -5. 1.790625 0

1

0 7.24964853 10.78518244 -5. -1. 3000

2

0 0 13.54217727 11.42085693 10.78518244 7.24964853 -5. -1. 0 0

3

0 0 25.17766953 17.67766953 17.67766953 17.67766953 -5. -1. 0 0

3

0 0 23.93448212 21.81316178 17.67766953 17.67766953 -5. -1. 0 0

2

0 0 24.57015661 28.10569052 28.10569052 24.57015661 -5. -1. 0 0

1

0 33.58757211 37.12310601 -5. -1. 300

1

0 33.58757211 37.12310601 5. -1. 0

0

0 33.58757211 37.12310601 50. -2. 0

1011

0. 0. 0. 0. 0. 0. 0. 0. 0. 0.

1012

2 0 0 0 0 0 0 0 0 0

1013

0 5. 0. 1 1 0. 0. 0. 2 D:MCAMXMILLTOOLSFLATMILL.mcx

1014

1. 0. 0. 0. 1. 0. 0. 0. 1.

1016

1 10 1 1 0. 0. 0. 41 0 1 4 0 0. -1 0 2 1

1017

1. 0. 0. 0. 1. 0. 0. 0. 1.

950

0 0 0 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1025

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1027

1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0.

1028

0 0 0. 0. 1. 0. 0. 1. 0 0 0 0

1029

0. 0. 0. 0. 0. 0. 0. 0. 0. 0 0

1020

35.355339 35.355339 0. 17.67767 17.67767 0. 0 0. 0. 0. 0. 0 50000 ALUMINUM mm - 2024

20010

TOP

20011

 

20012

TOP

20013

 

20014

TOP

20015

 

20016

ALUMINUM mm - 2024

20017

 

20018

Toolpath Group-1

20019

 

1000

0 100 2 214 214 214 0 0 1.790625 0 -1.76776695 1.76776695 50. 250. 250. 250. 0 0.

0

0 -1.76776695 1.76776695 50. -2. 0

0

0 -1.76776695 1.76776695 10. -2. 0

1

0 -1.76776695 1.76776695 -5. 1.790625 0

1

0 7.24964853 10.78518244 -5. -1. 3000

2

0 0 13.54217727 11.42085693 10.78518244 7.24964853 -5. -1. 0 0

3

0 0 25.17766953 17.67766953 17.67766953 17.67766953 -5. -1. 0 0

3

0 0 23.93448212 21.81316178 17.67766953 17.67766953 -5. -1. 0 0

2

0 0 24.57015661 28.10569052 28.10569052 24.57015661 -5. -1. 0 0

1

0 33.64968513 37.18521904 -5. -1. 0

1

0 1166.20421388 1020.84357961 -5. -1. 300

1

0 1166.20421388 1020.84357961 5. -1. 0

0

0 1166.20421388 1020.84357961 50. -2. 0

1003

250. 250. 250.


It is a very simple NCI file. We can see there are various precision settings in various places.

 

code:

 

1020

35.355339 35.355339 0. 17.67767 17.67767 0. 0 0.


Commnad 1020 has 6-digitals after decimal setting.

 

code:

 

0

0 -1.76776695 1.76776695 10. -2. 0

1

0 -1.76776695 1.76776695 -5. 1.790625 0

1

0 7.24964853 10.78518244 -5. -1. 3000

2

0 0 13.54217727 11.42085693 10.78518244


For movement commands, they have 8-digitals setting.

 

How can I change them? Are they predefined internally in Mastercam?

 

Thanks!

Link to comment
Share on other sites

Sigma,

 

Are you trying to take the NCI file and run it through some other Post processor that you created? I think you might be going about this the hard way. You can take any standard Mastercam post and use the format statements to configure the output precision of each variable.

 

There are several documents that you need to get from your Mastercam reseller. The best way to understand the post processor is to read the V9 Post Processor Guide. This in combination with the X Post Processor Reference Guide do a great job of explaining the NCI and Posting process.

Link to comment
Share on other sites

Yes I am.

I am trying to develop a Post processor by myself, and encapsulate it in a DLL.

 

When I am working with it, I do find some problems in the NCI file format. Maybe it is because I don't know this subject very well.

 

Anyway, thank you for your advice, Colin!

Link to comment
Share on other sites

Sigma,

 

Getting a copy of the Post Reference Guide is your best bet.

 

If you still want to write your own post, you can, but there are several routines in the MP.dll file that run automatically at the time of posting and do certain prepatory functions before running the user-defined routines in the .PST file.

 

In addition to the NCI file, Mastercam can also post out a .OPS file that contains all of the toolpath parameter information and Tool parameters.

 

The .OPS file is parsed with several optional routines to extract that parameter information and present it to the post.

 

There are several free posts that ship with Mastercam and there are several other free posts that are available for download to anyone. MPMaster is one of the best to start with because there are lots of pre-defined routines that you can customize to get the output you need.

 

You can find a link to download MPMaster from the Emastercam website.

 

Are you trying to create your own Post so you can protect it? Mastercam has the ability to encrypt a post (called Binning) so that you can protect your work as a software developer. Binning the post creates two files, a .PST file (which can be basically empty) and a .PSB file that contains the encrypted data.

 

You can certainly create your own post if you wish, I just think you are going about this the hard way.

 

From what I've been able to gather, the precision in the NCI file is fixed. You need to create routines in your Post that will read the data in and format that data using good rounding routines to calculate the values you need.

 

If you still want to persue this project, this is the right place to ask questions...

Link to comment
Share on other sites
  • 14 years later...

How do I read some values from the NCI file . For example  I just need the cutter location points from the NCI File in a JSON file format . I am doing this to display output response for an input of tool and toolpath parameters. how to call certain values from the NCI file itself?

 

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