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:

NC file size check


Recommended Posts

Hi,

I think many of us have OLD CNC equipment with low memory compacity, is there away that we can make the post WARNS us if the file exceeds more than 100K? I think it is possible but not sure how to do it, would you guys please help?

 

 

PS: If it warns us so we don't have to spend more time to send out the CNC so we can pick the right equipment. Thank you.

 

 

 

Thanks a bunch,

Steven.L

Link to comment
Share on other sites

I don't think there is a post function that will give you the file size. This is something you'll have to deal with manually. There is an option that will allow you break up a large NC file into multiple NC files of a maximum length. This is the SectionNCI chook. The issue though is that this is a completely manual process.

Link to comment
Share on other sites

And once again, Peter finds a great solution.

 

I would suggest checking your post to see if you have this postblock:

 

'ppost$'

 

If that post block doesn't exist, you can add it to your post. The 'ppost$' post block will allow you to perform actions after the NC file has finished posting. That way you only have to run the check once, at the end of the NC file being written.

 

Here some test code. Hopefully Peter will suggest changes if I screw something up. :)

 



scharwarn : "Warning - number of characters is above check in post. Next dialog will display actual number of characters."


ppost$
 if nchar$ > 100000,
      [
      result = mprint(scharwarn)
      result = mprint(nchar$)
      ]


 

You could make it more simple, and always display the number of characters as well.

 

scharwarn : "Number of characters in NC File will display next."
ppost$
 result = mprint(scharwarn)
 result = mprint(nchar$)

  • Like 2
Link to comment
Share on other sites

Hi Colin.G,

It worked, thanks Colin.G and Peter. On the other hand, is there away that I can convert from CHARACTERS into BYTES or KB for my message? Because I think my old equipment is only allow up to 70KB per program.

 

 

Thanks a bunch.

Link to comment
Share on other sites

See if this helps.

 

http://en.wikipedia.org/wiki/Byte

 

The byte /ˈbt/ is a unit of digital information in computing and telecommunications that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer[1][2] and for this reason it is the smallest addressable unit of memory in many computer architectures.

 

Short answer is yes. Again easily tested by making a program and seeing if fits in the machine. Trail and error the best ways to see if something works or not.

Link to comment
Share on other sites
  • 1 month later...

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