Get Attributes
[cmdchars] = !E
Description
The Get Attributes command reads specified attribute settings and ranges for specified channels of the addressed module.
Syntax
!E[positions]{[attrMask][rangeMask] pairs}
[positions] | Four ASCII-hex characters specify the targeted channels. A "1" in any bit means that attributes and/or range are to be set for the corresponding channel. A zero in any bit means that the corresponding channel is not targeted. |
{[attrMask][rangeMask][settings] triplets}
For each "1" bit in the [positions] field, there must be an [attrMask][rangeMask] pair. The first pair corresponds to the most significant "1" in the [positions] field, and so on. This command can contain up to 16 pairs, one for each channel represented by a "1" in the [positions] field.
[attrMask] | Four ASCII-hex characters specify attributes to be read. The most significant bit corresponds to attribute 15, and the least significant bit corresponds to attribute 0. A "1" in any bit means that the corresponding attribute is targeted. A zero in any bit means that the corresponding attribute is not targeted. |
[rangeMask] | One ASCII-hex character indicates whether or not the command reads the range. A "1" means that the range is targeted. A zero means that the range is not targeted. |
Success Response
A{[settings] array}
{[settings] array} | The response contains one [settings] array for each "1" in the [positions] field. The first array corresponds to the most significant "1" in the [positions] field, and so on. The response can contain up to 16 [settings] arrays, one for each channel targeted by the [positions] field. |
[settings] | Two ASCII-hex characters correspond to each "1" in the preceding [attrMask] field. If the value in the [rangeMask] field is a "1," this field contains an additional two-character entry for the range. The first (most significant) entry in this field corresponds to the first "1" in the [attrMask] field, and so on. If this field includes a range entry, the range entry is the last in the field. Each two-character entry represents a setting ID for a channel attribute or range. The following topics contain definitions of attribute and range IDs for all FieldPoint I/O modules: |
Error Responses
E_INVALID_CMD | Undefined command. |
E_INSUFF_CHARS | Data field error. An insufficient or incorrect number of characters were received for the command. |
E_ILLEGAL_DIGIT | One or more characters in the command could not be properly converted to a digit (hex or decimal). |
E_INV_CHNL | One or more channels specified in the command either do not exist or do not support the specified operation. |
E_INV_ATTR | One or more attributes specified in the command either do not exist or do not support the specified setting. |
E_INV_RANGE | One or more ranges specified in the command either do not exist or do not support the specified setting. |
E_NO_MODULE | There is no module at the specified address. |
Refer to FieldPoint Responses for other possible error responses, error numbers, and error descriptions.
Example
>33!E00110000100001[checksum][cr]
This command reads the range settings for channels 4 and 0 of the FieldPoint module at address 51 (0x33). The response is as follows:
A4411[checksum][cr]
The response indicates that channel 4 is set to range 0x44, and channel 0 is set to range 0x11.