Hardware manual

Execute Command Impact Reference Guide
Datalogic Automation Inc. 4-106
When the "Update File" method is called
When the five minutes have elapsed since the entries were last written
When the control panel application closes
When CPM goes into Design mode
When the "Log File Path" property changes while in run mode
When the "Log File Name" property changes while in run mode
When entries are successfully written or appended to an existing file a "File Update Completed" event
occurs. If the write is unsuccessful, a "File Update Failed" event occurs.
Execute Command
The Execute Command control is used to execute a system command from the Control Panel. You could, for
example, use it to run another application. This control is not displayed on the Control Panel Canvas.
Batch File
To execute a batch file, use the following command line in the Command property (where "test.bat" is the
name of the batch file to run).
cmd.exe /c test.bat
When the control runs, the batch file will run to completion, then exit.
If you want to display a Command Prompt window so the user can enter input from the keyboard, use the
following command line in the Command property (where "test.bat" is the name of the batch file to run).
cmd.exe /c start cmd.exe /c test.bat
When the control runs, a Command Prompt window is displayed on top of CPM so the user can enter input
from the keyboard. When the batch file completes, the user must close the Command Prompt window.
Property Name What it is
Command The program to be executed. If you want to run a batch file, see “Batch
File” below.
Starting Path Specifies the path to the folder that contains the file to run. If the path con-
tains spaces, it must be enclosed in double quotes. System programs
(like Notepad and MSPaint) do not require a starting path.
Method Name What it does
Execute Com-
mand
Executes the command.
Event Name When it happens
Command Exe-
cuted
When command execution has begun.