PMAC Quick Reference Guide Saving and Retrieving PMAC Parameters It is important to save the complete set of PMAC parameters in the host computer periodically. In case of a failure or replacement, a single file created this way will allow restoring all the variables and programs necessary for the particular application. To activate this function click on the terminal window, press CTRL+B for the Backup menu, select Save Configuration and Global Configuration . Select a name to be saved as. Usually, the date is included as part of the file name for later identification. For example, PMAC0112 has four digits for the application identifier and four digits for the date.
After the file is saved, verify it with the feature part of the same pull-down menu. This will make sure PMAC’s memory matches the recently saved file and therefore that it is a valid restoring file. To restore a configuration simply select Restore from the same Backup menu. Verify PMAC’s memory after the restore function as well. The Watch and Position Windows The position window is accessed through the POSITION command of the View menu, or ALT+V and P from the terminal window. It is a convenient way to check PMAC parameters continuously, such as position velocity and following error. Right clicking on this window allows the items selections as well as its format and update period.
The Watch window of the same View menu performs a similar function. Instead of the motion-related parameters, any variable value in PMAC can be displayed constantly. Right clicking on this window allows selecting the display format from hexadecimal, decimal and binary reporting values. Uploading and Downloading Files These functions are accessible through the File menu. The uploading function is of great importance. With these functions, it is possible to open a text editor with the contents of the requested PLC, Motion Program, M-Variables definitions or values, I-Variables values, etc.
With this function, what commands or values PMAC has in memory can be checked and IF conditions and WHILE loops are indented, making the program flow better. The File menu also activates a more interactive and complete editor utility, providing a way (also by the communication functions) to compile PLCs and download files including MACRO names. Using MACRO Names and Include Files PEWIN allows using custom names in place of the common names for variables and functions that PMAC expects (P, Q, M, I): Example:
File downloaded Uploaded translated PMAC code #define PUMP P1 OPEN PLC 1 CLEAR P1=1 DISPLC1 CLOSE OPEN PLC1 CLEAR PUMP=1 DISABLE PLC1 CLOSE Make sure the Support MACROs/PLCCs option is checked before downloading. The MACRO must be defined before it can be used. In general, MACRO definitions are at the beginning of the text file. MACROs must be up to 255 valid ASCII characters and cannot have spaces in between (the underscore “_” is suggested in place of a space). The MACRO definitions or any PMAC code can be placed in a separate file and be included with a single line in the text file. The file name must include a full path in order for PEWIN to find it. Example:
#include "c:\deltatau\files\any.pmc" PMAC Executive Program, PEWIN 15