Run an external application

<< 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.

 

c_action_0213

 

 

Setup Procedure

Tag configuration

 

1.Set tags.
 
c_action_0209

 

Tag Name

address

the purpose

U01.F01.T01

X0000

A tag that triggers an action

 

 


Action Settings

 

1.External application executionRegister action "A01".
 
c_action_0210
 

2.On the External Application Launch tab, specify the application to be launched and options.
 
c_action_0211

 

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.
 

 

hint

If you want to run a batch file (.bat), set it as follows.

 

c_action_0335

 

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
Do not display the screen to prevent the screen from being displayed for a moment when the batch file is started.

 

 

 


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.

 
c_action_0132

 
Set the execution action to "A01".
 
c_action_0365