The program Editor allows the user to create (New), Open, edit, Save, Upload, Download, and Execute .dmc programs as well as Find/Replace within them.
The GalilTools multi-file Editor and Find/Replace utility |
Hint: Galil programs are saved in text files with the extension ".dmc". Refer to your controller's command reference for valid commands and user manual for sample programs. Also see Galil's sample dmc code libary for ready-to-use, downloadable code.
The File, Edit, and Window menus and toolbar have Editor-related functions which operate on the currently-selected Editor window.
Any .dmc file opened by double clicking from the desktop or file explorer will open into an Editor window in GalilTools and the connection will be determined by the project state. (click Connect to change connection). If .dmc files are not associated with GalilTools, right click on the .dmc file from the file explorer, choose "Open with...", and choose the GalilTools executable.
The Editor displays line numbers in the left column and the font size can be temporarily changed by holding down the Ctrl key and scrolling the mouse wheel and permanently changed by choosing Edit | Font....
If a line is over 80 characters, the overflow will be colored red and this designates lines that are too long to download to a controller without compression (40 characters for the RIO-471x0). The Editor syntax-highlights different text corresponding to its purpose according to the rules below:
Magenta | Text (e.g. MG) |
Blue | Galil Commands |
Black | Variables, Arrays, Numbers, Axes, and Operators (+, -, ...) |
Red | Program Labels |
Grey | Commented Text (' or NO) |
Light Grey | REM Text (not downloaded to controller) |
Green | Operands (e.g. _TPA, TIME) |
For very long programs which are larger than the controller's program space (e.g. 80 characters by 2000 lines on DMC-40x0), Download and Execute will attempt to compress the program before downloading. This is done by removing white space and concatenating multiple commands onto each line of code. A warning in the terminal and in a dialog will display if compression was necessary. If the user is actively debugging code, listing code (LS) or uploading compressed code to the editor allows the user to see the code as it appears on the controller. Note, compression does not modify the original source file.
A dialog or terminal message will display if file compression was necessary to fit the program on the controller |
Compression can be disabled for a particular DMC file by including REM DISABLE COMPRESSION in line zero of the DMC code. If compression is disabled, but required to fit the code on the controller, an error will be thrown and the download will fail.
Disabling the compression option in DMC code. |
If comments must be preserved, even in instances of compression, use "NO" instead of " ' " as the comment indicator.