APP007.TXT TestPoint Application Note APP007.TST Associated Source File (c) Capital Equipment Corporation 1995 ________________________________________________________________ Extracting Data From Lists Examples include multiple A/D channels and instrument data. ________________________________________________________________ Whenever TestPoint returns a list of data, you typically want to get at the individual items that make up that list. How do you know when you have a list of data? The easiest way to determine what type of data TestPoint is providing is to click on View > Data in the main menu. The name of the data type followed by the data values will then be displayed next to the object when the application runs. A common example occurs when sampling multiple A/D channels. TestPoint will return each channel as part of a list. To separate that list into its component channels, double click on the A/D reference in the center column of the action list. This opens up the data reference dialog box for the A/D object. Click on the data type drop-down list and select LIST as the data type, then click on ADD. Provide a name for the first channel and continue to click on ADD until all channels have been named. Click on OK to close the data reference dialog box. Drag in a display and then drag the A/D object to the display. Double click on the A/D parameter in the display action line. This will open up the data reference dialog box. Click on the A/D channel you want to display ( a small arrow will appear on the line youâve selected) and then click on select. The single A/D channel will now be selected and displayed. This is much easier to do than it is to describe. Try it once on A/D demo data with multiple channels selected as shown in the accompanying TestPoint listing. The same technique can be used for instrument data. Data from an instrument is often returned in the form of a complex header followed by the data of interest. TestPoint lets you pick apart the header simply by naming each of its components. The same process is shown using the math object sublist function. This method may be preferable, even though it uses more objects, since it will return a correct result even if the returned value is a vector rather than a list.