Writing Values

This article applies to versions 4.5.3 and later of P2 Explorer.

If a datasource has been configured to allow writing to the database, right-clicking a component using that data allows you to update the tag’s value at a point in time.

For example, right-clicking on a Data Label displays a Write Value option, which allows you to update the value of the data label at a point in time in the database, and the data type if needed.

Right-clicking on a label shows a menu containing various options.

When you select Write Value from the right-click menu, a box appears where you can enter the new value.

The fields are as follows:

Tag The name of the tag in the database. This cannot be changed.
Data Type The data type of the tag in the database. If the data type is known, you will have the option of changing it to Null, if required. This is useful in circumstances where a datum is not present at a point in time, and it is important to indicate so.
If the data type is detected to be Decimal, the options will be Decimal, Integer, and Null.
If the data type of the value is not known, it will show all data types in the drop-down list.
Value Type the new value of the tag here. The entry box may change depending on the data type. For example, Boolean values will show a check box, and DateTime values will allow you to use a date or time picker. 
Timestamp This is the point in time for which you want to assign the new data value. Click the calendar icon to set a date and click the clock icon to set a time.  You also have the option of using the current date and time, by clicking Use Now.

Note: For some tags, it’s possible to write values with a timestamp that is in the future. However Explorer cannot know in advance if the datasource will allow this. Therefore, if you select a timestamp that’s in the future, a warning is shown. You can still click OK, and if the datasource accepts the value a success message will appear, otherwise an error message will be shown.

When you have finished entering your value, click OK.


Release History

  • Write Value 4.5.3 (this release)
    • Changed the behaviour of the drop-down list when the data type of the value is not known.
  • Write Value 4.5.2
    • Added ability to set the data type
  • Write Value 4.4.6
    • Initial release

 

 

Comments are closed