Skip to main content

I need to be able to clear the detectors in my system to run a ray trace. I found the NSDD keyword, but I keep getting an error when I type "NSDD(0,0,0,0)". This is what I use in a non-Sequential Merit Function, so why doesn't it work here?



The NSDD operand in the ZPL does perform similarly to the NSDD optimization operand, but in the case of the ZPL, we are required to specify a surface number.








 



When working exclusively in Non-Sequential Mode, the surface number will always be 1. You may have noticed that this is the case in the Merit Function when using NSDD. In Non-Sequential Mode, the surface is "1" and is un-editable:











The only time this changes is when we are working in a Mixed Mode system!



Additionally, we find that in the ZPL Help System file (The Programming Tab > About the ZPL), NSDD is listed as a Numeric Function. This means that it cannot be used on its own, but must instead be attached to a variable. For example:



my_variable = Numeric Function



So to be able to clear the detectors, we can use the following line:



clear = NSDD(1,0,0,0)



To make sure that it worked, you can also add UPDATE ALL so that each of the windows refreshes after the line to clear the detectors is run!








Dear Allie, can you please help me to overcome this problem ? I will be very thankful to you.



How can we extract the data by using the NSDD in ZPL macro in non-sequential mode?


Hi Faheem,



The NSDD numeric function has four inputs: Surf, Object, Pixel, Data. As described above, Surf will always be equal to '1' in a pure non-sequential system. The value of Object will correspond to the detector of interest. Then Pixel and Data can be used to define which type of data you want. A full explanation of the different Pixel and Data values you can use is provided in the Help System file 'The Optimize Tab (sequential ui mode) > Automatic Optimization Group > Merit Function Editor (automatic optimization group) > Optimization Operands (Alphabetically).'



 





 



In order to use this in the ZPL, you will need to first clear the detectors as discussed above. Then you will need to run a ray trace with the NSTR keyword. After that keyword, you can use NSDD to pull the data you are interested in!



Does that help? Let me know if you have any other questions about this. 


Hi Faheem,

 

The NSDD numeric function has four inputs: Surf, Object, Pixel, Data. As described above, Surf will always be equal to '1' in a pure non-sequential system. The value of Object will correspond to the detector of interest. Then Pixel and Data can be used to define which type of data you want. A full explanation of the different Pixel and Data values you can use is provided in the Help System file 'The Optimize Tab (sequential ui mode) > Automatic Optimization Group > Merit Function Editor (automatic optimization group) > Optimization Operands (Alphabetically).'

 

 

 

 

 

200709-160130-image.png

 

 

 

 

 

In order to use this in the ZPL, you will need to first clear the detectors as discussed above. Then you will need to run a ray trace with the NSTR keyword. After that keyword, you can use NSDD to pull the data you are interested in!

 

 

Does that help? Let me know if you have any other questions about this. 

 

Dear all,

 

Just to add on top of that, it seems to me that the “NSC Operands” topic in the help file gives clearer information of combination of Pix# and Data#.

 

Regards,

Jiang


Reply