Call us! 512-349-0334 or (877) INDUSOFT

Tips and Tricks: Using Scaling in InduSoft Web Studio Driver Worksheets

InduSoft web Studio users sometimes ask us to explain how scaling works in the driver worksheets. This blog continues on from the recent blog on driver worksheets, in which we discussed how to configure the Main and Standard Worksheets.

 

Introduction

InduSoft Web Studio Driver sheets can be configured to scale the values read from a device register having a defined range, such that the values are applied proportionately across a different range defined for the InduSoft tag. Values written from InduSoft Web Studio to the device are appropriately scaled in the reverse of this process.

The scaling can be accomplished in two ways. The first method involves configuring the Div and Add column entries on the driver sheet, which will be used to determine the values written to InduSoft Web Studio tags or device registers when a value change is initiated on either side of the connection. Alternatively, using the second method, you can check the box on the header portion of the driver sheet in conjunction with range value entries in the Min and Max fields on the sheet.

Each method applies a value range for the device registers across the value range of their associated InduSoft Web Studio tags, and each method has its advantages.

 

The First Method

 

The first method requires that you calculate the values to be used for Div and Add, but it does not restrict the range of values that can be written to the InduSoft Web Studio tag, unless the tag has values assigned to its Min and Max properties.

Substituting the tag’s (HMI) defined range for the values of Y and the device’s (PLC) defined range for the values of X  into the equation for the slope of a line, you can determine the Div value (1/Slope) that will be entered on the driver sheet for a given tag. Substituting the values obtained for the slope, and either of the known coordinate pairs (x,y) or (x1,y1) into the equation for the Y axis intercept of a line, you can solve for b to determine the Add value.

scale1

 

The Second Method

The second method does the calculations for you automatically during runtime, according to the device range limits defined by the Min and Max values configured in the driver sheet. The Min Max check box in the header portion of the driver sheet must be checked.

scale5

This method assumes you have defined range limits in the InduSoft Web Studio tag’s Min and Max properties. If those properties were not assigned, you would simply be applying the value in the device’s register to the associated InduSoft Web Studio tag with no scaling functionality invoked.

scale4

Checking the MinMax box in the driver sheet converts the Div and Add columns to Min and Max columns. If you use the Min and Max fields next to the check box, the range applies to all tags on the sheet, unless this range is overridden by entries in the Min and Max column for individual tags in the body of the worksheet. If left blank, no scaling is applied unless the tags have these columnar Min Max entries.

During the runtime, if the calculated value falls outside the range defined by the tag’s Min and Max properties, the tag’s quality attribute will be set to UNCERTAIN, and the value received from the PLC will not be converted and written to the InduSoft Web Studio tag. In this state, any valid value change to the tag by InduSoft Web Studio will be converted and written to the PLC, at which time the Quality attribute will return to a GOOD state.

As an example of this method, converting from a range of 0 to 4095 in the device to a range of 0 to 100 in InduSoft Web Studio, the InduSoft Web Studio tag’s Min and Max properties would be configured as 0 and 100, respectively, while the Min and Max fields on the driver sheet would be configured to 0 and 4095, respectively. Reading a value of 4000 from the PLC results in a value of 97 being written to the InduSoft Web Studio tag.

scale4scale3

Comments are closed.