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:

Code expert Sync code setting for Multi Stream Nc code.


Recommended Posts

4 hours ago, Zaffin_D said:

Give the below regex a try.

\bM([1-9][0-9][1-9]|[2-9][0-9][0-9])\b

The above regex has some holes in it. 

Here is a better one...

\bM([1-9][0-9][1-9]|[1-9][1-9][0-9]|[2-9][0-9][0-9])\b

...and here is the regex being tested against some common M-codes. 

Link to comment
Share on other sites
1 hour ago, Zaffin_D said:

The above regex has some holes in it. 

Here is a better one...


\bM([1-9][0-9][1-9]|[1-9][1-9][0-9]|[2-9][0-9][0-9])\b

...and here is the regex being tested against some common M-codes. 

Is there any other settings need  to be done.

Because still I'm not getting any effect.

Link to comment
Share on other sites
1 hour ago, Zaffin_D said:

Can you provide a screen shot of what you entered in the text box? 

It's working for me, see below.

NcConfig.png.88001bcf24e83016cb86d2dc34682d6f.png

Syncs.png.ddefa0822b4862f316ead0ca456a0079.png

 Thank You sir, 😀 

Issue resolved 

Reason- Because of one space that sync. is not working .

Do you have any document on this how to define other sync. code.

which factor decide range of sync. code? 

 

Link to comment
Share on other sites
13 hours ago, Dhananjay @Mastercam India said:

 Thank You sir, 😀 

Issue resolved 

Reason- Because of one space that sync. is not working .

Do you have any document on this how to define other sync. code.

which factor decide range of sync. code? 

 

I recommend looking online for some resources about regular expressions.  It’s a vast topic, and it’s not one I’m qualified to cover; but I’ll do my best to break down the key parts of the regex.

Starting off we have a word boundary \b.

Next we match ‘M’ literally.

The open and closing parentheses define a match group.

The numbers between the braces define a range of values to match. So [1-9] will match 1, 2, 3, 4, 5, 6, 7, 8, or 9.

The pipe ‘|’ means or, and with the two other patterns we can range check from 101-999.

Again, I really recommend Googling regular expressions; you’ll find tons of resources.

  • Like 1
Link to comment
Share on other sites
On 7/10/2020 at 6:32 AM, Zaffin_D said:

I recommend looking online for some resources about regular expressions.  It’s a vast topic, and it’s not one I’m qualified to cover; but I’ll do my best to break down the key parts of the regex.

Starting off we have a word boundary \b.

Next we match ‘M’ literally.

The open and closing parentheses define a match group.

The numbers between the braces define a range of values to match. So [1-9] will match 1, 2, 3, 4, 5, 6, 7, 8, or 9.

The pipe ‘|’ means or, and with the two other patterns we can range check from 101-999.

Again, I really recommend Googling regular expressions; you’ll find tons of resources.

Thank you ! for valuable reply 

Link to comment
Share on other sites
  • 2 months later...
On 7/9/2020 at 6:50 AM, Zaffin_D said:

The above regex has some holes in it. 

Here is a better one...


\bM([1-9][0-9][1-9]|[1-9][1-9][0-9]|[2-9][0-9][0-9])\b

...and here is the regex being tested against some common M-codes. 

\bM([1-9][0-9][1-9]|[1-9][1-9][0-9]|[2-9][0-9][0-9])\b   { Current range is  101-999}

Hi, 

How i can increase the range to 1000-1099 

Regex Programming Language- 

1. Python 

2.Java

3. Javascript

4.PHP

5.c/c++ 

 

Which Programming Language is used to Creating regex for Mastercam ?

Link to comment
Share on other sites
8 hours ago, @Mastercam said:

\bM([1-9][0-9][1-9]|[1-9][1-9][0-9]|[2-9][0-9][0-9])\b   { Current range is  101-999}

Hi, 

How i can increase the range to 1000-1099 

Regex Programming Language- 

1. Python 

2.Java

3. Javascript

4.PHP

5.c/c++ 

 

Which Programming Language is used to Creating regex for Mastercam ?

The following regex will match M1000 - M1099

\bM10[0-9][0-9]\b

Here is a link to it being checked against common M-codes  

As far as what language is used; in this case it probably doesn't matter.  They all should support what you are trying to do.  One difference I'm aware of is the the C++ standard library regex implementation doesn't support lookbehind.  I think this goes for javascript also, but google will have a better answer if you care to get into the minutiae.

  • Like 1
Link to comment
Share on other sites
  • 4 weeks later...
On 9/15/2020 at 4:16 AM, Zaffin_D said:

The following regex will match M1000 - M1099


\bM10[0-9][0-9]\b

Here is a link to it being checked against common M-codes  

As far as what language is used; in this case it probably doesn't matter.  They all should support what you are trying to do.  One difference I'm aware of is the the C++ standard library regex implementation doesn't support lookbehind.  I think this goes for javascript also, but google will have a better answer if you care to get into the minutiae.

Hi,

can you give me regex  Sync code  range from M01- M1000 

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