10 - 12 - 2024

Weather library

Block ForecastMyWeather2

License: Hobby, Industrial

To add a weather forecast to the diagram, you need to do the following:

  • Open the website MyWeather2.com, go to WEATHER API -> 2 Day Forecast Weather API. Then create an account and get your unique Access Code;

  • Add an ImageControl to the diagram:

  • Add a block ForecastMyWeather2. Set the GPS coordinates of the place where you want the weather forecast - block's parameters Latitude, Longitude. Set the parameter UniqueAccessCode gotten from MyWeather2.com WEB site.

The block gives two days forecast - first day is today and means what is the weather now, second day is tomorow. If the block is not connected with an ImageControl, the block will work too and block's outputs will have correct values received from MyWeather2.com WEB site.

Block's parameters:

  • Latitude, Longitude - GPS coordinates of the monitoring place;
  • UniqueAccessCode - a code gotten from MyWeather2.com site;
  • Connected to ImageControl - the name of ImageControl, but the block can works without connected control too;
  • ForecastPerMin - on how many minutes to connect the block to MyWeather2.com and to receive the forecast. If the input DoForecast is connected, the parameter ForecastPerMin is without matter;
  • Disable - if the parameter is checked, the block will not work;

Block's inputs:

  • DoForecast - if the input is connected and becomes to a high level, the block will connect to the WEB site MyWeather2.com and will receive the forecast information;
  • InLatitude, InLongitude - if the inputs are connected, the block will show the forecast information for a place with this GPS coordinates instead of the GPS coordinates located in block's parameters Latitude, Longitude;

Block's outputs:

  • CurrLowTemp, CurrHiTemp - min, max temperatures for today;
  • CurrWindSpeed, CurrWindDirection - wind speed and direction for today;
  • CurrWetherID, CurrWeatherText - describes the weather condition for today. The full list WeatherID:WeatherText is shown below;
  • TomorowLowTemp, TomorowHiTemp - min, max temperatures for today;
  • TomorowWindSpeed, TomorowWindDirection - wind speed and direction for today;
  • TomorowWetherID, TomorowWeatherText - describes the weather condition for today. The full list WeatherID:WeatherText is shown below;
  • OnForecast - becomes to a high level, the block receive the forecast information from the WEB site, show it on the ImageControl and update its outputs;
  • OnError - the forecast information is not received from the WEB site;
  • Error - the text meaning of the error;
  • ForecastTime - DataTime of the last forecast;

List of weather conditions, ID: Name:
0: "Thunderstorm"
1: "Rain and windy"
2: "Light rain and windy"
3: "Thunderstorms in the vicinity"
4: "Heavy thunderstorm"
5: "Sleet"
6: "Hail"
7: "Freezing sleet"
8: "Freezing drizzle"
9: "Drizzle"
10: "Freezing rain"
11: "Light rain"
12: "Rain"
13: "Snow flurries"
14: "Light snow"
15: "Snow blowing"
16: "Snow"
17: "Light rain with thunder"
18: "Melting hail"
19: "Dust"
20: "Fog"
21: "Haze"
22: "Smoke"
23: "Windy"
24: "Variable wind"
25: "Frigid"
26: "Cloudy"
27: "Mostly cloudy (night)"
28: "Mostly cloudy (day)"
29: "Partly cloudy (night)"
30: "Partly cloudy (day)"
31: "Clear"
32: "Sunny"
33: "Fair (night)"
34: "Fair (day)"
35: "Rain with thunder"
36: "Hot"
37: "Scattered thunderstorms (day)"
38: "Thunder"
39: "Scattered showers (day)"
40: "Heavy rain"
41: "Scattered snow showers (day)"
42: "Heavy snow"
43: "Snow and windy"
44: "Showers in the vicinity"
45: "Scattered showers (night)"
46: "Scattered snow showers (night)"
47: "Scattered thunderstorms (night)"

 

Block SunInfo

License: Hobby, Industrial

The block provides information based on GPS coordinates of your living place for sunrise, sunset, morning and evening twilight times, noont, the duration of the day in hours and minutes. All the Sun information is changed every day, because of the movement of the celestial bodies. The block is suitable for controlling outdoor lighting.

Block's parameters:

  • Latitude, Longitude - GPS coordinates of the monitoring place;
  • Time zone - time zone of the monitoring place;

Block's inputs:

  • DoCalc - if the input is connected, the block will calculate the sun information when the input becomes to a high value. If the input is not connected, the block will calculate the information on every minute;

Block's outputs:

  • IsNight - the output is at high level between sunset and sunrise;
  • IsNightTwilight - is at  high level between night twilight and morning twilight;
  • SunRise - the time sunrise;
  • SunSet - the time of sunset;
  • Noont - the time of noont;
  • MorningTwilightBegin - the time of the morning twilight;
  • EveningTwilightEnd - the time of the evening twilight;
  • DayLenH, DayLenMin - length of the day;

 

Block WindRose

License: Hobby, Industrial

The block is used to draw the wind rose with the data contained in the block's input InDataSet. The input DataSet must contain at least three columns - column for DateTime, for wind speed and for wind direction. It is important for the block to be connected with an ImageControl, in whose boundaries the wind roses to be drawn. In one ImageControl can be shown many wind roses, so we can see the history of the wind for last many hours. At the bottom left is shown the average wind speed of the rose, at the bottom right - the maximum wind speed for the rose.

Block's parameters for colors:

  • ColorBackground - color of the background of the ImageControl;
  • ColorGrid - color of the all drawn elements as circles, text;
  • ColorWind - the color of every dot of the wind at the wind rose;

Block's parameters for input InDataSet:

  • ColumnData - the name of the DataTime column located in the input InDataSet;
  • ColumnSpeed - the name of the column with a Wind speed information located in the input InDataSet;
  • ColumnDirection - the name of the column with a Wind direction information located in the input InDataSet;

Block's parameters for drawing the wind rose:

  • PeriodType - determines the time period of data taken from the InDataSet and shown in the roses. If PeriodType is LasMinutes, LasHours or LasDays, then this parameter works together with a parameter Last. For example, if PeriodType is LastHours and Last is 12, then last 12 hours will be shown at the Wind roses. If PeriodType is WholePeriodInDataSet, then all the data located in InDataSet will be shows at the wind roses;
  • Last - work together with parameter PeriodType and determines the priod of shown data at wind roses;
  • NumRoses - determines how many roses will be shown at ImageControl. For example, if PeriodType is LastHours, Last is 12, NumRoses is 6, then 6 roses will be shown, every roses will show 2 hours information, because (6 roses)*(2 hours) = 12h;
  • NumGridCircles - determines how many circles contains one rose;
  • MaxWind - determines the last circle of the rose at what wind speed corresponds;

Block's inputs:

  • InDataSet - a DataSet with at least three columns for DateTime, Wind speed and Direction, and records with wind measured values to be shown in the ImageControl;
  • DoDraw - when the input becomes to a high value, the data from the input InDataSet will be shown at the ImageControl;
  • FromPeriod, ToPeriod - if this two inputs are connected, then the shown period will be gotten from this inputs instead to be calculated based on the parameters PeriodType, Last;

Block's outputs:

  • OnReady - becomes to a high level, when the roses are drawn;

 

Block WS2350

License: Hobby, Industrial

Using this block, we can read the current measured values of the weather station WS2350 or compatible with it stations. In order do this, there must be installed and running HeavyWeather software. During the work of the HeavyWeather software, it connects to the weather station, reads its current weather data, and updates the file: c:\HeavyWeather\currdat.lst. The block WS2350 reads this file every minute and updates the block's output with new read information.

Block's parameters:

  • HeavyWeatherPath - the install path of the HeavyWeather software;
  • ScanRateSec - time period in seconds between two readings of currdat.lst file. Because HeavyWeather updates the file every minute, it is better to read the file for a shorter period, for example, 40 sec;
  • WaitForRestartHWSec - shows how much time to wait for a file change: currdat.lst. If there is no change, then the block's output OnDoRestartHB will becomes to a high value. With other blocks from the System library, we can restart the HeavyWeather software;

Block's outputs:

  • OnRead - becomes to a high level, then a new data is read from the weather station;
  • OnDoRestartHW - if there is long time no new data from the weather station, the block can restart the HeavyWeather software;
  • NumRestarts - the counter shows the number of attempts to restart the HeavyWeather software;

All the other block's outputs correspond with the weather information read from the station;

 

Block WindChill

License: Hobby, Industrial

The block calculates a Wind chill value based on the two block's inputs for temperature and wind speed.

Block's parameters:

  • Type - the parameter may be C, km/h(degrees centigrade and kilometers per hour) or F, mph(fahrenheit and miles per hour);

Block's inputs:

  • DoCalc - if the input is connected, the block will calculate the wind chill value when the input becomes to a high value, in other case the calculations will happen many times per second, which is load to the processor;
  • Temp, Wind - the needful weather parameters. They can be in C, km/h or F, mph;

Block's outputs:

  • OnReady - becomes to a high level on every new calculation;
  • Out - the calculated wind chill;

 

Block DewPoint

License: Hobby, Industrial

The block calculates a dew point value based on the two block's inputs for air temperature and air humidity.

Block's inputs:

  • DoCalc - if the input is connected, the block will calculate the dew point value when the input becomes to a high value, in other case the calculations will happen many times per second, which is load to the processor;
  • Temp, Humidity - the needful weather parameters. The temperature is in degrees centigrade;

Block's outputs:

  • OnReady - becomes to a high level on every new calculation;
  • Out - the calculated dew point;

 

 

Block AltonaLabWeatherStation

License: Hobby, Industrial

The block is specially designed for the hardware board and sensors produced from us for weather monitoring. To the board can be connected external sensors for temperature, humidity, wind speed and direction, air pressure and rain. To the board can be connected internal temperature sensor too, which will automatically Turn ON an internal heater, when the internal temperature is too low or to Turn ON an internal FAN, when the internal temperature is too high. The AltonaLab weather station board works together with a SNMP board, which has 8 analog inputs and 16 digital inputs/outputs.

 

Block's parameters:

  • Disable - if the parameter is ON, the block will not work when the diagram runs;
  • FanSwitchTemp - if the internal temperature of the box, where the board is located is over the value of this parameter, the FAN for colling the box will be Turned ON;
  • HeatherSwitchTemp - if the temperature of the box is under this parameter, the heater of the box will be Turned ON;
  • IP Address - the IP address of the SNMP board;
  • OffsetAirPressure - an adjustment of the Air pressure output;
  • OffsetInTemp - an adjustment of the Internal temperature output;
  • OffsetOutTemp - an adjustment of the external temperature output;
  • OffsetOutHum - an adjustment of the external humidity output;
  • QueueSize - determines a number of an last measured sensor's data, which be used to be calculate the average value of the sensors;

 

Block's inputs:

  • FTP_Led - the inputs controls the LED in frond of the box, which signals the success of the FTP upload;

 

Block's outputs:

  • CommunicationError - becomes to a high level, if there is a communication problem with a SNMP device;
  • OnRead - becomes to a high level, when the sensors data are read;
  • OutTemp - external temperature;
  • OutHum - external humidity;
  • AirPressure - the barometric pressure of the air;
  • WindSpeed, WindDir - speed and direction of the wind;
  • WindChill, DewPoint - the block automatically calculates the Wind chill and dew point of the weather condition, based on the external temperature, humidity, wind;
  • InTemp - the value of the internal of the weather box temperature;
  • HeatherIsWorking - a high value of the output means the internal heater is working;
  • FanIsWorking - a high value of the output means the internal Fan is working;

 

 

Block AltonaLabSoilMeter

License: Hobby, Industrial

The block is designed to measure up to five soil temperatures and up to two soil humidity. One of the temperature sensors can be mounted to close to the box, so it can measure the air temperature. The sensors for soil temperature and humidity are placed in a different deep into the soil. The block reads the values of the SNMP board connected to the AltonaLab Soil meter board.

Block's parameters:

  • Disable - if the parameter is ON, the block will not work when the diagram runs;
  • IP Address - the IP address of the SNMP board;
  • OffsetSoilTemp1..OffsetSoilTemp5 - adjustment values of the temperature outputs;
  • QueueSize - determines a number of an last measured sensor's data, which be used to be calculate the average value of the sensors;
  • ScanRateSec - the time interval between two readings of the sensor's data;

 

Block's outputs:

  • CommunicationError - becomes to a high level, if there is a communication problem with a SNMP device;
  • OnRead - becomes to a high level, when the sensors data are read;
  • SoilTemp1..SoilTemp5 - the temperature of the soil's sensors;
  • Humidity1 - The value of the first humidity sensor;
  • RSoil1 - the resistance of the first humidity sensor in Ohms;
  • Humidity2 - The value of the second humidity sensor;
  • RSoil2 - the resistance of the second humidity sensor in Ohms;