Switch Widget

Warning

When you use Switch and/or Update Asset widgets in your dashboard, you enable your dashboard users to directly update the PLC.
Unitronics will not be liable for any damage or consequence that is caused by the user's actions.

 

A Switch widget enables a dashboard user to directly access a controller and click a button to modify a single Boolean tag value, changing the value in the controller memory. Each time the button is toggled, the Boolean tag changes state.

Note that in order for these widgets to access a specific controller, the Dashboard must contain one or more additional widgets, where Filter by ID is enabled. When the Dashboard is filtered for an Asset, the widget will connect to that asset’s PLC and access the tags defined in the widget, via secure UniCloud.

 

The following example uses a Switch widget in conjunction with a Table widget.

1.     Drag & drop the widget onto the Canvas, the Warning for Update Asset opens; click Confirm to continue and the Widget Wizard will open automatically.

 

Step 1 – Data

1.      Asset Type: click the drop-down arrow, and select the asset with the data you want to display

2.      Click Data Tags for Widget; note that Switch widget does not support Asset Properties.
U
nder Tag Data, select the tag you want to enable the dashboard user to access via the Switch widget; only Boolean tags are displayed.

 

Tip

Note that in order to enable the user to write to these tags, the tag Access level must be set as Read/Write in the Asset type, whether for UniStream or controllers whose Asset Type is defined in a UCR router.

 

After making your selection, the screen may resemble the image below.

 

3.        Click Next to continue.

Step 2 – Customize

The Customize options enable you to add a remark, as well as the message displayed to the user after pressing the button.

For the Switch button itself, you can select a toggle, button, or image; you have the option to select On/Off images from the gallery, or to upload new images.

 

The next image shows Customize options along with the Preview window.

 

 

When you are down, click Finish. The widget you have just configured will be displayed at its default size.

You can drag it to reposition it on the Canvas, and can drag the widget borders to resize it.

 

Table Widget – Navigation

IIn the Table widget, select Navigate per Asset Type and Filter by Asset ID.

  1. Under Navigates to Dashboard, select the Dashboard that contains your Switch widget. (The Switch widget and Table widget can be in the same Dashboard, and you can select it.)

  2. This will reveal the Filter by Asset option; select it.

 

2.     When the user clicks on the desired Asset in the Table, UniCloud will display that Asset's Switch widget, enabling the user to click the button in the dashboard, and toggle the button to update the tag value in that Asset's controller.