National Instruments Workstations Help Manual

25
National Instruments Workstation Help Manual - 1 - What are the National Instrument Workstations? The National Instrument workstations are essentially computers with the equivalent of PCI cards that function as different lab equipment. These machines run on Windows XP and function exactly like a traditional computer. However, because of the cards they have, these machines are able to function as an oscilloscope, function generator, digital multimeter, or a number of other pieces of lab equipment. The stations we have can perform the following operations: 1) Digital Oscilloscope 2) Function Generator 3) Digital DMM 4) Power Supply 5) Analog/Digital Input/Output 6) Logic Analyzer 7) Image Acquisition 8) Servo-motor Testing Each of these functions can be controlled either through a software application specific to the function, or through LabVIEW. The power of having these functions controlled through LabVIEW is that you can generate signals, output them to your circuitry, then collect and analyze the data that is gathered. The remainder of this document deals with how to use the specific software applications specific to each function and how to use the functions with LabVIEW. There are also a few programs that will be useful for a number of functions that will be discussed after all of the functions have been dealt with. NI-Scope Digital Oscilloscope (PXI-5112) The Digital Oscilloscope is basically the same as any oscilloscope you would find at a lab bench. The benefit of this oscilloscope though, is that it is completely controlled through the computer, and takes up a fraction of the space that a full oscilloscope unit would. There are two ways to control the digital oscilloscope. The first, and probably the easiest, way is through the GUI (graphical user interface). The second is using the NI-Scope Express VI in LabVIEW. To use the GUI, either go to “start\programs\National Instruments\NI- Scope\Scope soft front panel” or click on the shortcut icon on the quick launch toolbar. This will bring up the following window (Figure 1). Simply click ok. The window shown below will now pop up. This is the actual control window for the oscilloscope (Figure 2). Figure 1

Transcript of National Instruments Workstations Help Manual

Page 1: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 1 -

What are the National Instrument Workstations? The National Instrument workstations are essentially computers with the equivalent of PCI cards that function as different lab equipment. These machines run on Windows XP and function exactly like a traditional computer. However, because of the cards they have, these machines are able to function as an oscilloscope, function generator, digital multimeter, or a number of other pieces of lab equipment. The stations we have can perform the following operations:

1) Digital Oscilloscope 2) Function Generator 3) Digital DMM 4) Power Supply 5) Analog/Digital Input/Output 6) Logic Analyzer 7) Image Acquisition 8) Servo-motor Testing

Each of these functions can be controlled either through a software application specific to the function, or through LabVIEW. The power of having these functions controlled through LabVIEW is that you can generate signals, output them to your circuitry, then collect and analyze the data that is gathered. The remainder of this document deals with how to use the specific software applications specific to each function and how to use the functions with LabVIEW. There are also a few programs that will be useful for a number of functions that will be discussed after all of the functions have been dealt with. NI-Scope Digital Oscilloscope (PXI-5112) The Digital Oscilloscope is basically the same as any oscilloscope you would find at a lab bench. The benefit of this oscilloscope though, is that it is completely controlled through the computer, and takes up a fraction of the space that a full oscilloscope unit would. There are two ways to control the digital oscilloscope. The first, and probably the easiest, way is through the GUI (graphical user interface). The second is using the NI-Scope Express VI in LabVIEW. To use the GUI, either go to “start\programs\National Instruments\NI-Scope\Scope soft front panel” or click on the shortcut icon on the quick launch toolbar. This will bring up the following window (Figure 1). Simply click ok. The window shown below will now pop up. This is the actual control window for the oscilloscope (Figure 2).

Figure 1

Page 2: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 2 -

This is a more compact form of what you would find on a traditional oscilloscope. It has all the same functionalities, but in an easier to use package. You have two channels to use, as well as a trigger. The graphical display is located in the upper left section of the window and the controls are located around it. Along the right side of the window are the controls for the horizontal and vertical divisions for the graphical display as well as the selection of the channel. Along the bottom are the controls for the trigger. Measurements can Figure 2 be added by going to the Window menu and clicking on Measurements. You can also print the window being displayed by going to the File menu and going to Print Window. To control the oscilloscope using LabVIEW, you will need to use the NI-Scope Express VI. This is located under the inputs menu of the functions palette. The screen you will need to find is located below in figure 3. This might seem counter-intuitive, since you usually connect the oscilloscope to the output of your circuit, but since LabVIEW is reading in the data through the oscilloscope, it is considered an input. You can modify most, if not all, of the properties available in the GUI, but using LabVIEW allows you the added benefit of recording data and performing signal processing on the output of your circuit. The actual VI is also pictured below in figure 4. To use the NI-SCOPE Express VI, you will need to know a few things. First of all, this VI must be placed inside of the execution loop of your program. You should also wire the stop button to the Close (T) input of the NI-SCOPE Express VI so that the computer is not holding onto those resources. This will also allow you to go back and forth from using GUI and your program. However, you cannot have the GUI open and use the NI-SCOPE Express VI at the same time. The Figure 3 other thing that you must be aware of is the sampling rate of the oscilloscope. The physical card only has a limited memory, so this will need to be accounted for when setting up the Express VI to read in the data. You should set up the Express VI so that it has a Sample rate of 5M, a read length of anything less then 5M, and to continuously acquire. If you need the sampling rate higher then 5 Msamples/sec, you will need to find the best settings for your Figure 4 application, but for most applications, the previous settings should suffice.

Page 3: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 3 -

NI-FGen Function Generator (PXI-5401) The function generator again functions just like most standard waveform generators. It has the added benefits of being controlled completely through the computer as well as taking up substantially less space. This function, like the oscilloscope, can be accessed by either the GUI or through LabVIEW. To open the GUI, either go to “start\programs\National Instruments\NI-FGen\FGen soft front panel” or click on the shortcut on the quick launch toolbar. The following window will appear (Figure 5). This is the control interface for the waveform generator. Here you will find all the controls that you would find on a traditional waveform generator. You can pick from 4 modes: standard, frequency sweep, frequency shift keying, Figure 5 and frequency list generation. The first two are the ones that will probably be most useful to you. You can also choose from a number of different waveforms: sinusoidal, square, triangular, sawtooth waveform with either positive or negative slope, DC voltage, random noise, or you can generate your own waveform. You can then change the properties (amplitude, frequency, DC-offset,etc.) of the waveform using the knob and drop down menu located at the far right of the window. Either turn the knob to change the value or you can type in a specific value. To output the waveform, press the play button located just above the graph of your waveform. The other way to control the function generator is using the NI-FGEN (Standard Functions) Express VI located in the outputs menu of the functions palette. The image of the window you will need is located to the right in figure 6. Again, this may seem a little backwards, since the signal will most likely be the input to a circuit, but since it is leaving the computer, it is considered an output. When you use the NI-FGEN Express VI, you are only allowed to use the standard functions (sine, square, triangle, Figure 6 ramp up, ramp down, and DC). However, you can still control all the attributes of these waveforms. Controlling the function generator in this matter doesn’t really gain you a lot, except that it will minimize the number of windows you will need to have open since the only thing the NI-FGEN Express VI does is output the waveform through the hardware. The actual VI is located below in figure 7.

Page 4: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 4 -

To use the NI-FGEN Express VI is a little tricky. First of all, you need to have two placed on the block diagram for it to function correctly. In the one, you will need to check the box marked “Start generation.” You can then change the settings for the function generator. You will then need to place a second NI-FGEN Express VI on the block diagram and in this one, check the box that says “Stop generation.” If this is not placed on the block diagram, the Figure 7 function generator will not stop generating and you may end up hurting your circuit or yourself. These two blocks should also not be placed inside the loop for your main program. You don’t want to have the function generator initialized every iteration of the loop, simply to start generating when you start the program and stop generating when you end the program. To do this, use the Case Structure Express VI from the Execution Control menu and place the NI-FGEN Express VI with the “Stop Generation” box checked inside the Structure for the true condition. If you then wire the stop button to the input of the Case Structure Express VI, whenever the stop button is pressed, the function generator will turn off. Below is an example of what your setup should look like (Figure 8).

Figure 8

NI-DMM 6 ½ -Digit Flex Digital Multimeter (PXI-4072) The digital multimeter (DMM) is the same as any traditional DMM. The DMM, like the Function Generator and the Oscilloscope, can be accessed though LabVIEW or through the GUI provided, however using LabVIEW to control it can be somewhat difficult. To open the GUI, either go to “start\programs\National Instruments\NI-DMM\DMM soft front panel” or click on the shortcut on the quick launch toolbar. The following window will appear (Figure 9). This is the control interface for the DMM.

Page 5: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 5 -

This DMM is equipped with many of the traditional functions available on a standard DMM, such as AC and DC currents and voltages, resistance, and diode tests. However, this DMM also has the ability to measure frequency, capacitance and inductance. It also allows the user to quickly change the range and resolution using the drop down menus as well as allowing for Figure 9 scaling and some basic calculations. Having all this power at the click of a mouse definitely makes this much more user friendly then a traditional hand unit. PXI Programmable DC Power Supply (52192) <not yet available> NI-DAQ Multifunction I/O (PXI-6251/PXI-6070E) The Multifunction I/O serves as a digital and analog input and output. This functionality can only be used through LabVIEW, using the DAQ Assistant Express VI. This is located in both the Input and Output menus of the functions palette when in the block diagram window. By using this function, you can send out an analog signal, read in an analog signal, input or output over a single digital line, and input or output over an 8-bit port. I/O Connector Pinout The following list describes the pin layout for the multifunction I/O. For descriptions of the functionality of the signals, read the I/O Connector Signal Description. Pin Number PXI-6070E PXI-6251

Pin Number PXI-6070E PXI-6251

1 Freq Out PFI 14/P2.6 35 D GND D GND

2 CTR 0 Out PFI 12/P2.4 36 D GND D GND 3 PFI 9/CTR 0 Gate PFI 9/P2.1 37 PFI 8/CTR 0 Src PFI 8/P2.0

4 D GND D GND 38 PFI 7/AI Samp Clk PFI 7/P1.7

5 PFI 6/AO Start Trig PFI 6/P1.6 39 D GND PFI 15/P2.7

6 PFI 5/AO Samp Clk PFI 5/P1.5 40 CTR 1 Out PFI 13/P2.5

7 D GND D GND 41 PFI 4/CTR 1 Gate PFI 4/P1.4

8 +5 V +5 V 42 PFI 3/CTR 1 Src PFI 3/P1.3 9 D GND D GND 43 PFI 2/AI Conv Clk PFI 2/P1.2

10 PFI 1/AI Ref Trig PFI 1/P1.1 44 D GND D GND 11 PFI 0/AI Start Trig PFI 0/P1.0 45 Ext Strobe PFI 10/P2.2

12 D GND D GND 46 AI Hold Comp PFI 11/P2.3 13 D GND D GND 47 P0.3 P0.3

Page 6: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 6 -

14 +5 V +5 V 48 P0.7 P0.7 15 D GND D GND 49 P0.2 P0.2

16 P0.6 P0.6 50 D GND D GND 17 P0.1 P0.1 51 P0.5 P0.5

18 D GND D GND 52 P0.0 P0.0 19 P0.4 P0.4 53 D GND D GND

20 AO Ext Ref APFI 0 54 AO GND AO GND 21 AO 1 AO 1 55 AO GND AO GND

22 AO 0 AO 0 56 AI GND AI GND

23 AI 15 AI 15 57 AI 7 AI 7

24 AI GND AI GND 58 AI 14 AI 14 25 AI 6 AI 6 59 AI GND AI GND 26 AI 13 AI 13 60 AI 5 AI 5 27 AI GND AI GND 61 AI 12 AI 12 28 AI 4 AI 4 62 AI SENSE AI SENSE 29 AI GND AI GND 63 AI 11 AI 11 30 AI 3 AI 3 64 AI GND AI GND 31 AI 10 AI 10 65 AI 2 AI 2 32 AI GND AI GND 66 AI 9 AI 9 33 AI 1 AI 1 67 AI GND AI GND 34 AI 8 AI 8 68 AI 0 AI 0

I/O Connector Signal Descriptions The following table describes the signals found on the I/O connectors. For a summary of the I/O signals by device family, refer to the I/O Terminal Summary table in the specifications for the device.

Signal Name Ref Direction Description

AI GND — —

AI Ground—These pins are the reference point for single-ended AI measurements in RSE mode and the bias current return point for DIFF measurements. All three ground references—AI GND, AO GND, and D GND—are connected on the device.

AI <0..15> AI GND Input

AI Channels 0 through 15—You can configure each channel pair, AI <i, i+8> (i = 0..7), as either one differential input or two single-ended inputs.

AI <16..63>

AI GND Input

AI Channels 16 through 63 (NI PCI-6031E/6033E/6071E only)—Each channel pair, AI <i , i +8> (i = 16..23, 32..39, 48..55), can be configured as either one differential input or two single-ended inputs.

AI SENSE — Input AI Sense—This pin is the reference node for AI <0..15> in NRSE mode.

AI SENSE — Input AI Sense 2—This pin is the reference node for AI <16..63>

Page 7: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 7 -

2 in NRSE mode.

AO 0 AO GND Output Analog Channel 0 Output—This pin supplies the voltage

output of AO channel 0.

AO 1 AO GND Output Analog Channel 1 Output—This pin supplies the voltage

output of AO channel 1.

AO GND — — AO Ground—The AO voltages are referenced to these pins. All three ground references—AI GND, AO GND, and D GND—are connected on the device.

D GND — —

Digital Ground—These pins supply the reference for the digital signals at the I/O connector as well as the +5 VDC supply. All three ground references—AI GND, AO GND, and D GND—are connected on the device.

P0.<0..7> D GND

Input or Output

Digital I/O Signals—You can individually configure each signal as an input or output. P0.6 and 7 can also control the up/down signal of Counters 0 and 1, respectively.

AO EXT REF

AO GND Input External Reference—This is the external reference input

for the AO circuitry.

P1.<0..7> D GND

Input or Output

NI 6025E only—Port 1 bidirectional digital data lines for the 82C55A programmable peripheral interface. P1.7 is the most significant bit (MSB). P1.0 is the least significant bit (LSB).

P2.<0..7> D GND

Input or Output

NI 6025E only—Port 2 bidirectional digital data lines for the 82C55A programmable peripheral interface. P2.7 is the MSB. P2.0 is the LSB.

P3.<0..7> D GND

Input or Output

NI 6025E only—Port 3 bidirectional digital data lines for the 82C55A programmable peripheral interface. P3.7 is the MSB. P3.0 is the LSB.

+5 V D GND Output +5 V Power Source—These pins provide +5 V power.

AI HOLD COMP

D GND Output

AI Hold Complete Event Signal—When enabled, this signal pulses once for each A/D conversion in sampling mode. The low-to-high edge indicates when the input signal can be removed from the input or switched to another signal.

EXT STROBE

D GND Output

External Strobe Signal—You can toggle this output with software controls to latch signals or trigger events on external devices. This functionality is not available in LabVIEW or NI-DAQ. EXT STROBE is used for controlling SCXI chassis, and it is not a general-purpose signal. If you want to use or control this signal, you must perform register-level programming.

PFI 0/AI START

D GND Input PFI 0—As an input, this pin is a programmable function

interface (PFI).

Page 8: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 8 -

TRIG

Output

AI Start Trigger Signal—As an output, this pin is the ai/StartTrigger signal. In post-triggered DAQ sequences, a low-to-high transition indicates the initiation of the acquisition sequence. In pre-triggered applications, a low-to-high transition indicates the initiation of the pre-triggered conversions.

Input PFI 1—As an input, this pin is a PFI.

PFI 1/AI REF TRIG

D GND Output

AI Reference Trigger Signal—As an output, this pin is the ai/ReferenceTrigger signal. In pre-triggered applications, a low-to-high transition indicates the initiation of the post-triggered conversions. AI REF TRIG is not used in post-triggered applications.

Input PFI 2—As an input, this pin is a PFI. PFI 2/AI CONV CLK

D GND Output

AI Convert Clock Signal—As an output, this pin is the ai/ConvertClock signal. A high-to-low edge on AI CONV indicates that an A/D conversion is occurring.

Input PFI 3—As an input, this pin is a PFI. PFI 3/CTR 1 SRC

D GND Output

Counter 1 Source Signal—As an output, this pin is the Ctr1Source signal. This signal reflects the actual source connected to the general-purpose Counter 1.

Input

PFI 4—As an input, this pin is a PFI.

PFI 4/CTR 1 GATE

D GND Output

Counter 1 Gate Signal—As an output, this pin is the Ctr1Gate signal. This signal reflects the actual gate signal connected to the general-purpose Counter 1.

Input Counter 1 Output Signal—As an input, this pin can be used to route signals directly to the RTSI bus. CTR 1

OUT D GND

Output As an output, this pin emits the Ctr1InternalOutput signal.Input PFI 5—As an input, this pin is a PFI.

PFI 5/AO SAMP CLK

D GND Output

AO Sample Clock Signal—As an output, this pin is the ao/SampleClock signal. A high-to-low edge on AO SAMP indicates that the AO primary group is being updated.

Input PFI 6—As an input, this pin is a PFI. PFI 6/AO START TRIG

D GND Output

AO Start Trigger Signal—As an output, this pin is the ao/StartTrigger signal. In timed AO sequences, a low-to-high transition indicates the initiation of the waveform generation.

Input PFI 7—As an input, this pin is a PFI. PFI 7/AI SAMP CLK

D GND Output

AI Sample Clock Signal—As an output, this pin is the ai/SampleClock signal. This pin pulses once at the start of each AI sample in the interval sample. A low-to-high

Page 9: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 9 -

transition indicates the start of the sample. Input PFI 8—As an input, this pin is a PFI.

PFI 8/CTR 0 SRC

D GND Output

Counter 0 Source Signal—As an output, this pin is the Ctr0Source signal. This signal reflects the actual source connected to the general-purpose Counter 0.

Input PFI 9—As an input, this pin is one of the PFIs. PFI 9/CTR 0 GATE

D GND Output

Counter 0 Gate Signal—As an output, this pin is the Ctr0Gate signal. This signal reflects the actual gate signal connected to the general-purpose Counter 0.

Input Counter 0 Output Signal—As an input, this pin can be used to route signals directly to the RTSI bus. CTR 0

OUT D GND

Output As an output, this pin emits the Ctr0InternalOutput signal.

FREQ OUT

D GND Output Frequency Output Signal—This output is from the

frequency generator.

USER <1..2>

D GND I/O

User <1..2>—On BNC devices, these signals connect directly from a screw terminal to a BNC. For example, if you connect CTR 0 OUT to the USER 1 screw terminal with a wire, the Ctr0Out signal also is driven to the User 1 BNC.

*This table was taken from E Series Help, July 2004 Edition, part number 370503D-01 published by National Instruments Corporation. NI 100 MHz Digital I/O (PXI-6542) The 100 MHz Digital I/O has capability to input and output digital waveforms over 32 different channels. This ability makes this piece of hardware ideal for a logic analyzer. Like the two DAQ devices, this device can only be accessed using LabVIEW. It does come with a script editor though, that allows the user to generate unique waveforms that can be used within LabVIEW. The LabVIEW controls for this hardware device are pretty hard to get to. From the Block Diagram, go to the All Functions button, then NI Measurements button, and finally the NI-HSDIO button. Located at the bottom of the window will be the NI-HSDIO Acquire and Generate Express VI’s. The Acquire VI will read in digital data while the Generate will output digital data.

Page 10: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 10 -

To display the data read in from the Acquire VI, you will need to use a Digital Waveform Graph, which is also somewhat hard to locate. To find this, from the Front Panel, go to the All Controls button, then the Graph button. You should find the Digital Waveform Graph there.

I/O Connector Signal Description

Pins Signal Name

Signal Type Signal Description

33 DDC CLK OUT Control Output terminal for the

exported Sample clock.

67 STROBE ControlTerminal for the external Sample clock source which can be used for pattern acquisition

1, 3, 5, 7, 9, 11, 13, 15, 17, DIO<0..31> Data Bidirectional digital I/O data

Functions

All Functions

NI MeasurementsNI-HSDIO

Controls

All Controls

Graph

Page 11: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 11 -

19, 21, 23, 25, 27, 29, 31, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65

channels 0 through 31

26, 30, 64 PFI <1..3> Control

Input terminals to the NI 6542 for external triggers, or output terminals from the NI 6542 for events.

2, 4, 6, 10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 54, 56, 58, 62, 66

D GND Ground Ground reference for signals

8, 52, 60 RESERVED N/AThese terminals are reserved for future use. Do not connect to these pins.

I/O Connector Pinout

Pin Number PXI-6542 Pin Number PXI-6542 1 DIO 31 35 DIO 30 2 D GND 36 D GND 3 DIO 29 37 DIO 28 4 D GND 38 D GND 5 DIO 27 39 DIO 26 6 D GND 40 D GND 7 DIO 25 41 DIO 24 8 RESERVED 42 D GND 9 DIO 23 43 DIO 22 10 D GND 44 D GND 11 DIO 21 45 DIO 20 12 D GND 46 D GND 13 DIO 19 47 DIO 18 14 D GND 48 D GND 15 DIO 17 49 DIO 16 16 D GND 50 D GND 17 DIO 15 51 DIO 14 18 D GND 52 RESERVED 19 DIO 13 53 DIO 12 20 D GND 54 D GND 21 DIO 11 55 DIO 10 22 D GND 56 D GND 23 DIO 9 57 DIO 8 24 D GND 58 D GND 25 DIO 7 59 DIO 6 26 PFI 1 60 RESERVED 27 DIO 5 61 DIO 4 28 D GND 62 D GND

Page 12: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 12 -

29 DIO 3 63 DIO 2 30 PFI 3 64 PFI 2 31 DIO 1 65 DIO 0 32 D GND 66 D GND 33 DDC CLK OUT 67 STROBE 34 D GND 68 D GND

NI Digital I/O (PXI-6533) This Digital I/O card is similar to the previous card, with the exception that it is not supported by the NSDIO Express VI’s. It is also not supported under DAQmx, only under the traditional DAQ. To locate the VI’s necessary to use this card, follow the steps below.

The VI’s that will be most useful will be the “read from digital line,” “read from digital port,” “write to digital line,” and “write to digital port” VI’s. These four VI’s will give you all the functionality you should need to write data out to the lines or read data in. More complex functionality is available through the Advanced Digital I/O menu located at the bottom right of the Digital I/O screen. For help on how to set up programs to read and write to this card, in LabVIEW go to Help->Find Examples. This should bring up a new window (figure 10). Double click on “Hardware Input and Output,” followed by “Traditional DAQ,” “Digital Input and Output,” and “653x.” There should then be a number of different already constructed VI’s that you can open and use, or simply find inspiration from.

Functions

All Functions

NI Measurements NI-DAQDigital I/O

Page 13: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 13 -

Figure 10

NI-IMAQ Image Acquisition (PXI-1409) The NI IMAQ Image Acquisition system is a computer vision and still motion capture processing unit. The card can be hooked up to a digital camera that has a BNC or an RCA connector output. You can use this hardware to capture images and then perform automated image processing on the acquired image. There are two ways to access this functionality. The first way is to use LabVIEW. This is not always the easiest thing to do, especially if you’re not very experienced with LabVIEW programming. If you want to try to control the Image Acquisition card through LabVIEW, follow the steps below to locate the Vision VI’s.

Page 14: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 14 -

The second, and much easier, way to control this card is through a piece of software called Vision Assistant. To access this program, go to “start\programs\National Instruments\Vision Assistant 7.1\Vision Assistant 7.1” or click on the shortcut in the quick launch toolbar. The following screen will appear (figure 11).

Figure 11

From this screen, you can either open a previously acquired image, acquire a new one if there is a camera hooked up to the PXI-1409 card, or search through the “Solution Wizard” to see if there is already a program written to accomplish your task. Which ever option you choose, you will be taken through the steps to open an image, acquire an image, or look through the already created solutions. Once you’ve finished that process you will reach the following screen (figure 12).

Functions

All Functions

NI MeasurementsNI-Vision

Page 15: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 15 -

Figure 12

This is the main window for the program. As you can see, the window is broken up into four sections. The large section in the upper right shows the image that you’re working on and the results of any processing steps you add. Below it is the script window. This is where the steps that you add will appear. The order that you place the steps in this window is the order that they will be executed if you run the script. The lower left section is the Processing Function window, which lists all the functions available. These functions are also available in the drop down menus over top of the first section. Finally, the window at the upper left is the image browser. You can store images that you’ve created here or open/acquire multiple images and use this area to select which images to work on. There is also a second tab at the top which accesses a help menu. To add steps to the script, simply select the function you want to use on the image, either from the Processing Function window or the drop down menus. A screen specific to that function will then appear, which allows you to change certain properties of the function. Once you’ve finished modifying the properties, click ok and the step is added to the script window and the image is updated with the resulting image. Once you’ve finished creating your script, you can save the final image by going to “Save Image As…” and you can save the script by going to “Save Script As…,” both of which are located under the file menu. You can also export this script to as either a LabVIEW program or C-code. To do this, select either “Create LabVIEW VI” or “Create C Code” under the “Tools” menu. NI Motion Controller (PXI-7350) The NI Motion Controller is a servo and stepper motor control unit. The Controller consists of two portions: the interface card (which is located in the PXI chassis) and the actual control unit (MID-7652). This system has the ability to control 2 axes, which makes it ideal for use with moving platform applications.

Page 16: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 16 -

As with some of the other functions, there are several ways to interact with this device. As with all of the functions, this device can be accessed through LabVIEW using the motion functions available. However, this is a very complicated task. The diagram below shows how to access the motion VI’s in LabVIEW.

The other way to access this function is to use the Motion Assistant. This is a program that uses a GUI to help generate motion scripts. To open this program, either go to “start\programs\National Instruments\Motion Assistant\Motion Assistant” or click on the shortcut in the quick launch toolbar. This will bring up the following screen (figure 13).

Figure 13

Functions Palette

All Functions

NI Measurements

Page 17: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 17 -

From this start up screen, you can go through a number of tutorials and help content that will make using the Motion Assistant much easier. If you do not want to look through any of the help content, simply start adding steps to your motion script. Do this by clicking on the “Add Step” button located at the left side of the main window in the script window. For almost all applications, you will want your first step to be a reference move. Once you’ve added a step, the window should now look like this (figure 14).

Figure 14

This window has four main parts. On the far right is the help window. You can either show or hide this help window by clicking the button right above it. In the middle of the screen are the graph window on the top and the “Step Setup” window at the bottom. Finally, to the far left is the script window, which shows the order of the motion steps that have been added. The graph window shows you the speed and acceleration curves of the move, the 2-D path that will be taken, and the 3-D path that will be taken. Since the equipment available can only handle two axes, the 3-D path will not be very useful. The “Step Setup” window has three tabs that allow you to modify many of the properties for the current step. You can access more properties by going to “Properties” under the “Edit” menu. You can also view the current state of the step by going to the “Step Status” tab located next to the “Step Setup” tab at the very bottom of the screen (figure 15).

Page 18: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 18 -

Figure 15

Once you have finished your script, you can run it using this program as well. To run

your script, click the “Run” button . Assuming everything is connected properly, this will start your script running. If you need to stop your script at any point, there are three options available. First of all, pressing the “Decelerate” button will slow the motors down to a stop but leave them powered. Pressing the “Run” button while the script is executing will also do this. This is the preferred option, since it will put the least stress on the motors. The second option is to press the “Halt” button . This button will immediately stop the motors from moving, but will still leave them powered. The last option is to press the “Kill” button . This button will immediately stop the motors from running as well as cut off all power to them. This is the least desirable option, since it will put the most strain on the motors. Once you have created and debugged your script, you have a number of different options. You can simply save the script to be opened up using the Motion Assistant by going to “Save” in the “File” menu. You can also export the script to either LabVIEW or as C-code. To export the script as a LabVIEW program, go to “Generate Code” under the “Tools” menu and select “LabVIEW Diagram.” This will then create a LabVIEW block diagram that will perform the same actions as the script. To export the script as C-code, again go to “Generate Code” in the “Tools” menu and select “CVI Code.” This will create a file that can compiled using a C compiler that will generate C-code to perform the actions in the script. Finally, by selecting “Code Recipe” under “Generate Code,” you will be taken through a step by step process for generating Visual Basic code for the script. Measurement and Automation Explorer The Measurement and Automation Explorer (MAX) is a quick and easy way to access the cards as well as to ensure that you have the desired connections (figure 16). All the cards

Page 19: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 19 -

connected to the system will show up under the “Devices and Interfaces” heading of the “Configuration” window. Most of the devices will show up either under “Traditional NI-DAQ Devices” or “NI-DAQmx Devices.” Some unique devices will show up under their own headings (ex. The PXI-1409 Image Acquisition card will show up under “IMAQ Devices”). If you right click on the desired device, then select “Test Panels…” from the menu that pops up, a window should pop up that will allow you to access the device. These windows have minimal functionality, but they do allow you some control of the device. This would be useful if you wanted to check to make sure you had to correct connections before trying to run a program in LabVIEW, or if you just wanted to make a quick measurement.

Figure 16

SignalExpress If you don’t want to deal with programming in LabVIEW, SignalExpress is the next best thing. SignalExpress provides you with most of the signal processing functionality in LabVIEW, but in a more user friendly form. SignalExpress also has the capability of interacting with the NI hardware in the PXI-1042 chassis, which makes this program almost as powerful as LabVIEW itself. To open this program, either go to “start\programs\National Instruments\SignalExpress\SignalExpress” or click on the shortcut in the quick launch

Page 20: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 20 -

toolbar. This will bring up the following windows. Figure 17 is the main SignalExpress window while figure 18 is a startup window that will appear.

Figure 18

Figure 17 From the start up window (figure 18), you can access and number of tutorials and help menus. If you don’t wish to access any of this information, simply click “close.” The main window is broken up into three parts. On the far left of the window is where the steps in your program will be listed. The center of the window is where all the data will be displayed. On the far right of the window is the help menu. You can close and open this by clicking on the icon directly above it. There are several ways you can add steps to your program. You can add steps by clicking the “Add Step” button , going to the “Add Step” menu, or right clicking in the window where the steps will be displayed. Steps are what will actually be doing the generating and processing. If you click on the “Add Step” button, the window to the right will appear (figure 19). Figure 19 As you can see, there are several different areas you can access. These are signal generation or acquisition types. You can generate a signal by using the “Create Signals” option under the “Analog” menu. All of the actual processing functions are located under the “Analog” menu. In both the “Analog” and “Digital” menus, you can choose to generate or acquire signals from the hardware. Adding signals to the display can also be done in a number of ways. The easiest way is to click and drag the desired signal over to the graph. You can also add signals by right clicking on the graph and selecting the desired signal from the “Add Signal” menu. You can also add additional displays, and like the previous actions, there are several ways to do this. You can either click the “Add Display” button or right click on the graph and clicking on “Add Display.” When you click the “Add Display” button, the

Page 21: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 21 -

program will automatically add a graph at the bottom of the display window. If you go to the “Add Display” menu after right clicking on a graph, you will have a number of options as to where to add the new graph (above, below, left, or right). The display sizes can be changed by clicking and dragging the borders of the displays. Once you have all the steps and graphs set up, you can run the program by clicking on the “Run” button . This will cause the program to execute and collect any real time data from the hardware. The following figure (figure 20) is an example of what your final program might look like. This simple program starts out with a sine wave, adds noise to it, then filters out the noise.

Figure 20

When you’ve finished creating your program, you can save it by going to “Save as…” under the file menu. You will save the file as an Express Workbench file. What’s great about this is that you can then open that file up in LabVIEW and LabVIEW will create a block diagram that will do the same thing as the SignalExpress program. To do this, go to “Express Workbench” under the “Tools” menu and select “Convert Express Workbench Project…” This will bring up a window that allows you to select the file you just saved and specify a file location for LabVIEW to create your new program. Analog Waveform Editor The analog waveform editor allows you to generate highly customized and unique waveforms. You can generate waveforms then save them to be used with either the Function Generator or read into LabVIEW. This program allows you to specify exactly what you want in your waveform. To open the program, either go to “start\programs\National Instruments\Analog Waveform Editor\Analog Waveform Editor” or click on the shortcut on the quick launch toolbar. The following window will open (figure 21). If you are going to create a brand new waveform, select “Blank waveform.” If you are going to be editing a previously created waveform, select “Open and existing waveform.” Once selecting how to proceed, the following window will appear (figure 22). Here you can change the sampling rate and some other options. For most applications, the default settings should

Page 22: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 22 -

suffice. If you need to go back and change the properties from the second window, you can get to them by going to “Properties” under the “File” menu.

Figure 21

Figure 22 Once all of these preliminary options have been chosen, you will get to the main window for the program (figure 23). The graph area of this window is where the waveform you create will show up.

Figure 23

To start creating your waveform, you will need to either click on the “Add components”

button on the toolbar or select “Add components” from the “Edit” menu. Selecting this will bring up the following window (figure 24). This is where you will add all the components to your waveform. You can either create single waveforms (sine, square, triangle, etc) or you can add components together using either the “Insert Primitive before

Current Primitive” or “Insert Primitive after Current Primitive” buttons. By doing this, you can create more advanced waveforms such as a sine wave with exponential decay (figure 25).

Page 23: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 23 -

Figure 24 Figure 25 To view the entire waveform, you may need to zoom out. You can do this by clicking on the zoom out button then clicking somewhere in the graph window. Once you’ve finished creating your waveform, you will need to save it. There are two things you will need to do. First, you should simply save it by going to “Save” under the “File” menu. This will allow you to come back and edit your waveform as well as read it into the Function Generator. You can also export the waveform as a LabVIEW Measurement File (LVM) so you can read it into LabVIEW using the Read LVM Express VI. An example of the type of waveform you could create is shown below (figure 26).

Figure 26

Digital Waveform Editor The digital waveform editor allows you to create unique digital signals over a number of different lines. You can use this to create clocks, counters, signal patterns, or any number of other signals. This program is best used in conjunction with the HSDIO Express VI in LabVIEW. To open the program, either go to “start\programs\National Instruments\Digital Waveform Editor\Digital Waveform Editor” or click on the shortcut on the quick launch

Page 24: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 24 -

toolbar. The following window will appear (figure 27). This is the main window for the digital waveform editor.

Figure 27

You will now need to create a new waveform. Do this by selecting “New Waveform” from the “File” menu or clicking on the “New Waveform” button on the toolbar. This will bring up the following window (figure 28). Here you can change the number of samples as well as the number of signals or channels you will work with. You can always add more lines using the “Insert Signals” option under the “Edit” menu.

Figure 28

After clicking ok, the graph area in the main window should now have lines for however many signals you chose to have. If you click on the graph, a blue box will appear. This is one sample of the line you selected. You can select multiple samples by clicking and dragging. You can change the bit value of a single sample by using the Toggle Bit button or you can change the bit value of multiple samples by selecting them and using the “Fill” option under the “Edit” menu and selecting “All Ones” or “All Zeros” depending on which way you want to go. There are many other options available under the “Fill” option. For example, by highlighting multiple rows, you can create a counter by filling in with either “Count Up” or “Count Down.” You can back to selecting samples by clicking on the Select button. Once you’ve finished creating your digital waveform, you will need to save it. There are two things you will need to do. First, you should simply save it by going to “Save” under

Page 25: National Instruments Workstations Help Manual

National Instruments Workstation Help Manual

- 25 -

the “File” menu. This will allow you to come back and edit your waveform as well as read it into the HSDIO Generation Express VI. You can also export the waveform as an ASCII file so you can read it into LabVIEW using the Read LVM Express VI. An example of the type of waveform you could create is shown below (figure 29).

Figure 29