Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 3 Next »

(blue star)

This section gives an illustrative example of using the tag scaling feature. Your settings may be different depending on your project’s configuration.

Exercise: Using the Scale Mode feature with real tags

In this example, a Celsius temperature acquired from a remote tag will be converted to Fahrenheit using the [Scale Mode] feature.

a) Create two [INT] tags named ‘Celsius’ and ‘Fahrenheit’. Enter the I/O Device and address as shown below (Note: In this example, the user has already defined an I/O device named “PLC.STATION”. If your I/O device has a different name, then enter that name into the [I/O Device] field. Likewise, if the I/O address format is different, then use the correct format for your PLC).

b) Go to the [Advanced] tab in the editing menu for the ‘FAHRENHEIT’ tag. In the [Scale Mode] drop-down menu select the [Linear Slope] option, then enter “1.8” for [Slope] and “32” for [Intercept].

c) Go to [Insert] – [Textbox] and draw two text boxes on the main screen. Select these textboxes, then open the [Property Editor] tab and expand the [Appearance] tab. In this tab, select the [Text] field and click the (blue star) icon. This will open the [Binding Properties] tab. In this window, click the (blue star) icon to assign the desired tag. Assign the ‘Celsius’ and 'Fahrenheit’ tags to their respectiv text boxes.

d) Download the project to an Xpanel device. Verify that the value from the PLC is transferred to the remote tags and visible via the text box. The tag value should be converted from Celsius to Fahrenheit. Note: In this example, both tags are reading an integer from the D0 device. Make sure that your PLC program is storing a 16-bit integer value to the D0 device, and that communication with the PLC is properly configured in Canvas.

  • No labels