<< Click to Display Table of Contents >> Manual > Monitoring system construction guide > Server logic construction > Make a connection |
overview
Here we will explain a sample that shows how to make a Dial-up connection to the Internet.
In this sample, Tag event is used as a trigger to connect/disconnect Dial-up.
Action used: Dial-up 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 make sure that Dial-up is connected.
Then write TRUE to U01.F01.T02 and verify that communication is disconnected.
Setup Procedure
Tag configuration
1.Set tags.
Tag Name |
address |
the purpose |
---|---|---|
U01.F01.T01 |
X0000 |
The tag that triggers the execution of the Dial-up connection. |
U01.F01.T02 |
X0001 |
Dial-up The tag that triggers the cutting |
Action Settings
1.Dial-upRegister connection action "A01".
2.Configure the action properties.
Open the Dial-up tab and enter the information for connecting to Dial-up.
Event Settings
1.Create a Tag event to perform the action.
Since it is necessary to pass parameters to the action when connecting and disconnecting Dial-up, prepare two Tag event.
In this example, we create Tag event for "E01" and "E02".
2.Configure E01 as the Dial-up connection.
E01 sets an action to be executed when U01.F01.T01 becomes TRUE.
Set the execution action of
E01 to "A01" and specify "DIAL" as the parameter.
3.Set E02 as Dial-up disconnect.
E02 sets the action to be performed if U01.F01.T02 becomes TRUE.
Set the execution action of
E02 to "A01" and specify "HANGUP" as the parameter.
Examples of applications of this sample
For example, if you are in a network environment where you are not always connected to the Internet and you want to send a file using the FTP transfer action, or if you want to send an email using the Send mail action, you can use these actions in combination to achieve a communication connection.
The process is as follows: Dial-up connect, then Send mail, and then disconnect after sending. In such a case, you can handle it by setting it as follows.
1)Create "A01" as an action.
2)Create "A02" as an Send mail action.
3)Create "E01" as Tag event, which will be the trigger for sending an email.
4)Register "A01" (DIAL), "A02", and "A01" (HANGUP) in the execution actions of the E01 event in that order.
(Event setting example)