Skip to main content
Solved

ZPL for tilt

  • September 9, 2020
  • 4 replies
  • 347 views

I am trying to tilt a surface by ZPL command 'SURP 10, 63, 5' to tilt the lens by 5 degree (10 is the surface number). But the lens is not tilted. Could anyone give me the clue why? Thanks!

Best answer by Hui Chen

Hi Zhiguang,


Thank you for your post!


I wonder after you run the ZPL command 'SURP 10, 63, 5', did you check under Surface Properties to see if the Tilt X angle is set to 5 degrees at all? If so, then the reason you don't see the 5 deg surface tilt in the Layout window is probably just due to lack of an Update All command to update the layout window. I tested this using the following macro and it worked for me as expected. 



Could you please give this a try?


Best regards,


Hui

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

Hui Chen
Zemax Staff
Forum|alt.badge.img+1
  • Zemax Staff
  • 144 replies
  • September 9, 2020

Hi Zhiguang,


Thank you for your post!


I wonder after you run the ZPL command 'SURP 10, 63, 5', did you check under Surface Properties to see if the Tilt X angle is set to 5 degrees at all? If so, then the reason you don't see the 5 deg surface tilt in the Layout window is probably just due to lack of an Update All command to update the layout window. I tested this using the following macro and it worked for me as expected. 



Could you please give this a try?


Best regards,


Hui


joshdfreeman
Ultraviolet
Forum|alt.badge.img
  • Ultraviolet
  • 34 replies
  • November 1, 2021

Hi there, 

I’m trying to do the same thing, and cannot seem to get either surface in (source or detector) to tilt or decenter about any axis. I’ve used the UPDATE ALL, with no effect! I’m sure it’s something simple..  screen shot attached.

Thanks,

Josh

 

 


David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1083 replies
  • November 1, 2021

Hi Josh,

 

SURP stands for Surface properties. In Non-Sequential mode, OpticStudio uses Objects instead and corresponding ZPL keywords are SETNSCPROPERTY and SETNSCPOSITION (see Help File for more details).

If you want to change the Tilt About X of Object 1 to 50 degress, you would type:

SETNSCPOSITION 1, 1, 4, 50

The first number one is a surface identifier in case you are using the mixed-mode (sequential/non-sequential). Leave it to one for pure non-sequential systems.

Let me know if that helps, and take care,

 

David

 


joshdfreeman
Ultraviolet
Forum|alt.badge.img
  • Ultraviolet
  • 34 replies
  • November 2, 2021

Thanks so much David.. knew it had to be something simple and the thought crossed my mind that it could be something about sequential vs. non-sequential, and didn’t know where to look. Thanks again :)


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