1
LabVIEW HW #9 Each problem begins with a suggested descriptive name (including the .vi extension) for the solution VI that you will write. Suggested icons for use in the VI are given at the end of some problem statements. The palette locations of the cited icons are not give explicitly: these icons can be found with the aid of Quick Drop. 1. Parse and Convert Multimeter String.vi Stand-alone computer-controlled scientific instruments often report their measurement results in the form of an ASCII string. As an example, assume a (real) multimeter in the lab sends, when connected to a computer, the string VOLTS DC +1.345E+02, in which VOLTS DC identifies the type of measurement being reported, and +1.345E+02 is the actual measured value. In order for you to make use of this measured value in a program (e.g., plotted on a chart, or input into a calculation), the string received from the multimeter must be “parsed” (i.e., the identifier portion separated from the measured value portion), and then the measured value portion must be converted from its ASCII string representation into a numeric format. Write a program in which VOLTS DC +1.345E+02 is input in a front-panel String Control. On the block diagram, this string is parsed appropriately, and the measured value is converted to the double-precision floating-point format. This DBL-formatted number is then displayed on the front panel in a Numeric Indicator labeled Measured Value. Suggested icons can be found in Functions>>Programming>>String and its subpalette, String/Number Conversion. When properly functioning, the front panel of your VI should appear as shown below. In the String Control, ‘\’ Codes Display is selected so that ASCII characters which are normally non- displayable will now be visible in the indicator.

LabVIEW HW #9gspaldin/EssickHW9.pdfLabVIEW HW #9 Each problem begins with a suggested descriptive name (including the .vi extension) for the solution VI that you will write. Suggested

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: LabVIEW HW #9gspaldin/EssickHW9.pdfLabVIEW HW #9 Each problem begins with a suggested descriptive name (including the .vi extension) for the solution VI that you will write. Suggested

LabVIEW HW #9 Each problem begins with a suggested descriptive name (including the .vi extension) for the solution VI that you will write. Suggested icons for use in the VI are given at the end of some problem statements. The palette locations of the cited icons are not give explicitly: these icons can be found with the aid of QuickDrop. 1. ParseandConvertMultimeterString.vi Stand-alone computer-controlled scientific

instruments often report their measurement results in the form of an ASCII string. As an example, assume a (real) multimeter in the lab sends, when connected to a computer, the string VOLTS DC +1.345E+02, in which VOLTS DC identifies the type of measurement being reported, and +1.345E+02 is the actual measured value. In order for you to make use of this measured value in a program (e.g., plotted on a chart, or input into a calculation), the string received from the multimeter must be “parsed” (i.e., the identifier portion separated from the measured value portion), and then the measured value portion must be converted from its ASCII string representation into a numeric format.

Write a program in which VOLTS DC +1.345E+02 is input in a front-panel StringControl. On the block diagram, this string is parsed appropriately, and the measured value is converted to the double-precision floating-point format. This DBL-formatted number is then displayed on the front panel in a NumericIndicator labeled MeasuredValue. Suggested icons can be found in Functions>>Programming>>String and its subpalette, String/NumberConversion. When properly functioning, the front panel of your VI should appear as shown below. In the String Control, ‘\’CodesDisplay is selected so that ASCII characters which are normally non-displayable will now be visible in the indicator.