<< Click to Display Table of Contents >> Manual > Monitoring system construction guide > Server logic construction > Write text value to tag (Batch transfer) |
overview
This section explains the process of writing the contents of data stored in a file to tags all at once.
By using this function, for example, recipe information stored in a file can be written to a PLC in bulk via tags.
Action used: Batch transfer(Text → Tag) 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 confirm that the value set in batch.txt is written to the tag. To check the written value, start monitoring with a tag operation or use the tag monitor.
Setup Procedure
Tag configuration
1.Set tags.
Tag Name |
address |
the purpose |
---|---|---|
U01.F01.T01 |
X0000 |
A tag that triggers an action |
U01.F01.D0000~D0009 |
D0000 to D0009 |
Tags to be written in bulk |
Action Settings
1.Register the Batch transfer(tag → text) action "A01".
2.Open the action properties and set what information to output on the Batch transfer tab.
The settings are as follows:
Filename: batch.txt
Value Separator: Character specification ","
3.Add a field to A01.
This action allows you to easily register tags by simply dragging and dropping them.
The field has been registered.
4.Editing batch.txt
Open batch.txt in Notepad or similar and write the values you want to write in bulk to PLC.
In the current field definition, 10 fields corresponding to tags U01.F01.D0000 to D0009 are registered. Therefore, specify the 10 values you want to write to the tags of each field, separated by commas.
As an example, we will set the numbers from 1 to 10.
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".