Scan QR and check out the website on your phone or tablet
Macro, as a powerful and flexible feature, complements built-in features with its capability of tackling complex logic operation and data processing. The task of writing macros itself, while seemingly daunting at first, is in fact not particularly difficult because macro has fixed syntax rules that can be checked by the compiler, and there are manuals detailing macro usages. However, like most coding tasks, macro debugging, necessary when one encounters unexpected results, is probably the more time-consuming aspect of macro coding, as it cannot be accomplished by simple inspection of codes or execution results alone.
In cMT Diagnoser, a Macro Debug Tool has been implemented to help users quickly identify errors in the macros in order to reduce development time.
The Macro Debug Tool is easy-to-use. Simply edit macros, compile macros, and then run the simulation; the Macro Debug Tool will start in the cMT Diagnoser.
In the Debug tab, users first place breakpoints in the codes and set variables to watch. When debugging, macro execution stops at the breakpoint so that users can review the variables and execution results at that point. In addition, line-by-line execution is also possible, allowing users to follow the codes to check whether the program branches and functions are being correctly executed. These help users evaluate macro behavior in order to catch bugs and resolve issues more quickly, which should ultimately increase work efficiency.
Macro Debug Tool can also work on an HMI. Connect to the HMI in cMT Diagnoser and then import its macro codes; then, macro debugging can begin.
With old debugging methods, users can only guess the reason for program error from simulation results and revise program codes by trial and error. With each revision, testing requires re-compiling or re-download to HMI, which is time-consuming and has no guarantee that the problem will have been solved. In contrast, Macro Debug Tool can simplify macro design process, saving users precious time in HMI program development.
Applicable models: cMT Series
Applicable software version: EasyBuilder Pro V6.04.01 or later