UpdateDeviceTwin (FB)¶
FUNCTION_BLOCK UpdateDeviceTwin EXTENDS CBM.ETrigTo
Update the device twin (desired properties only!) via HTTPS.
- InOut:
Scope
Name
Type
Comment
Inherited from
Input
xExecuteBOOLRising edge: Action startsFalling edge: Resets outputsIf a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values (xDone,xError) are present at the outputs for exactly one cycle.ETrigTo
udiTimeOutUDINTDefines the time (µs) after which an FB (e.g. requiring an external acknowledgement) aborts operation due to a timeout with error message.
ETrigTo
Output
xDoneBOOLTRUE: Action successfully completedETrigTo
xBusyBOOLTRUE: Function block activeETrigTo
xErrorBOOLTRUE: Error occurred, function block aborts actionFALSE: No errorETrigTo
Input
sHubDomainNameSTRING(255)Domain name of the IoT Hub
sDeviceIdSTRING(255)Device ID
wsSaSWSTRING(255)Shared Access Signature (SAS Token)
pwsDataPOINTER TO WSTRING
The device twin properties to update (Input, JSON format)
Output
eErrorError code
iHttpStatusINTHTTP status
wsDeviceTwinInfoWSTRING(WEB_CLIENT.g_udiMaxResponseSize)Last device twin info (Output, JSON format)