Using a macro to write values – Echelon OpenLNS Commissioning Tool User Manual

Page 207

Advertising
background image

OpenLNS CT User’s Guide

191

Example

The following example demonstrates a function that writes an “ON” value to a SNVT_swtich
data point:

RUNADDONWARGS("LMW Set Value","/SelOverride/ShapeOverride=DataPoint.50
/Value= 100.0 1")

Data Point Field Formula Syntax

RUNADDONWARGS("LMW Set Field Value","/SelOverride/ShapeOverride=<Data
Point SmartShape ID
> /Value= <n>")

Example

The following example demonstrates a function that writes to the state field of a
SNVT_swtich data point:

=RUNADDONWARGS("LMW Set Field
Value","/SelOverride/ShapeOverride=DataPoint.50 /Value= 0")

5. Click the accept button (

) in the Formulas box.

6. To have some logic performed on the data point value instead of specifying a value, replace n with

&Scratch.X. The function is as follows: RUNADDONWARGS("LMW Set [Field] Value",
"/SelOverride /ShapeOverride=<
Data Point SmartShape ID> /Value=" &Scratch.X). You can
use this type of formula to incrementally change the value of a data point when you double-click
the Visio shape.

In the X cell of the Scratch section, enter a formula. For example, to create a formula that
brightens a lamp when you double-click the Visio shape, enter the following:
=FORMAT(MODULUS("<Data Point SmartShape ID>!User.MonValue"+10,110), "0").

Using a Macro to Write Values

To write to a value to a Data Point SmartShape using a Macro, follow these steps:

1. Click the Developer tab, and then click Macros. The Macros dialog box opens.

Advertising