beautypg.com

Writing to a data point shape value, Using an add-on – Echelon LonMaker User Manual

Page 205

background image

LonMaker User’s Guide

189

Writing to a Data Point Shape Value

You can use a Visio shape to write a value to a Data Point shape. You can write to a Data Point shape
using an Add-On or a Macro.

Using the lighting HMI example, when you double-click one of the Visio shapes, the following occurs:

1. The switch value and/or state is updated in the Data Point shape that controls the D1 input network

variable on the Digital Encoder functional block.

2. The

Digital_Out output network variable on the Digital Encoder functional block passes the

updated switch value and/or state to the Digital input network variable on the digital output
functional block.

3. The lamp turns on or off, or it is brightened or dimmed.

Using an Add-On

To use an Add-On to have a Visio shape write a value to a Data Point shape, follow these steps:

1. Click the Visio shape that will write a value to an input network variable.

2. Open

the

Windows menu and click Show ShapeSheet. The ShapeSheet of the selected Visio

shape opens.

3. For a scalar data point, enter the following function in the EventDblClick cell of the Events

section: RUNADDONWARGS("LMW Set Value","/SelOverride /ShapeOverride=<Data
Point Shape ID
> /Value= <n>").

For a field in a structured data point, enter the following function in the EventDblClick cell of the
Events section: RUNADDONWARGS("LMW Set Field Value","/SelOverride
/ShapeOverride=<
Data Point Shape ID> /Value= <n>").

• The Data Point shape ID is the name that appears following the subsystem name in the title

bar of the ShapeSheet. An index is appended to the shape ID when you add a second shape of
a given type to your drawing. For example, the ID of the first Data Point shape added in the
lighting HMI example is Data Point; the ID of the second data point is Data Point.50. If the
shape has an index, you can use the following naming convention to enter the Data Point
shape ID: Sheet.<index>.

n is a valid value or value for a field to be written to the Data Point shape.

4. Press

ENTER.