Skip to main content

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

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


Hi David,

 

Thanks for the quick and detailed answer.

NGLS work also for pure NSC mode?

 

Thanks,

Nadav


Hi Nadav,

 

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

Take care,


David


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


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