Skip to main content
Solved

Multi configuration operands for refracrtive index


Forum|alt.badge.img

Hi all,

 

Is there a way to write a zpl file for making 2 configuration in NSC mode, while changing the refractive index of one of the object? Something like this:

conf 1:

a = n-bk7

    SETNSCPROPERTY 1, 6*i-5, 4, 0, ADF505
    SETNSCPROPERTY 1, 6*i-4, 4, 0, a
    SETNSCPROPERTY 1, 6*i-3, 4, 0, ADF505
    SETNSCPROPERTY 1, 6*i-2, 4, 0, a
    SETNSCPROPERTY 1, 6*i-1, 4, 0, ADF505
    SETNSCPROPERTY 1, 6*i, 4, 0, ADF505

 

conf 2:

a = s-lah98

    SETNSCPROPERTY 1, 6*i-5, 4, 0, ADF505
    SETNSCPROPERTY 1, 6*i-4, 4, 0, a
    SETNSCPROPERTY 1, 6*i-3, 4, 0, ADF505
    SETNSCPROPERTY 1, 6*i-2, 4, 0, a
    SETNSCPROPERTY 1, 6*i-1, 4, 0, ADF505
    SETNSCPROPERTY 1, 6*i, 4, 0, ADF505

 

Thanks,

Nadav

Best answer by David.Nguyen

Hi Nadav,

 

I’m not sure I understand your point. Have a look at the Help File for SETMCOPERAND (The Programming Tab > About the ZPL > KEYWORDS (about the zpl) > SETMCOPERAND ). The general syntax for SETMCOPERAND is:

SETMCOPERAND row, config, value, datatype

In the line:

SETMCOPERAND row, 0, object, 1

You can see that the config is 0, which means the value changes depending on the datatype. Since datatype is 1value is the first parameter of NGLS, or the Object #.

Does that make sense?

Take care,

 

David

View original
Did this topic help you find an answer to your question?

5 replies

David.Nguyen
Luminary
Forum|alt.badge.img+2

Hi Nadav,

 

In the Multi-Configuration Editor, you have an operand called NGLS for the material type for non-sequential objects. In ZPL, you can create, and modify a Multi-Configuration operand with INSERTMCO, and SETMCOPERAND. With your example, you could do:

# Define row number for a new NGLS operand
row = 1

# Define object number that will be attached to NGLS
object = 4

# Insert a new operand in the first row
INSERTMCO row

# Change the new operand to NGLS
SETMCOPERAND row, 0, "NGLS", 0

# Update NGLS to apply to your object of interest
SETMCOPERAND row, 0, object, 1

# Insert an additional configuration
INSERTCONFIG 1

# Set Material for Config 1
SETMCOPERAND row, 1, "N-BK7", 0

# Set Material for Config 2
SETMCOPERAND row, 2, "N-SF1", 0

I hope that makes sense.

The rest of your code with the SETNSCPROPERTY seems identical in both configurations why do you need to repeat it twice?

Take care,

 

David


Forum|alt.badge.img
  • Author
  • Fully Spectral
  • 89 replies
  • April 9, 2023

Hi David,

 

Thanks for the quick and detailed answer.

NGLS work also for pure NSC mode?

 

Thanks,

Nadav


David.Nguyen
Luminary
Forum|alt.badge.img+2

Hi Nadav,

 

Yes it does. I think NGLS was always intended for non-sequential mode.

Take care,


David


Forum|alt.badge.img
  • Author
  • Fully Spectral
  • 89 replies
  • April 13, 2023

Hi David,

 

I am trying to run your code but it seems the “SETMCOPERAND row, 0, object, 1” control only the surface number(which in pure NSC should be 1) and not the object number.

 

 

 

Thanks,

Nadav


David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1122 replies
  • Answer
  • April 13, 2023

Hi Nadav,

 

I’m not sure I understand your point. Have a look at the Help File for SETMCOPERAND (The Programming Tab > About the ZPL > KEYWORDS (about the zpl) > SETMCOPERAND ). The general syntax for SETMCOPERAND is:

SETMCOPERAND row, config, value, datatype

In the line:

SETMCOPERAND row, 0, object, 1

You can see that the config is 0, which means the value changes depending on the datatype. Since datatype is 1value is the first parameter of NGLS, or the Object #.

Does that make sense?

Take care,

 

David


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings