Dhananjay @Mastercam India

Code expert Sync code setting for Multi Stream Nc code.

Recommended Posts

Give the below regex a try.

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

Share this post


Link to post
Share on other sites
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. 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
7 hours ago, Dhananjay @Mastercam India said:

Is there any other settings need  to be done.

Because still I'm not getting any effect.

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

Share this post


Link to post
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? 

 

Share this post


Link to post
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

Share this post


Link to post
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 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 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