Memory Devices

<< Click to Display Table of Contents >>

Manual > Device Connection Guide > Memory > Connection Procedure (Virtual Communication) >

Memory Devices

About memory devices

Memory devices are our own proprietary devices that use the memory address space of the Server application. Unlike virtual devices, they are not devices that simulate the address space of PLC, but allow you to freely register and use various tags one by one according to your purpose. In addition to tags that handle common data types such as bit tags, numeric tags, and character tags, memory devices also provide tags with very useful and powerful functions, such as tags that turn ON/OFF depending on the PC time (time bit tags), tags that turn ON if no value is written for a certain period of time (survival confirmation tags), and tags that automatically turn OFF after a certain period of time when a value is written (pulse bit tags).

 

Since the actual memory device tag exists on the server side, data can be shared between clients via this device even in a system configuration with multiple PCs. The memory device can store values on the PC's hard disk. For example, the settings such as upper and lower limit alarm thresholds and system operating parameters can be stored on the PC, and the values can be maintained even if the PC is restarted. In addition, the storage of values by this device is also compatible with server duplication, so even if the main server goes down, the tag values stored in this device are automatically handed over to the standby server.

 

 

Device List

The supported devices are as follows:

 

device

explanation

Bit Tag

It can handle Boolean (bit) values.

Numeric Tags

It can handle numbers (double precision floating point numbers).

Character tags

It can handle strings.

Time Text Tag

The current time is used as the tag value (string). You can freely define the date and time format.

Example) %Y/%m/%d %H:%M:%S → 2003/01/01 00:00:00

Example) %Y%m%d → 20030101

 

The current time is used as the tag value (string). You can freely define the date and time format.

Example) %Y/%m/%d %H:%M:%S → 2003/01/01 00:00:00

Example) %Y%m%d → 20030101

c_plc_0732

 

Time Bit Tag

This bit turns ON/OFF depending on time conditions.

Example: With the following settings, the device will be ON from 9:00:00 to 16:59:59 every day from Monday to Friday.

c_plc_0733

Delay Bit Tag

This bit actually turns ON after the wait time (specified in ms) has elapsed since writing ON. If OFF is written during the wait time, it will not turn ON.

c_plc_0734

Pulse Bit Tag

ON This bit automatically turns OFF after the pulse ON time (specified in ms) has elapsed since writing.

c_plc_0735

 

If you uncheck "Turn the pulse OFF when OFF is written," the pulse will not be turned OFF when OFF is written, and will only be turned OFF when the pulse time has elapsed.

 

Survival confirmation tag

This bit turns ON if the value does not change for a certain period of time.

 

For example, if another client periodically writes a value incremented from 0 to 999 (counting up each time and resetting it to 0 when it reaches 999) to this tag, this tag will remain ON until writing stops. If the client stops or communication stops, writing will no longer be performed, so this tag will turn OFF and it can be determined that the survival check has failed.

c_plc_0736

Write Request Counter

The count increases each time a value is written to the specified target tag.

For details, see "About the Write request counter."

 

 

hint

Each device is set via parameters. Pressing the button next to the parameter setting will display the setting dialog.

 

c_plc_0738

 

 

 

How to retain values

The values of bit tags, numeric tags, and character tags can be automatically saved to the hard disk and retained. The values are retained even if the application or OS is restarted.

 

To set this, open the setting dialog in "Communication Settings" in the unit properties. Create a folder to save values and specify the path. Tags that save values to disk are called disk tags. In contrast, tags that do not store values on disk are called memory tags. All tags in the unit with this setting will become disk tags.

 

c_plc_0739

 

You can choose from the following two save formats.

 

1.Format 1 (old version format)
A file will be created for each tag. If you are using a large number of tags, select format 2.

 

2.Format 2
A file is created for each unit. This is faster than format 1, especially when using a large number of tags. The following two files are created:
 

unit_name.idx - index file
unitname.val - file where the value is stored

 

 

attention

Disk tags write values to the hard disk every time the value changes, so if the value changes frequently, we do not recommend using them due to the impact of the writing load on the disk.

In such cases, consider using a bridge action in conjunction with a memory tag that does not normally hold a value, and when necessary, use Tag event, Periodic event, etc. to pass values from the memory tag to the disk tag via a bridge action.

 

attention

Do not use the value save folder for any other purpose. If you are using a redundant configuration, do not share the folder with other units.

 

hint

If you want to use both memory tags and disk tags, add two memory device units and set the disk tag on only one side.

 

 

About storage backup

 

To back up the storage for retaining disk tag values, check the box below. The backup will be created when FA-Server is brought online, and you can back up a cross section of the retained values for the specified number of days.

 

c_tag_0159

 

 

About the Write request counter

The Write request counter is a tag that counts up every time a write is made to a specified target tag. This allows you to get the number of times a write has occurred to a tag, and the timing at which a write occurred to a tag.

 

To specify a tag, specify the "_CNT" keyword in the tag name for which you want to detect changes.
 

How to specify

example

[Tag name]_CNT

T01_CNT

 

1.Add a memory device and add a numeric tag
c_plc_0740
 

2.Add another tag
c_plc_0741
 

3.The second tag name you added is "T01_CNT" and change it to "write Request Counter"
c_plc_0742 c_plc_0743
 

4.Go online
c_plc_0580
 

5.Start monitoring
c_plc_0744
 

6.When a value is written to "T01", the value of "T01_CNT" counts up in tandem.
c_plc_0745

 

 

attention

write request counters can only specify tags in the same folder, so they cannot be specified across drivers or folders.

 

attention

The Write request counter is a ring counter with an upper limit of 9999. When the limit is reached, it starts again from 0.

 

hint

If you rewrite the value of a regular tag, you can get the change in value via an event.

However, if the same value is rewritten back to the same value, it will be determined that there is no value change, and the value change cannot be obtained by the event.

For example, you can capture the change from 0 to 10, but you cannot capture the change from 10 to 10.

In such a case, if you use the write request counter, it will count up even when a value is written from 10 to 10, making it possible to obtain the timing at which the value was written.