HW Assignment Week 4

This exercise is due before the 5th week of class. When you are finished, please email the VI (and any subVI's) to your instructor.

PART I

Make sure that you save this HW VI. You will be able to use it in Lab 4 and subsequent VIs.

In this HW assignment, you will create a typical VI control to communicate to a FICTIONAL  instrument.

Voltage Setting

Numeric Value

10m V

0

100m V

1

1mV

2

10mV

3

100mV

4

500mV

5

  1. A string indicator on the front panel - Can you get the indicator to show the <CR> and <LF> characters in the display?
  2. Our 'instrument' at address 12 using GPIB. For this instrument, the Instrument requires the string to be terminated with a <CR> and <LF>. For example, to set the voltage setting to 10mV, the string

"Set Voltage 3"

should be sent through the GPIB with the proper termination appended.

HINT: Use the FORMAT TO STRING function to create the GPIB string.

HINT: Use the MODE option of the GPIB WRITE function to terminate the string function.

PART II

"Set Voltage 10mV"

How would you design the VI to generate the appropriate string? Three different methods are listed below. Pick one and describe (you don't need to write the VI) how you would generate the appropriate GPIB string.

  1. Use the numeric output of a RING control and a CASE structure
  2. Use the numeric output of a RING control to pick an element out of an ARRAY CONSTANT.
  3. Use the numeric output of a RING control and the ATTRIBUTE node of the Ring control