User`s manual

2.0 - PMAC Executive program, PEWIN
Page - 15
2.4 - The WATCH and POSITION windows
The position window is accessed through the “Position” command of the View pull-down menu, ALT+V and P from the
terminal window. It is a very convenient way to continuously check PMAC parameters 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 very similar function. Instead of the motion-related parameters
allows to constantly display any variable value in PMAC. Right-clicking on this window allows selecting the display format
from hexadecimal, decimal and binary reporting values.
2.5 - Uploading and Downloading files
These functions are accessible through the “File” pull-down menu. The uploading function is of great importance. Through
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 and so on. This allows not only to check what commands or values PMAC has actually in
memory but also will indent IF conditions and WHILE loops, making the program flow better readable. The File pull-down
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.
2.6 - Using MACRO names and Include Files
PEWIN allows using names meaningful for the user in replacement of the common names for variables and functions that
PMAC expects (P, Q, M, I):
Example:
Make sure the “Support MACRO’s/PLCCs” option is checked before downloading. The MACRO must be defined before it
could 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, could be placed in a separate file and be included with a single line in the text
file. The file name must be complete of a full path in order for PEWIN to find it.
Example: #include "c:\deltatau\files\any.pmc"
2.7 - Downloading compiled PLCCs
PLCCs are compiled by PEWIN in the downloading process. Only the compiled code gets downloaded to PMAC.
Therefore, it is suggested to save the ASCII source code in the host computer separately since it cannot be retrieved from
PMAC. Compiled PLCs are firmware dependent and so they must be recompiled when the firmware is changed in PMAC.
If more than one PLCC is programmed, all the PLCCs code must belong to the same ASCII text file. PEWIN will compile
all the PLCC code present on the file and place it in the appropriate buffer in PMAC. If a single PLCC code is downloaded,
all the rest PLCCs that might have been present in memory will be erased, remaining only the last compiled code.
The multiple-file download feature of the PEWIN File menu allows having the PLCC codes in different files. They will be
combined by PEWIN in the downloading process.
File downloaded
#define PUMP P1
OPEN PLC1 CLEAR
PUMP=1
DISABLE PLC1
CLOSE
Uploaded translated PMAC code
OPEN PLC 1 CLEAR
P1=1
DISPLC1
CLOSE