String I/O Tags

Counted towards your tag license limit.

This is a legacy tag type. You are advised to use the I/O and Calculations Tag instead.
Use this legacy type only if you are certain that it contains unique features that are absolutely necessary to your work.

String I/O tags are used to read or write text values. They are designed to be simple to configure and straight-forward to use.

If you wish to use a String I/O tag for local storage of values, you must clear the I/O device field. Doing so will allow the String I/O tag to retain values without an attached driver.

Retained or Persisted values

Analog Control and Analog Output tags will both retain their last written value across application restarts. Use these tags when there is a need for a value to persist.

String I/O tags with output enabled, and with no driver ("No tag selected" rather than the default, "[*Driver] None found") will retain their last written value across application restarts.

The Digital Control and Digital Output tags do not have a similar feature, but an analog tag can be used in their place, writing a zero or a one. If the intent is to write a clear zero or one with an analog tag, both the scaled and unscaled range should be adjusted for a minimum value of zero and a maximum value of one, so that scaling does not adjust the values.

Reading Strings

If reading string data, note that not all PLCs will store characters in the same in order in registers. Further, registers may vary in size from one PLC type to another.

If the string read from your registers has characters that are not in the order you expected, use the BuffOrder() function in an expression to swap the order of the characters so that they do match what is expected. Do this by creating one I/O and Calculations tag to read the value, then create a second with an expression to read the value in the first and apply the BuffOrder function. The second I/O and Calculations tag will not count against your license because it does not use a read or write address.

Better practice is to program the PLC to send an integer code that can be mapped to a phrase in VTScada. The result can be used in a multilingual application and can reduce the amount of data transmitted.

Example: A BuffOrder call for a word-sized register with the character order swapped:

BuffOrder([<SourceTag>], 0, 1, 2, N) 

...where the value N should be the half the length of the buffer.

String I/O properties I/O tab

Use this tab to specify the device driver and the address where values are to be read or written.

If output strings are to have a minimum length, you can choose to add spaces, further specifying whether those spaces should be added at the beginning, the end, or equally to either side of the string.

I/O Device

Select the communication driver tag from which data will be read.

By default, the tag will look for a parent tag that is a device driver (*Driver). If none is found, the text "--Missing--" will be displayed. The tag button to the right of the field opens the tag browser, from which you can either select an existing communication driver tag or add a new one. The X button will clear the field. Right-clicking on a tag in the field will open a dialog with which you can add or remove a Snapshot Expression or open a selected driver's properties dialog.

Address

Provide the address within the I/O device to which this tag is to write data. This value must match the configuration of your PLC or RTU hardware. Refer to the Addressing topic for your particular device driver for guidance.

For some drivers (SNMP and the OPC Client) an address browser is provided to assist you.

Scan Interval

Provide the frequency, measured in seconds, at which the I/O device should be scanned for new data. Reduce system load by setting this as high as possible, as appropriate for the equipment being monitored.   If the I/O Device is a Polling driver, which provides its own scan interval, then this field will not accept data.

Manual Data

Sets a constant value that will be used instead of live data. Use when testing a new tag if you need to check behavior when a value is outside the normal operating range. Tags that have manual data are marked by a flashing exclamation mark within any linked widgets. Logged values are marked with an exclamation. Always reset this to blank after testing.

Enable Output

If selected, this input tag may also be used to write data to the specified address of the communication driver. A Security Privilege may be set in the Quality tab to restrict access to this feature.

Values that are to be written may be padded with blank spaces to achieve a minimum length

Pad With Spaces

Enabled only when output is enabled. Selecting this box is the first step in specifying a minimum number of characters to be sent in each write operation.

Minimum Length

Enabled only when Pad With Spaces has been selected. Use this to specify the minimum number of characters to be sent in each write operation.

Justify

Enabled only when Pad With Spaces has been selected. Extra spaces, added to meet the minimum string length, may be added at the beginning of the string (Right Justify), at the end of the string (Left Justify) or equally at either end of the string (Center).

String I/O properties: Merit tab

Privilege

Select a custom security privilege (Protect Pages and Output Tags) from this drop down to limit the operation of this control to only those operators who have been granted the matching security privilege.

Questionable Data

Use the Questionable Data parameter to flag this tag’s data in the event that you suspect the values it is reporting might not be accurate, or when this tag has initially been created and you wish to ensure that its data is marked for extra monitoring.

String I/O properties: Display tab

Use this tab to set tag's position in the I/O lists of a Site Details page, relative to other String I/O tabs.

String I/O properties: Historian tab

Historian

If an Historian tag is selected, this tag's run-time values will be saved for use in reports and the Historical Data Viewer. Historian configuration and advanced logging options are described in the discussion of the Historian Tags.

If your goal is to disable logging, set the Enable parameter (below) to 0 rather than deleting the Historian parameter.

There are consequences if you change the selected Historian tag after you have begun collecting data. If you switch to a new Historian (perhaps for organizational or load sharing purposes), the data collected for this tag by the previous Historian will become inaccessible. Historian selection and configuration should be done during the project design stage.

Enable Logging

If values should be logged only while certain conditions are true, you can tie the Enable Logging option to any tag or expression that will change from zero (logging disabled) to non-zero (usually 1; logging enabled).