Skip to main content
Solved

Use SSAG operand in ZPL Marco

  • November 9, 2021
  • 2 replies
  • 312 views

Hi all,

I’m trying to use ssag operand to obtain the surface sag in sequential mode. I’m ok with using it in the merit function editor, however, as I have a lot of sampling points, manually inserting ssag function is a real pain. Is there any method to use SSAG in the ZPL Marco where I can write my own loop?

 

Best wishes

Daoming

Best answer by David.Nguyen

Hi Daoming,


Try this, and let me know if this works for you:

# Operand settings (SSAG)

type = 11

surf = 2

mode = 3

x_set = 4

y_set = 5

of_ax = 6

remove = 7

target = 8

weight = 9



# Loop over 10 iterations

FOR ii, 1, 9, 1

    # Select rows in which to insert the MF operand

    row = 1

    

    # Insert new MF operand

    INSERTMFO row

    

    # Change operand settings

    SETOPERAND row, type, "SSAG"

    SETOPERAND row, surf, 2

    SETOPERAND row, mode, 0

    SETOPERAND row, x_set, 0.1

    SETOPERAND row, y_set, 0.3

    SETOPERAND row, of_ax, 1

    SETOPERAND row, remove, 1

    SETOPERAND row, target, 12

    SETOPERAND row, weight, 0.5

NEXT

Take care,

 

David

2 replies

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1159 replies
  • Answer
  • November 10, 2021

Hi Daoming,


Try this, and let me know if this works for you:

# Operand settings (SSAG)

type = 11

surf = 2

mode = 3

x_set = 4

y_set = 5

of_ax = 6

remove = 7

target = 8

weight = 9



# Loop over 10 iterations

FOR ii, 1, 9, 1

    # Select rows in which to insert the MF operand

    row = 1

    

    # Insert new MF operand

    INSERTMFO row

    

    # Change operand settings

    SETOPERAND row, type, "SSAG"

    SETOPERAND row, surf, 2

    SETOPERAND row, mode, 0

    SETOPERAND row, x_set, 0.1

    SETOPERAND row, y_set, 0.3

    SETOPERAND row, of_ax, 1

    SETOPERAND row, remove, 1

    SETOPERAND row, target, 12

    SETOPERAND row, weight, 0.5

NEXT

Take care,

 

David


  • Author
  • Infrared
  • 6 replies
  • November 14, 2021

Hi David,

 

I’m sorry for the late reply. It works!!

 

Thank you!

Best wishes

Daoming