opt16 — access to two bytes of event status.

Description:

u16 opt16(u8 byte);

Returns two word bytes of element status sent the event.

List of parameters:

value

Byte number in the word of event status starting from zero.

Return values:

Returns the value of two word byte of element status. Type of return value u16.

Example:

<item addr=“524:248“ MS=“509:16” name="Test for opt16 function" type="script">

V-ID/MS 
{
	u16 status = opt16(0);

	if(status > 0x0300) 
		setStatus(2047:32, {1, "Movement excesses  3%"});
}

</item>

The result of performing the example in the interface:

When motion sensor MS values are exceeded the corresponding message will be displayed.