GALEP can be completely controlled from the command line, allowing to implement GALEP commands in your own production software. For this, a powerful set of batch commands is available. A GALEP command line has the following format:
galep5 [filename.gpf2] [filename.log] [/Action] [/Option]...
The command line is not case sensitive, e.g. /VerboseLevel2 is identical to /verboselevel2.
A .gpf2 (Galep-Project-File2) file contains a 'snapshot' of data, device and device configuration. The file can be saved by selecting the GPF2 file type inside the Save As file dialog box. When giving a a GPF2 file name as command line option, GALEP is set up to the saved stated.
A .log file name in the command line causes the program messages to be written into this file. The /console command line option (see below) forces the program to also open a console window for displaying program messages.
No relativ paths are allowed for .log and .gpf2 files. The location for files without path is the application directory.
The .gpf2 file format must match the Galep software version. When updating to a new software version, either create the .gpf2 files anew, or keep the installation of the old GALEP software version together with your batch job and .gpf2 files in an extra folder.
The following Actions are available in a command line:
/prog - Program action
/read - Read action
/blank - Blank action
/verify - Verify action
/erase - Erase action
The following Options are available:
/console - The program messages will appear in a console window. Use this option to test your batch file.
/showwindow - The main windows will be shown on the screen. Use this option to test your batch file.
/noexit - The program will not terminate after the batch run. This option works only together with /showwindow.
There are up to three possible windows in a batch run: the command line window, the console window and the data window. To terminate the batch run, close the data window, NOT the console window!
/verboselevel1 - Without this option, the program issues only the batch messages (see below). Verboselevel1 issues all messages usually shown inside the action tab window.
/verboselevel2 - This level will issue all program messages.
The format of all batch messages is:
The following messages could be issued by the program during batch mode without a /verboselevel option:
Standard batch mode state messages:
Batch mode error messages:
Batch not possible with HandlerMode
The application returns the following values:
0 -> No Batch job executed
1 -> Success
2 -> Error
Step 1: Start the GALEP5.exe without any command line option. Load your data file und select your device, set your desired device options appropriatly. For time saving at startup make sure that you have only one data window open!
Choose the File/Save As command and save your Galep project file with gpf2 extension to disk.
Step 2: Test your config file with the commandline, like this: galep5 /prog yourproject.gpf2 /console /showwindow /noexit /verboselevel2 yourproject.log
Step 3: If you are sure that your batch command works, remove all unnecessary options and save the command line in a .bat batch file: galep5 /prog yourproject.gpf2
Step 4: Have a look at the the batch samples below for more complex tasks.
Sample 1: Erase and program a device
@echo off echo Sample 1: erase and program if exist yourproject.gpf2 goto galep5 echo missing yourproject.gpf2 goto nobatch :galep5 start "" /wait GALEP5 yourproject.gpf2 /erase /console if errorlevel 2 goto error2 if errorlevel 1 goto success1 goto nobatch :error2 echo Action not successfull! goto end :success1 start "" /wait GALEP5 yourproject.gpf2 /prog /console if errorlevel 2 goto error2 if errorlevel 1 goto success2 goto nobatch :success2 echo Action successfull! goto end :nobatch echo no batch job :end
Sample 2: Blank, erase and program
@echo off echo Sample 2: blank,erase and program if exist yourproject.gpf2 goto galep5 echo missing yourproject.gpf2 goto nobatch :galep32 start "" /wait GALEP5 yourproject.gpf2 /blank cfg /console if errorlevel 2 goto error_blank if errorlevel 1 goto success_blank goto nobatch :error_blank start "" /wait GALEP5 yourproject.gpf2 /erase /console if errorlevel 2 goto error_erase if errorlevel 1 goto success_erase goto nobatch :error_erase :error_prog echo Action not successfull! goto end :success_blank :success_erase start "" /wait GALEP5 yourproject.gpf2 /prog /console if errorlevel 2 goto error_prog if errorlevel 1 goto success_prog goto nobatch :success_prog echo Action successfull! goto end :nobatch echo no batch job :end