Skip to main content
Solved

Using target values from Merit function in ZPL Macro

  • January 28, 2022
  • 2 replies
  • 645 views

Forum|alt.badge.img

Is it possilbe to use target values from a merit function in a zpl macro.

For example, there are some defined constraints in the optical path length (OPTH) for e.g. 5 different ray deflections (different Hx or Hy) of an imaging system. Can I use these fixed values in the ZPL macro for further optimization?

Best answer by David.Nguyen

Hi Ralf,

 

I’m not sure what you mean when you say use. I’m assuming you want to change the target value of an operand within your ZPL macro. You can do this with the SETOPERAND keyword:

 

SETOPERAND row, col, value
 

You need to give it the operand row number, the col is 8 for the target value, and value is the new target. Here’s an example for you:

 

 

Let me know if that’s what you were looking for. Take care,


David

2 replies

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • Answer
  • January 31, 2022

Hi Ralf,

 

I’m not sure what you mean when you say use. I’m assuming you want to change the target value of an operand within your ZPL macro. You can do this with the SETOPERAND keyword:

 

SETOPERAND row, col, value
 

You need to give it the operand row number, the col is 8 for the target value, and value is the new target. Here’s an example for you:

 

 

Let me know if that’s what you were looking for. Take care,


David


Forum|alt.badge.img
  • Author
  • Monochrome
  • January 31, 2022

DearDavid,

thanks for your answer. That helps a lot.

Best regards

Ralf