GeoLocatorByName (FB)¶
FUNCTION_BLOCK GeoLocatorByName EXTENDS APICaller
Requests geo location information from the API Server by using a common name for the place. It’s possible, that a given city name is not contained in OpenWeather’s database, which will result in an error.
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
xExecuteBOOLRising edge: Starts defined operationFALSE: Resets the defined operation after ready condition was reachedETrig
Output
xDoneBOOLTRUE: Ready condition reachedETrig
xBusyBOOLTRUE: Operation is runningETrig
xErrorBOOLTRUE: Error condition reachedETrig
Input
sApiKeyOutput
eErrorsConstructedUrlContains the internally constructed URL, that is used to retrieve data from the API Server.
xUrlConstructedBOOLIs TRUE, when the content of sConstructedUrl is valid (after the internal URL Construction is finished).
Input
sCityNamesStateCodeoptional (only for US)
sCountryCodeISO 3166 country code
sLanguageCode‘’
Optional ISO 3166 country code to extract a local city name in the specifiec language, if available.
Inout
geoLocation
Methods:
CallAPI, inherited from APICaller
CheckGeoLocationParam, inherited from APICaller
CleanupAction, inherited from APICaller
CyclicAction, inherited from APICaller
ProcessResponse, inherited from APICaller
ResetAction, inherited from APICaller
StartProcessResponse, inherited from APICaller
Structure: