Parsing an Instrument Response

NI MAX Assistant IIOA

Parsing an Instrument Response

When you use a Query and Parse step or Read and Parse step to read data from an instrument, the response appears in the response window as shown in the following illustration. The Instrument I/O Assistant can automatically parse the entire data set for you, or you can parse the data into tokens manually. Use the response window to manually create data tokens to use in an application.

The response window displays data in binary form, ASCII form, or binary form and ASCII form together. Use the pull-down menu below the Byte index column of the response window to select the form in which to display data in the response window. Use the Byte index column to help you navigate the data set. Use the Binary representation column to parse binary numbers and strings or binary number arrays. Use the ASCII representation column to parse ASCII numbers and strings or ASCII number arrays.

Manually parsing data into tokens

Complete the following steps to manually parse data into tokens.

  1. Move the cursor over the response window and click the data you want to parse. A token appears as a highlighted data selection in the response window, as shown in the following illustration. You can use the response window to parse binary numbers and strings, binary number arrays, ASCII numbers and strings, and ASCII number arrays.

    Tip  You can preview the token value in the Value window in the lower section of the Instrument I/O Assistant.
  2. To change the data type of a token, right-click the token in the response window and select a new data type from the Data Type shortcut menu. You also can click the token and select a new data type from the Type pull-down menu on the Data Type tab.
Note  You can configure the Instrument I/O Assistant to parse all data in a token until you have no data left to parse. To configure the Instrument I/O Assistant to parse until the end of the data, select the To end of data item from the Count pull-down menu in the Query and Parse step, or click the To end of data button below the Count pull-down menu. The Instrument I/O Assistant also parses to the end of the data if you click the Auto parse button. The To end of data item and behavior are available only if the token you configure is the last token.