Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About assign a MI variable?
Dear All, is there any way to assign a variable to MI variable? Something like:
open plc 1 clear
open prog 1 clear
When i down the plc and prog to pmac, an error says that "ms0,mi925=p1000+100 -------Data error or unrecognized command" away occured.
Can anyone help me?
PS:Turbo PMAC2 Ultralite, one MACRO station.
The MACROSLAVE{node#},{slave variable}={constant} command is an online command and if you want to use it in a PLC or motion program, you need to use the CMD"" command, in which case the value is hardcoded in the quotation marks and not useful in your case.

However, you can use the MACROSLVWRITE{node #},{slave variable},{PMAC variable} or its short form MSW{node #},{slave variable},{PMAC variable} both in online and in PLC/motion programs directly. Please keep in mind the {PMAC variable} section should be a single variable and not an expression. If calculation is required, the expression should be evaluated in the previous lines of the buffered program (PLC/motion program) and result assigned to a PMAC variable and then sent to the MACRO slave node using MSW command.

Sina Sattari
Hardware Engineering Manager
Delta Tau Data Systems, Inc.
Thank you very much.
The programs works very well.
Best regards.

Forum Jump:

Users browsing this thread: 1 Guest(s)