<< Click to Display Table of Contents >> Manual > Monitoring system construction guide > Server logic construction > Run an external application |
overview
This section explains a sample that executes an external application. It can be used when you want to execute a self-made EXE etc. in response to a trigger from a PLC.
In this sample, we call "Notepad," which comes standard with WindowsOS, and open a text file.
Action used: External application execution action
Download the sample
The creation examples shown on this page are provided with samples.
The sample can be downloaded from below.
Operation check
Load the sample server configuration file from FA-Server and bring the application online (yellow arrow).
After going online, write TRUE to U01.F01.T01 and verify that "file.txt" starts.
Setup Procedure
Tag configuration
1.Set tags.
Tag Name |
address |
the purpose |
---|---|---|
U01.F01.T01 |
X0000 |
A tag that triggers an action |
Action Settings
1.External application executionRegister action "A01".
2.On the External Application Launch tab, specify the application to be launched and options.
•Execution type: Launch an executable file
•File path: C:\Windows\System32\notepad.exe
•Option: file.txt
"C:\Windows\System32\notepad.exe" is the full path to Notepad.
If the actual storage location of the exe file is different, please change it according to your environment.
If you want to run a batch file (.bat), set it as follows.
•Execution type: "Open file (launch according to file extension)" •File path: Specify the path of the batch file. •Display type: Do not display the screen
|
Event Settings
1.Create a Tag event to perform the action.
In this example, we will set the event to occur when U01.F01.T01 becomes TRUE.
Set the execution action to "A01".