Building the Server Logic

<< Click to Display Table of Contents >>

Manual > Surveillance system construction guide >

Building the Server Logic

overview

FA-Server provides a variety of server functions, making it easy to build various logic.

 

Server logic is built by combining FA-Server actions and events. For details on actions, please refer to "Basics of Actions" and "Action Reference". For details on events, please refer to "About Events".

 

This section explains how to build the following server logic:

 

content

overview

Perform calculations between tags at regular intervals (SC1)

 

Here we will introduce an example of building a process that periodically performs calculations between tags.

 

Run your own logic in the background (SC2)

 

We will introduce an example of implementing unique logic using FA-Server script Ver2, such as reading and writing tags, accessing a database, and retrieving historical data from Historical data server.

Build a gateway between PLC

 

This article explains how to use the Bridge Action to build a gateway for data transfer between PLC devices. This function is useful in situations where PLC devices cannot directly communicate with each other, such as in an environment where different PLC models from different manufacturers are mixed.

Embed tag values in text files such as HTML

 

Using the Tag report action, you can easily embed tag values in text files such as HTML files and XML files. Here is an example of applying this function to create a simple monitoring screen by embedding tag values in a HTML file.

Write tag value to text (Batch transfer)

 

Batch transfer (Tag → Text) allows you to export tag values to a text file in bulk.

Write tag values to the database (Batch transfer)

 

By using Batch transfer (Tag → DB), you can export tag values to a database in bulk.

Write text value to tag (Batch transfer)

 

Batch transfer (Text → Tags) allows you to export data from a text file to tags in bulk.

Write DB values to tags (Batch transfer)

 

By using Batch transfer (DB → Tag), you can write database data to tags in bulk.

Send an email

 

We will introduce some examples of how to use the Send mail function.

Copy the file to another folder

 

Using the File operation action, you can easily copy, move, delete, etc. the specified file. Here, we will show you how to copy a file to another folder.

Back up the specified folder (File backup)

 

File backup actions are a feature specialized for backing up files. It is possible to back up a specified folder, and it is also possible to synchronize the backup destination when a file in the source folder is deleted. Here we will introduce an example of setting up File backup.

Send and receive files with FTP

 

We will introduce how to send and receive files using FTP.

Execute SQL on the server side (Execute SQL (ODBC))

 

This article introduces a way to easily issue SQL statements using Execute SQL (ODBC) actions.

Dial-upMake a connection

 

Here's how to make a connection. Dial-up Actions make it easy to connect, disconnect, and more.

Run an external application

 

This section describes how to run external applications.

Take a screenshot

 

We will show you how to take screenshots of a PC running FA-Server.

Perform PLC with the PC

 

This article will show you how to use the Time sync action to synchronize the time between your PC and PLC.

Close the FA-Server application

 

This article will introduce a configuration example for terminating a FA-Server application using the shutdown action.

 

 

Hint

The construction of other major functions such as logging, trend graphs, and daily report aggregation is described in "Construction of Major Functions" of the Monitoring System Construction Guide.