Scaling in IWS Driver Sheets

IWS 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 IWS to the device are appropriately scaled in the reverse of this process. The scaling can be accomplished in two ways. You can configure the Div and Add column entries on the driver sheet, which will be used to determine the values written to IWS tags or device registers when a value change is initiated on either side of the connection. Alternatively, 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 IWS tags, and each has its advantages.

 

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 IWS 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.

 

 

 

 

 

 

 

 

 

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.

 

 

This method assumes you have defined range limits in the IWS 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 IWS tag with no scaling functionality invoked.

 

 

 

 

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 IWS tag. In this state, any valid value change to the tag by IWS 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 IWS, the IWS 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 IWS tag.