Read Analog Outputs

FieldPoint Optomux Programming

Read Analog Outputs

[cmdchars] = K

Recommended Extended Commands

National Instruments recommends that you use the Read 16-Bit Data (!F) extended command or the Read 16-Bit Data with Status (!G) extended command instead of the Read Analog Outputs command.

Description

The Read Analog Outputs command reads the output levels of the targeted channels on the addressed FieldPoint module. The command returns a 12-bit value for each output. The command reads the most significant 12 bits of channels that have greater than 12-bit resolution. For 16-bit resolution, you must use the extended commands.

Syntax

K[positions]

[positions]Zero to four ASCII-hex characters specify the channels. A "1" in any bit means that the command reads the corresponding channel. A zero in any bit means that the corresponding channel is not targeted.

This command does not affect input channels.

If [positions] contains one to three characters, the command does not read channels corresponding to missing bits.

If [positions] is empty, the command supplies "FFFF" for the value.

Success Response

A[data]

[data]Three ASCII-hex characters specify a 12-bit value for each targeted channel. The first three characters specify the output value for the channel corresponding to the most significant "1" in the [positions] field, and so on.

This command returns "???" for targeted input channels.

Error Responses

E_INVALID_CMDUndefined command.
E_INV_LIMS_GOTSpecified limits invalid for the command.

Refer to FieldPoint Responses for other possible error responses, error numbers, and error descriptions.

Example

>33K380[checksum][cr]

This command reads the values for channels 7, 8, and 9 of the FieldPoint module at address 51 (0x33). The response is as follows:

A000BE2???[checksum][cr]

The response indicates that channel 9 has an output value of 0x000, channel 8 has an output value of 0xBE2, and channel 7 is configured as an input.