Sunteți pe pagina 1din 27

Hydroacoustic Fixture Manual

Revision A

Jing Acoustics and Ultrasonics Laboratory

North Carolina State University


Revision History Table
Revision Author Date Description of Changes
A S. Liddle 12/10/2012 Initial Release

Jing Laboratory Hydroacoustic Fixture Manual Page 2 of 27


Table of Contents
System Overview .......................................................................................................................................... 4
Velmex Motion Control System................................................................................................................ 4
Computer .................................................................................................................................................. 5
GAGE DAQ card ........................................................................................................................................ 6
Transducer ................................................................................................................................................ 6
Waveform Generator ............................................................................................................................... 7
Power Amplifier ........................................................................................................................................ 8
Hydrophone .............................................................................................................................................. 8
Preamplifier .............................................................................................................................................. 8
Aquarium .................................................................................................................................................. 9
Ring Array Option ..................................................................................................................................... 9
Setup ............................................................................................................................................................. 9
Computer Setup........................................................................................................................................ 9
Limit switch settings ............................................................................................................................... 11
Connect Hydrophone.............................................................................................................................. 11
Connect Immersion Transducer ............................................................................................................. 14
Connect Velmex Controllers ................................................................................................................... 16
Launch hydroacoustic_capture.m .......................................................................................................... 17
Ring Array Option ................................................................................................................................... 17
Operation .................................................................................................................................................... 18
Move Axes .............................................................................................................................................. 20
Capture Data........................................................................................................................................... 21
Save Data ................................................................................................................................................ 22
Line Scan ................................................................................................................................................. 23
Grid Scan ................................................................................................................................................. 24
Troubleshooting .......................................................................................................................................... 24
Attachments................................................................................................................................................ 27

Jing Laboratory Hydroacoustic Fixture Manual Page 3 of 27


System Overview
The hydroacoustic fixture is a system of interconnected components designed to emit and capture
ultrasonic signals in an underwater environment. At the center of the system is a water-filled aquarium
that houses a stationary transducer that emits sound and a hydrophone, which records it. The
hydrophone is rigidly mounted to a computer-controlled three-axis motion control system, and can be
moved throughout the aquarium to measure the acoustic signal at various locations. See the block
diagram below.

Figure 1. Hydroacoustic fixture block diagram.

Velmex Motion Control System


The motion control system is produced by Velmex and consists of two VXM controllers and four servo
axes (three linear axes used with the hydrophone setup and a single rotary axis to be used with the ring
array setup). The three linear axes are mounted together using adapter plates ordered from Velmex.
Each VXM controller controls two axes, which are hard wired to the controller. The two VXM controllers
are also linked to each other via a bussing cable, allowing one controller to act as the master and the
other as the slave.

Figure 2. Velmex VXM four-axis motor controller.

Jing Laboratory Hydroacoustic Fixture Manual Page 4 of 27


The master controller has an RS-232 serial communications port used to communicate with a computer.
Each servo axis has an encoder, and position data is sent between the computer and VXM controllers in
terms of encoder counts. The table below lists each of the four axes and the proper conversion rate
between encoder counts and physical units. The MATLAB Graphical User Interface (GUI) for the
hydroacoustic fixture performs this conversion internally, so the user need only enter physical units.

VXM Axis Fixture Axis Velmex Part Number Encoder Conversion


Axis 1 Z Axis MB6042K2J 200 counts/mm
Axis 2 Y Axis MB6042K2J 200 counts/mm
Axis 3 X Axis MB4036K2J 200 counts/mm
Axis 4 R Axis B4872TS 80 counts/degree
Table 1. Summary of Velmex servo axes.

Y Axis

X Axis

Z Axis

Figure 3. Linear axis system.

Computer
The computer is a Dell T7500 Workstation with a 1.6 GHz Quad Core Intel Xeon Processor , 4GB of
RAM, and a 1 TB hard drive. The operating system is 64-bit Windows 7. The 32-bit version of MATLAB
2012a has been installed on the computer and is the only application necessary to use the hydroacoustic
fixture. Note that only the 32-bit version of MATLAB is compatible with the data acquisition card used by
the computer. The 64-bit version of MATLAB will not work.

Jing Laboratory Hydroacoustic Fixture Manual Page 5 of 27


Figure 4. Dell T7500 Workstation.

The Dell T7500 does not have a serial port, so a USB to serial adapter must be used to communicate
with the VXM controller. Drivers for the USB to serial adapter must be installed prior to use, and can be
downloaded through the Windows Device Manager.

GAGE DAQ card


A GaGe Oscar CompuScope 14-bit digitizer has been installed in one of the Dell T7500 PCI Express slots.
This data acquisition card has two channels, trigger input and output, and clock input and output. The
maximum sampling rate is 50 MS/s and the card is capable of accepting input voltages up to 50 V. The
card was purchased with a MATLAB software development kit (SDK) published by GaGe Applied
Technologies and included on a CD in the Attachments section of this document. The MATLAB SDK
allows the card to be controlled directly by MATLAB, including configuring acquisition and trigger
settings, initiating capture, and downloading captured data into MATLAB directly. The SDK includes a
number of MATLAB functions (beginning with a CsMl prefix) that, in turn, call a .dll file. The .dll file can
only be called by the 32-bit version of MATLAB, and a MATLAB warning indicates that the ability to call
.dll files may be removed in future versions of MATLAB. Prior to upgrading the version of MATLAB on the
T7500, check to ensure that this functionality has not been removed.

Transducer
There are two immersion transducers that can be used with the hydroacoustic fixture. The transducers,
produced by Olympus Corporation, are specifically designed for underwater use, and include gasket
seals to keep water away from their electrical components. The smaller of the two transducers (part

Jing Laboratory Hydroacoustic Fixture Manual Page 6 of 27


number V314-SU) has a resonant frequency of 1 MHz and a diameter of 0.75. The larger transducer
(part number A389S-SU) has a resonant frequency of 0.5 MHz and a diameter of 1.5.

Figure 5. Immersion transducers for use with hydroacoustic fixture.

Waveform Generator

Figure 6. Agilent 33250A Waveform Generator.

An Agilent 33250A waveform generator is used to create the signal for the immersion transducer. Only
the sine waveform should be used with the transducers and the frequency should be set to the resonant
frequency of the transducer (1 MHz for the V314-SU and 0.5 MHZ for the A389S-SU). The waveform
generator does not have sufficient power output to drive the transducers directly. Instead, its signal is
first sent to a power amplifier that, in turn, drives the transducer.

The waveform generator also has a sync BNC port and the ability to output a trigger. This port can be
connected to the trigger input port of the DAQ card to trigger data capture. This is particularly useful for
measuring the delay between the emission of the acoustic signal from the transducer and its arrival at
the hydrophone.

Jing Laboratory Hydroacoustic Fixture Manual Page 7 of 27


Power Amplifier
An E&I 240L power amplifier is used to drive the immersion transducer. The amplifier has a frequency
range of 10 kHz to 12 MHz and a maximum power output of 40 W. Note that driving the immersion
transducers above their rated power may damage them.

Hydrophone
An Onda HNC-0200 hydrophone measures the acoustic output of the immersion transducer. The
frequency range of the hydrophone is 1 to 10 MHz, with a sensitivity of 45 nV/Pa. This sensitivity results
in a signal too small to be accurately read by the GaGe data acquisition card, and a preamplifier is
required.

Figure 7. Onda HNC-0200 Hydrophone.

Preamplifier

SMC to BNC
Pole Mount Cable
AC Adapter

DC Block

Hydrophone
Preamplifier

Figure 8. Onda AH-2020 preamplifier kit.

Jing Laboratory Hydroacoustic Fixture Manual Page 8 of 27


Preamplification of the hydrophone output is provided by an Onda AH-2020 preamplifier kit. The
amplifier includes an external power supply and DC Block. Amplification can be switched between 0 and
20 dB. The BNC output of the DC Block connects directly to the computer DAQ card.

Aquarium
The aquarium has a 40 gallon capacity. Its dimensions are 36 x 18 x 16.

Ring Array Option


The hydroacoustic fixture can also be used with an immersible ring array replacing both the transducer
and hydrophone. A fixture has been created to mount the Velmex rotary table atop the aquarium and
rigidly connects a ring array to the rotary table. The fixture was designed for use with an Imasonic 60
mm radius partial ring array, spanning 180 with 128 elements. At the time this manual was written, the
lab only had one partial ring array, but the fixture was designed to hold up to two identical partial ring
arrays, allowing for the creation of an entirely closed ring. Motion control of the ring array rotary axis is
achieved through the MATLAB GUI used to control the hydrophone. Emitting and capturing ultrasonic
waves from the ring array requires additional hardware, however, that must be controlled through
other means.

Setup

Computer Setup
Prior to use, the GaGe Oscar CompuScope data acquisition card drivers must be installed, and the card
itself must be physically installed in the computer. The drivers are included on the GaGe CompuScope
CD included in the attachments of this manual. The CompuScope card requires a full length PCI Express
slot with either 8 or 16 lanes.

Jing Laboratory Hydroacoustic Fixture Manual Page 9 of 27


Figure 9. GaGe Oscar CompuScope card installed in Dell T7500 PCIe slot.

The computer will also need a 32-bit version of MATLAB installed to run the GUI. Only the 32-bit version
is compatible with the CompuScope. To be controlled by MATLAB, the CompuScope also requires that
the MATLAB SDK be installed. The MATLAB SDK can be found on the GaGe CompuScope CD in the
attachments section. Note that the MATLAB SDK has a separate serial number that must be entered at
the time of installation. When the SDK is installed, it will attempt to link the SDK file locations to
MATLABs searchable path. If it is unsuccessful, the user will have to set the path in MATLAB manually:

1. Open MATLAB
2. Under the File Menu select Set Path
3. Click the Add with Subfolders button and browse to the location of the GaGe MATLAB SDK. By
default, the SDK is located at:
C:\Program Files (x86)\Gage\CompuScope\CompuScope MATLAB SDK
4. Click OK.
5. Check that the new file path appears in the window along with subfolders entitled Main,
CsMl, and Adv.
6. Click the Save button.

Setting this search path may be required for each Windows user on the computer.

Jing Laboratory Hydroacoustic Fixture Manual Page 10 of 27


The hydroacoustic fixture GUI is contained within a single file named hydroacoustic_capture.m that is
included on a CD in the Attachments section of this manual. This file should be placed in an easily
accessible folder and will be called from the MATLAB command window. There is one accessory file
entitled default_values.mat in which the default settings for the GUI are stored. This file should be
copied to the same filepath as hydroacoustic_capture.m. If it does not exist when
hydroacoustic_capture.m is launched, a default_values.mat file will be created automatically.

Limit switch settings


Each of the three linear Velmex axes has two limit switches, one on each side of the axes. These limit
switches control the range of motion of each axis and prevent the axis shuttles from being driven past
the switches. Since each axis is longer than the length of its corresponding aquarium dimension, if the
limit switches are not correctly set it will be possible to crash the axes in to the sides of the aquarium.
An example of the limit switch is shown in the figure below.

Figure 10. Velmex UniSlide limit switch.

Each limit switch is attached to a thin rod that spans the length of the axis by two set screws. These set
screws accept a 0.050 hex key, which can be found taped to each of the three linear axis motors.
Loosening both set screws will allow the user to slide the limit switch along the rod to the desired
position. The limit switch is then set in place by tightening both set screws.

At the time this manual was written, all limit switches had been properly set. They should be checked
periodically for tightness and position, as the aquarium may move slightly in relation to the axes.

Connect Hydrophone
First, the hydrophone must be connected to the preamplifier by threading the hydrophone itself into
the preamplifier.

Jing Laboratory Hydroacoustic Fixture Manual Page 11 of 27


Figure 11. Hydrophone threads into preamplifier.

The preamplifier then connects to the DC Block via the included SMC to BNC adapter cable. The DC Block
must be connected to AC power using the included power adapter. Ensure the gain switch on the DC
block is set to the High position.

The hydrophone is connected to the Velmex positioning system using the pole mount included in the
Onda preamplifier kit. The silver knob on the pole mount is loosened to accept the hydrophone and
preamplifier. Slide the hydrophone into the mount, being careful not to contact the sensitive tip of the
hydrophone against the mount. Tighten the silver knob to secure the hydrophone in place.

Figure 12. X axis pole clamp.

Next raise the pole connected to the X axis of the Velmex positioning system so it is completely out of
the water. The pole is connected to the X axis via a clamp (shown in Figure 12), that can be loosened by
the two socket head cap screws on its front face. With the pole out of the water, connect the
preamplifier pole mount by inserting the pole into the top of the pole mount and tightening the black
thumb screw. Then lower the pole into the water somewhat near the position of intended use. The only
components of the hydrophone-preamplifier system that will withstand immersion are the hydrophone,
preamplifier, and pole mount block. It is critical that the DC block and AC adapter be securely positioned
outside the aquarium to avoid permanent damage.

Jing Laboratory Hydroacoustic Fixture Manual Page 12 of 27


Figure 13. Correctly mounted hydrophone.

Finally, connect the DC block to the computer data acquisition card using a male-male BNC adapter and
an SMC to BNC cable. The DC block should connect to the Channel 1 Input of the data acquisition card
(the leftmost port), as shown below.

Channel 1 Input

Figure 14. Connection of hydrophone to CompuScope card.

Jing Laboratory Hydroacoustic Fixture Manual Page 13 of 27


Connect Immersion Transducer
The immersion transducer is connected to the power amplifier using a custom BNC cable with an O-ring
sealed connector. The output port is located on the right side of the front face of the power amplifier.
With the cable connected, the transducer can be placed in the aquarium-mounted clamp. There are two
different-sized clamps, one for each of the immersion transducers (see Figure 15). To change between
the 0.75 clamp and the 1.5 clamp, remove one clamp and its set screws, loosen the pole adjust set
screws, and remove the pole. Then reinsert the pole from the other direction, reinsert the clamp, and
tighten all set screws.

0.75 Immersion
Transducer Clamp

0.75 Set Screws

Pole Adjust
Set Screws

1.5 Set Screws

1.5 Immersion
Transducer Clamp

Figure 15. Immersion transducer aquarium-mounted clamp.

To attach the transducer, remove the clamping fixture from the aquarium, slide the transducer into the
appropriate clamp, and tighten. With the transducer clamped, place the fixture on the aquarium by
lining up the notches in the main arm with the top of the aquarium side walls.

Jing Laboratory Hydroacoustic Fixture Manual Page 14 of 27


Figure 16. Submerged mounted immersion transducer.

Next use a BNC cable to connect the output port of the waveform generator to the power amplifier
signal input, the left port on the front face of the power amplifier. Set the waveform generator to output
a sinusoidal wave at the resonant frequency of the immersion transducer (1.0 MHz for the 0.75
transducer or 0.5 MHz for the 1.5 transducer).

Waveform Generator
Output Port

Power Amplifier Power Amplifier


Input Port Output Port

To Transducer

Figure 17. Waveform generator and power amplifier connections.

To measure the amplitude and period of the waveform at the hydrophone, a continuously generated
waveform can be used. To measure the arrival time of the signal, however, a trigger must be sent from
the waveform generator to the data acquisition card. Connect the Sync port of the waveform
generator to the trigger input port (labeled TI) of the CompuScope using an SMC to BNC cable.

Jing Laboratory Hydroacoustic Fixture Manual Page 15 of 27


Figure 18. Connection of waveform generator Sync port to CompuScope trigger input port.

Turn on Burst Mode on the waveform generator by pressing the Burst button, and setting the number
of cycles and burst period. Then set the trigger to internal and the type to rising edge (denoted by the
upward pointing arrow). There is no need to press the Trigger button on the face of the waveform
generator, and doing so will reset the trigger to manual.

Note that the hydroacoustic_capture.m application has a trigger timeout set to 50 ms by default. Be
sure to set the burst period to 50 ms or less or the application may force a trigger before the waveform
generator has sent on. If a burst period longer than 50 ms is required, the default trigger timeout setting
can be changed by loading the default_values.mat file into MATLAB. This will load a structure called
default_values into the MATLAB workspace. The structure contains a field called trigger_timeout, used
to set the trigger timeout in microseconds when the capture function is called. To adjust the trigger
timeout, change the value of the trigger_timeout field, then save the default_values structure to the
default_values.mat file. For example, to change the trigger timeout to 100 ms enter the following:

>> load(default_values.mat)
>> default_values.trigger_timeout = 100000;
>> save(default_values.mat,default_values)

Finally, press the Output button on the front face of the waveform generator to transmit the waveform
signal to the power amplifier. Power on the power amplifier using the switch located on the back panel
to transmit the amplified waveform to the immersion transducer.

Connect Velmex Controllers


Connect the two VXM controllers via the VXM bussing cable. The left VXM controller will act as the
master while the right VXM controller will act as the slave. Connect the VXM controllers to the computer
by plugging an RS-232 serial cable into the back of the master controller. Use a USB to serial adapter
cable to connect to the Dell T7500 computer. If this is the first time the VXM controller has been
connected, the drivers for the USB to serial adapter may need to be installed. Access the Windows
Device Manager to check that the port is functioning correctly. If not, click the Update Drivers button to
download and install the correct drivers.

Jing Laboratory Hydroacoustic Fixture Manual Page 16 of 27


First power on the slave (right) VXM controller using the power switch on the front panel. Then power
on the master VXM controller. With both controllers powered on, the green LED on their front panels
should be illuminated.

Launch hydroacoustic_capture.m
All components are now connected and the GUI can be launched. Open MATLAB and set the Current
Folder to the folder containing hydroacoustic_capture.m. Type hydroacoustic_capture in the Command
Window. The program will launch and connect to the VXM controller and initialize the data acquisition
card. When the VXM is connected and online, the yellow LEDs on the front panels of the controllers will
illuminate. A GUI window will open, and the fixture is ready to use.

Ring Array Option


The rotary axis of the Velmex positioning system can be used to rotate the immersion ring array while
emitting and capturing acoustic data. A mount has been created to affix the rotary axis to the top of the
aquarium. Four rods attach the movable section of the rotary table to a housing that can hold one or
two partial ring arrays.

Figure 19. Fixture for mounting partial ring array and rotary table to the aquarium.

The ring array housing consists of two Delrin shells which firmly clamp the ring array(s) in place without
causing damage. To attach the ring array(s), turn the fixture upside down and remove the bottom half of
the ring array holder. Then place the ring array(s) in the top half of the shell.

Jing Laboratory Hydroacoustic Fixture Manual Page 17 of 27


Figure 20. CAD model demonstrating insertion of ring arrays into fixture.

Replace the bottom half of the shell and tighten the two connecting screw to clamp the ring array(s) in
place. The rotary axis can be controlled using the same MATLAB GUI used for the three linear axes that
control the hydrophone position. The ring array requires special hardware for transmitting signals and
capturing data, however, and must be controlled through other means.

Operation
The MATLAB GUI provides simple control of the four Velmex servo axes and the CompuScope data
acquitision card. It may be used to manually position the hydrophone within the aquarium or to perform
one- and two-dimensional scans. All important data acquisitions can be set through the GUI, including
sample rate, sample length, number of samples averaged, and trigger delay. In addition, the voltage
range (and resolution) and trigger timeout can be set by modifying the default_values.mat file offline.
Figure 21 below shows the main GUI screen.

Jing Laboratory Hydroacoustic Fixture Manual Page 18 of 27


Figure 21. Screenshot of hydroacoustic_capture.m GUI screen.

The top left window in the screen is a graph in which data obtained from the CompuScope is
automatically plotted every time it is captured. The graph axes automatically scale with each data
capture, and all captured data will fit on the graph. If manual zooming is desired, it can be accessed by
clicking on the View menu and selecting the Figure Toolbar. This will enable a toolbar at the top of the
screen with the usual MATLAB figure controls.

Manual axes controls are situated below the graph, and allow the user to move each axis incrementally
or to move to an absolute position. Each axis can also be zeroed, resetting the current position as zero
and rescaling the rest of the axis around the new zero position.

To the right of the data graph are controls for capturing and saving data. Below those controls are inputs
for initiating automated one-dimensional line scans or two-dimensional grid scans. These automated
functions systematically move the axes to points along a line or grid, stopping at each point to capture
and save data from the hydrophone.

Jing Laboratory Hydroacoustic Fixture Manual Page 19 of 27


Move Axes

Figure 22. Axis control section of main GUI screen.

Unit Selection

The first object to consider before moving the axes manually is the unit selection radio buttons, located
with the save and capture data. The unit selection (either inches or millimeters) affects the units in
which the move increment and position for each linear axis is displayed. The rotary axis (R axis) is always
displayed in degrees.

Speed Selection

Each axis has a % Speed text box that sets the speed at which the axis moves as a percentage of the
maximum speed the axis is capable of moving. The speed for each of the linear axes is set to 20 percent
of maximum by default, while the speed of the rotary axis is set to 15 percent. Changing the speed of an
axis changes the speed for any time of axis move incremental, absolute, grid scan, or line scan. The
default speeds were selected based on empirically determining the fastest speed each axis could handle.
If the axes are driven at higher speeds, they may not have enough torque to move without the stepper
motor slipping. If the motor slips, its encoder will think the axis has moved farther than it actually has,
and the position data reported by the GUI will be wrong. For this reason, it is strongly advised that you
do not increase any of the motor speeds above their default settings.

Incremental Move

The move increment (abbreviated as Move Inc in the GUI) sets the distance that an axis moves each
time one of the incremental move buttons is pressed. There are two incremental move buttons for each
axis, one button to move the axis one increment in the positive direction and one button to move the
axis one increment in the negative direction. The top row of incremental move buttons (Move Right,
Move Up, Move Back, and Rotate CW) all move their respective axes in the positive direction. The
bottom row (Move Left, Move Down, Move Forward, and Rotate CCW) move their axes in the

Jing Laboratory Hydroacoustic Fixture Manual Page 20 of 27


negative direction. The positive direction of each axis is also marked by the arrow on label of the
physical axis.

The position text box associated with each axis is updated before and after every move and will reflect
the absolute position of that axis.

Absolute Move

In addition to displaying position data every time an axis is move, the Position text boxes are editable.
The user can manually enter a desired position, then press the Goto Position button to drive the axis
to that position. All four Goto Position buttons call the same function, and the user can enter new
positions for multiple axes and click any of the four Goto Position buttons to drive all updated axes to
their new positions. Pressing the Zero Axis button will set the absolute position for that axis to zero,
creating a new reference point for absolute axis positions.

Capture Data

Figure 23. Capture and Save Data section of main GUI screen.

There are five inputs on the GUI screen that affect data capture. First, the Capture Length text box
determines the number of data points to be captured in a sample segment. The Sample Rate pulldown
menu allows the user to select the sample rate, ranging from 1 kHz to 50 MHz. The sample length, in
time, will be equal to the capture length divided by the sample rate, and the time axis will automatically
scale to display the entire sample.

The Samples to be Averaged text box tells the data acquisition card how many sample segments to
capture. The sample segments are then automatically averaged to reduce noise. Only the averaged data
set will be displayed on the graph and can be saved to disk. If averaging is not desired, set the Samples
to be Averaged text box to 1.

Every time data is captured, the first data point is based on a trigger. If the Internal trigger selection
radio button is selected, the data acquisition card looks for a rising edge greater than 10 percent of the

Jing Laboratory Hydroacoustic Fixture Manual Page 21 of 27


voltage input range. This prevents noise in the signal from triggering the acquisition. If the External
trigger selection radio button is active, the data acquisition card looks for a trigger from the waveform
generator. That trigger should be sent simultaneous to the acoustic signal being sent by the transducer
(plus or minus a slight electronic delay). By default, the voltage input range is set to 100 mV. This is the
lowest input range option and provides the highest resolution. To measure input signal with an
amplitude greater than 100 mV, the input range can be modified by loading default_values.mat. This will
load a structure called default_values into the MATLAB workspace. There is a field in the default_values
structure called input_range that is equal to the full scale range of acceptable input voltages, in
millivolts. By default, this value is set to 200, which corresponds to an input range of 100 mV. To adjust
the input range, for example, to 200 mV, enter the following:

>> load(default_values.mat)
>> default_values.input_range = 400;
>> save(default_values.mat,default_values)

There are only six valid input ranges accepted by the data acquisition card: 100 mV, 200 mV, 500 mV,
1 V, 2 V, and 5 V. Setting the input range to a value that is not one of these six will cause an error
message when the card is initialized.

When the Capture Data button is pressed, a signal is sent to the CompuScope to configure the
acquisition parameters based on the values set in the GUI and to begin the acquisition as soon as a
trigger is observed. When the data is plotted on the graph, the trigger event will always be located at
zero on the time axis.

Data capture can begin before or after the trigger based on the value entered in the Trigger-Capture
Offset text box. By default, this value is set to zero, and data capture begins at the trigger event. To
start data capture before the trigger, enter, as a negative number, the time in microseconds prior to the
trigger to start data capture. For example, to start data capture 20 microseconds before the trigger
event, enter -20 as the trigger-capture offset. When the capture button is pressed, the graph will now
begin at -20 s. The trigger event will still correspond to zero on the time axis, and the entire graph will
be filled with data. Similarly, to begin data capture after the trigger event, enter the positive number of
microseconds after the trigger that data capture should begin.

Save Data
Captured data can be saved to file by pressing the Save Data button. Data will be saved as a .mat file in
the location specified on the Save File Location button. The file will be titled with the text in the Save
Filename Prefix text box followed by a .mat extension. The GUI save function looks for an existing file
before saving, and will append an underscore followed by an integer to avoid accidentally overwriting
data. For example, if the user attempted to save acoustic_data.mat but the file already existed, the
GUI would save the file as acoustic_data_1.mat instead.

The raw data is saved as a vector named data with units in Volts. Also contained in the .mat file are
the axis positions at the time of capture (x_axis_pos, y_axis_pos, z_axis_pos, and r_axis_pos) in
either inches or millimeters as specified in the GUI. The sample rate (in samples/second) is also saved

Jing Laboratory Hydroacoustic Fixture Manual Page 22 of 27


(sample_rate) as is a vector containing the time values (in microseconds) corresponding to each data
point. This time vector (called time_vector), like the graph in the GUI, designates zero as the time of the
trigger event.

Line Scan

Figure 24. Line Scan section of main GUI screen.

The line scan function automatically performs a series of incremental moves along an axis. At each point
on the axis, data is acquired and saved to file. The line scan axis (X, Y, or Z) can be selected using the
radio buttons in the Line Scan section of the GUI screen. A line scan always begins at the current location
when the line scan button is clicked, and always moves in the positive direction of the specified axis (left
to right for the X axis, bottom to top for the Y axis, away from the transducer for the Z axis). The first
capture occurs at the current position. The hydrophone then moves one increment (as specified by the
Move Increment text box), and another measurement is taken. The number of axis moves is equal to
the value in the Number of Steps text box, and the number of measurements taken is one more than
this value since a measurement is taken at the start and end point.

As data is captured at each acquisition point, the data graph in the GUI screen automatically updates. All
captured data is automatically saved. When the line scan finishes, a .mat file is produced using the
filepath and filename prefix specified in the GUI. The .mat file contains a two-dimensional matrix entiled
line_data in which all data is stored. The first row of the matrix includes the data, in volts, for the first
acquisition point. The second row has the data for the second acquisition point, and so forth. A vector is
saved with the time, in microseconds, corresponding to each data point in the capture. The axis
positions of the starting point are contained in a vector called line_start. The axis used for the scan (X,
Y, or Z) is saved as scan_axis_string. The move increment is saved as line_scan_inc. Sample rate is
saved, in samples/second, in the sample_rate variable.

Jing Laboratory Hydroacoustic Fixture Manual Page 23 of 27


Grid Scan

Figure 25. Grid Scan section of main GUI screen.

Data can also be automatically captured and saved using a grid scan along two dimensions. The first step
in executing a grid scan is selecting the plane dimensions for the scan. For example, selecting an XY grid
plane will create a scan along the X and Y axes. The move increment and number of steps in the grid can
be set independently for each axis. The move increment and grid size boxes will be grayed out for the
axis not used in the grid plane. The grid scan always uses the current point as the center of the grid, and
will return to that point upon finishing the grid scan.

Data captured during a grid scan will be automatically displayed on the GUI graph and saved in a .mat
file according to the filepath and filename prefix provided. The .mat file includes all of the grid scan data
in a three-dimensional matrix called grid_data. The first dimension of the grid_data matrix
corresponds to the first dimension of the grid plane (X axis for XY or XZ grid scans and Y axis for YZ grid
scans). The second dimension corresponds to the second dimension of the grid plane. Data is arranged
chronologically along the third dimension of the grid_data matrix.

Other data saved in the .mat file includes time data (time_vector) in microseconds that corresponds to
each point along the third dimension of the grid_data matrix. The axes positions at the center point of
the grid scan are included in a vector entitled grid_center. Other variables saved in the .mat file
include the grid size and increment for each linear axis, and the sample rate of the data capture.

Troubleshooting
The solutions to some common problems are included in this section. The list of errors in this section is
by no means exhaustive. For additional help, see the Velmex VXM Controller Users Manual and GaGe
CompuScope MATLAB SDK Manual included in the attachments section.

Jing Laboratory Hydroacoustic Fixture Manual Page 24 of 27


GaGe MATLAB SDK not found

If the application cannot find a function for the data acquisition card (likely beginning with a CsMl
prefix), first check that the MATLAB SDK has been installed. By default, the SDK is installed in:

C:\Program Files (x86)\Gage\CompuScope\CompuScope MATLAB SDK

If the MATLAB SDK is not installed, use the CD included in the attachments section to install the MATLAB
SDK. If the MATLAB SDK is installed, it may not be included in the MATLAB search path. To add it to the
search path, perform the following tasks:

1. Open MATLAB
2. Under the File Menu select Set Path
3. Click the Add with Subfolders button and browse to the location of the GaGe MATLAB SDK. By
default, the SDK is located at:
C:\Program Files (x86)\Gage\CompuScope\CompuScope MATLAB SDK
4. Click OK.
5. Check that the new file path appears in the window along with subfolders entitled Main,
CsMl, and Adv.
6. Click the Save button.

If the problem persists, use Windows Device Manager to check that the CompuScope drivers are
correctly installed. If not, use the included CD to install them.

Cannot Open Communication with VXM Controller

First, ensure that the VXM controller is correctly connected to the computer and that both VXM
controllers are powered on. Access the Windows Device Manager and locate the COM port used for
serial communication. Ensure that the correct drivers are installed for USB to serial communication; if
not, click Update Drivers to download and install the latest drivers.

Check that MATLAB has not already opened the serial communications port using the instrfind function.
If any serial ports are open, close them using the fclose function. If the problem persists, try power
cycling the VXM controllers, turning on the right (slave) controller before the left. Once the green LEDs
illuminate on each controller, try launching hydroacoustic_capture.m.

If communications still cannot be established with the VXM controllers, try manually updating the COM
port in the default_values.mat file. First, use Windows Device Manager to identify the COM port used
for serial communication with the VXM controllers. Load default_values.mat into the MATLAB
workspace. Use the serial function to create a new COM port and save it to the velmex_controller field.
For example, to set the communications port to COM1, type the following into the MATLAB Command
Window:

>> load(default_values.mat)
>> s = serial(COM1);

Jing Laboratory Hydroacoustic Fixture Manual Page 25 of 27


>> default_values.velmex_controller = s;
>> save(default_values.mat,default_values);

Velmex Linear Axes Squeal

The lead screws on the linear axes may make excessive noise if they are driven too rapidly. For this
reason, it is recommended that the user keep the speed of the linear axes at 20 percent or lower. The
periodic application of a generic low temperature lubricant directly to the lead screw may also help
reduce torque to the motor and cut noise from the axes.

The Z axis may also make noise if the screws connecting it to the base plate are overtightened. This may
cause a slight bending of the lead screw. Try loosening the mounting screws to reduce noise.

Default Values File Not Found

Every time the GUI is closed, it saves a number of current GUI values to a file called
default_values.mat located at the save filepath as hydroacoustic_capture.m. If this file is
accidentally deleted, a new one will be generate the next time the program is launched. Default values
will be reset to the first time the program was launched, and the program should operate normally.

Limit switches not set correctly

Each linear axis has two limit switches governing the range of motion. If these switches are not correctly
set or the aquarium is moved in relation to the motion control system, it may become possible for the
user to crash the axes into the aquarium. Carefully check the location of the limit switches periodically
and adjust them as necessary, by loosening the set screws, sliding them along the positioning rod, and
retightening the set screws.

Jing Laboratory Hydroacoustic Fixture Manual Page 26 of 27


Attachments
1. MATLAB Code
2. Velmex VXM Controller Users Manual
3. Gage MATLAB SDK Manual
4. Mechanical Drawings and SolidWorks Files of Custom Components
5. Purchase Orders
6. Required Software

Jing Laboratory Hydroacoustic Fixture Manual Page 27 of 27

S-ar putea să vă placă și