Using weather components in Px views

The weather module supports “drag and drop” usage of some weather components directly onto Px pages, providing iconic views.

Figure 2. Drag and drop component on Px view example (WeatherReport for Current Weather View)


Drag and drop component on Px view example (WeatherReport for Current Weather View)

Figure 2 above shows a WeatherReport dragged onto a Px page, with the resulting “Make Widget” dialog and default selection (Current Weather View). After adding and at runtime this appears as in Figure 3.

Figure 3. Current Weather View in Px editor, and runtime


Current Weather View in Px editor, and runtime

Icons change with weather conditions (along with text) as needed to track characteristics like cloudy, rain, wind, night time, and so on. The following weather components provide this “drag and drop” Px support:

Demo station example of Px support

Starting in AX-3.5, the standard “demo” station database (distributed with Niagara Workbench) was modified to include an example “Custom” WeatherProvider under its WeatherService. It has a Px view that provides a “dashboard” of Weather Conditions, demonstrating various Px techniques and bindings to slots under the configured NwsWeatherProvider (adjustable). Figure 4 shows this view in Workbench.

Figure 4. Demo station example of Px view for WeatherService data


Demo station example of Px view for WeatherService data

If you run the demo station on your computer, you can see this Px interface by pointing your browser to http://localhost/ord?station:│slot:/Services/WeatherService/Custom

The example shown above is using AX-3.6, as evidenced by the included “Air Quality” entry, using the color-based “Current Air Quality View”. If running the demo station on an AX-3.5 host, this Px view (on its “Custom” NwsWeatherProvider) is nearly identical, but without this air quality entry.