Skip to main content
Solved

Writing comments to MCE from ZPL?


Mike.Jones
En-Lightened
Forum|alt.badge.img+3

I have 81 total configurations for a lens.  Using ZPL, I want to be able to write specific comments into the LTTL and MOFF lines that help me keep track of everything.  How to do that?

Thanks,

Mike

Best answer by David.Nguyen

Hi Mike,

I don't exactly know what you intend to do, but perhaps this macro snippet can help you:

# Index of operand position in the MCE
operand_position = 1
# Configuration number in which the comment is written
configuration = 1
# Insert new MC operand
INSERTMCO operand_position
# Set new operand to MOFF
SETMCOPERAND operand_position, 0, 'MOFF', 0
# Change value of new operand at Config 1 with 'My comment'
SETMCOPERAND operand_position, configuration, 'My comment', 0 

The comments in my code should be self-explanatory. However, should you still have questions, feel free to ask them. The main keyword for this task is SETMCOPERAND, you can find its definition in the Help File under: The Programming Tab > About the ZPL > KEYWORDS (about the zpl) > SETMCOPERAND .

I hope this helps.

Take care,

David

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

2 replies

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1089 replies
  • Answer
  • April 22, 2021

Hi Mike,

I don't exactly know what you intend to do, but perhaps this macro snippet can help you:

# Index of operand position in the MCE
operand_position = 1
# Configuration number in which the comment is written
configuration = 1
# Insert new MC operand
INSERTMCO operand_position
# Set new operand to MOFF
SETMCOPERAND operand_position, 0, 'MOFF', 0
# Change value of new operand at Config 1 with 'My comment'
SETMCOPERAND operand_position, configuration, 'My comment', 0 

The comments in my code should be self-explanatory. However, should you still have questions, feel free to ask them. The main keyword for this task is SETMCOPERAND, you can find its definition in the Help File under: The Programming Tab > About the ZPL > KEYWORDS (about the zpl) > SETMCOPERAND .

I hope this helps.

Take care,

David


Mike.Jones
En-Lightened
Forum|alt.badge.img+3
  • Author
  • En-Lightened
  • 113 replies
  • April 27, 2021

Thanks David, I'll give it a try.

Mike


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