Getting data, Setting data – Watlow ANAWIN 2 User Manual

Page 134

Advertising
background image

C-2 AnaWin User’s Guide

AnaWin OLE Server

Getting Data

GetChannelDataValues(Address as Integer, ParmNum as Integer,
StartChan as Integer, NumValues as Integer, Values as Variant)

GetGlobalDataValue(Address as Integer, ParmNum as Integer,
Value as Variant)

Used to obtain channel data values for one or more channels or one
global data value from a single controller on the bus. By definition, a
global data item only has one value for the entire controller and thus no
StartChan or NumValues.

Address: The modbus address of the desired controller.

ParmNum: The parameter number of the requested data.

StartChan: The first channel for which data is requested.

NumValues: The number of channels for which data is requested.

Values: An array of values containing the requested data is returned in
this variant. The data type of the value is dependent on the ParmNum
passed.

Value: This is the same as Values, only it is a single value instead of an
array.

A list of valid channel and global parameters is provided at the end of
this appendix.

Setting Data

SetChannelDataValues(Address as Integer, ParmNum as Integer,
StartChan as Integer, NumValues as Integer, Values as Variant)

Used to set channel data values on a single controller. Note that only
Setpoint, Control, Heat (Primary) Output, and Cool (Secondary) Output
are accepted for ParmNum. All parameters are as described above
except that the caller fills Values with an array of values prior to calling
the method.

AnaWin’s server checks the validity of the values passed. If all data is
valid, SetChannelDataValues returns AWOK and attempts to send the
data to the controller. However, it is possible that the controller can
reject the download. The actual result of the download can be obtained
by calling the RecipeLoadStatus method described below.

Advertising