Prog - Manual - Us-Array - Ug - v0 Lecour
Prog - Manual - Us-Array - Ug - v0 Lecour
US-ARRAY
Programming user guide
(Win dll, matlab, labview)
V1.0
Init_USB
Description :
Initialise the USB3 link
Use :
With : DLL US-Compaq (C:\US-Compact\US-
Compact.dll)
Init_USB(Device_Number.l)
Device_Number.l : set the number of usb device (0 for one us-array)
With Matlab
Declaration :
loadlibrary('C:\US-Compaq\US-Compact.dll','C:\US-Compaq\US-
Compact.h','alias','MyDLL');
With Labview
Open_USB
Description :
Open the USB3 link
Use :
With : DLL US-Compaq (C:\US-Compact\US-
Compact.dll)
Open_USB(Device_Number.l)
Device_Number.l : set the number of usb device (0 for one us-array)
With Matlab
Declaration :
loadlibrary('C:\US-Compaq\US-Compact.dll','C:\US-Compaq\US-
Compact.h','alias','MyDLL');
With Labview
Close_USB
Description :
Close the USB3 link
Use :
With : DLL US-Compaq (C:\US-Compact\US-
Compact.dll)
Close_USB()
Device_Number.l : set the number of usb device (0 for one us-array)
With Matlab
Declaration :
loadlibrary('C:\US-Compaq\US-Compact.dll','C:\US-Compaq\US-
Compact.h','alias','MyDLL');
Init_Device
Description :
Initialise the USB3 link
Use :
With : DLL US-Compaq (C:\US-Compact\US-
Compact.dll)
Init_Device(Device_Number.l)
Device_Number.l : set the number of usb device (0 for one us-array)
With Matlab
Declaration :
loadlibrary('C:\US-Compaq\US-Compact.dll','C:\US-Compaq\US-
Compact.h','alias','MyDLL');
With Labview
GAIN
Description :
Set the amplifiers gains to a selected value. Up to 128 values per channel
can be programmed to fit with the 128 sequences.
Features :
Range : 0 to 80 dB
Step : 0.1 dB
Use :
With : DLL US-Compaq (C:\US-Compact\US-
Compact.dll)
Gain(Device_Number.l,Channel.a,*Tab_In)
Device_Number.l : set the number of usb device (0 for one us-array)
Channel.a : set the channel number (1 to 32)
Tab In : A table filled with a maximum of 128 gain values corresponding
to the 128 sequences. Each gain value is a 32 bits Float.
With Matlab
Declaration :
loadlibrary('C:\US-Compaq\US-Compact.dll','C:\US-Compaq\US-
Compact.h','alias','MyDLL');
With Labview
Sampling_Delay
Description :
Set a constant delay on all receivers. The value is apply for all the
sequences at the same value.
Features :
Range : 0 to 800 µS
Step : 0.0125 µS
Use :
With : DLL US-Compaq (C:\US-Compact\US-
Compact.dll)
Sampling_Delay(Device_Number.l,Delay.u)
Device_Number.l : set the number of usb device (0 for one us-array)
Delay.u : value from 0 to 65535, (delay= 0.0125 * Delay.u). Value is
unsigned 16
With Matlab
Declaration :
loadlibrary('C:\US-Compaq\US-Compact.dll','C:\US-Compaq\US-
Compact.h','alias','MyDLL');
With Labview
Receiver_Delays
Description :
Set receivers delays for focusing. A table containing up to 128 values is
sent on each channel. First value will be used for sequence 1, second
value for sequence 2,…… to 128 sequences max.
Features :
Range : 0 to 800 µS
Step : 0.0125 µS
Use :
With : DLL US-Compaq (C:\US-Compact\US-
Compact.dll)
Receiver_Delays(Device_Number.l,Channel.a,*Tab_In)
Device_Number.l : set the number of usb device (0 for one us-array)
Channel.a : set the channel number (1 to 32)
*Tab_In : Table of delays for all sequences. Each value is unsigned 16.
With Matlab
Declaration :
loadlibrary('C:\US-Compaq\US-Compact.dll','C:\US-Compaq\US-
Compact.h','alias','MyDLL');
With Labview
Transmitter_Delays
Description :
Set transmitters delays for focusing. A table containing up to 128 values
is sent on each channel. First value will be used for sequence 1, second
value for sequence 2,…… to 128 sequences max.
Features :
Range : 0 to 800 µS
Step : 0.0125 µS
Use :
With : DLL US-Compaq (C:\US-Compact\US-
Compact.dll)
Transmittter_Delays(Device_Number.l,Channel.a,*Tab_In)
Device_Number.l : set the number of usb device (0 for one us-array)
Channel.a : set the channel number (1 to 32)
*Tab_In : Table of delays for all sequences. Each value is unsigned 16.
With Matlab
Declaration :
loadlibrary('C:\US-Compaq\US-Compact.dll','C:\US-Compaq\US-
Compact.h','alias','MyDLL');
With Labview
Transmitters_Waveforms
Description :
This function allows to program waveforms on each transmitter.
For each channel a table is sent to the hardware. It contains the shape of
each waveform for all the sequences. This function must be used with
the « size_wave » function wich set the lenght of the wave for the
sequences.
Example :
size wave = 12 (number of values sent to define the waveforms)
EXAMPLE 1
Table Values :
1
1024 + 10
2048 +10
9
1
1024+10
2048+5
10
1
1024+5
2048+20
1
EXAMPLE 2
Table Values :
1
1024 + 9
2048 +9
1
1
1024+9
2048+9
1
1
1024+9
2048+9
1
Features :
Step size : 25 nS
Memory size : 16384 Values for each channel
Use :
With : DLL US-Compaq (C:\US-Compact\US-
Compact.dll)
Transmitter_Wave(Device_Number.l,Channel.a,*Tab_In)
Device_Number.l : set the number of usb device (0 for one us-array)
Channel.a : set the channel number (1 to 32)
*Tab_In : Table of waves values for all sequences. Each value is unsigned
16.
With Matlab
Declaration :
loadlibrary('C:\US-Compaq\US-Compact.dll','C:\US-Compaq\US-
Compact.h','alias','MyDLL');
Tab_In(2) = 20+1024;
Tab_In(3) = 20+2048;
Tab_In(4) = 1;
[Retour] =
calllib('MyDLL','Transmitter_Wave',Device_Number,Channel,Tab_In);
Tab_In = ones(1,135168,'uint16');
end
With Labview
Size_Wave
Description :
Set the length of the transmitter wave (in words) for each sequence.
Use :
With : DLL US-Compaq (C:\US-Compact\US-
Compact.dll)
Size_Wave(Device_Number.l,Size.u))
Device_Number.l : set the number of usb device (0 for one us-array)
Size.u : value from 4 to 16384
With Matlab
Declaration :
loadlibrary('C:\US-Compaq\US-Compact.dll','C:\US-Compaq\US-
Compact.h','alias','MyDLL');
[Retour] = calllib('MyDLL','Size_Wave',Device_Number,Size_Wave);
With Labview
Sampling_Freq
Description :
Set the sampling frequency for the ADC .
1-> 80 MHz
2-> 40 MHz
4-> 20 MHz
8-> 10 MHz
Use :
With : DLL US-Compaq (C:\US-Compact\US-
Compact.dll)
Sampling_Freq(Device_Number.l,Freq.u)
Device_Number.l : set the number of usb device (0 for one us-array)
Freq.u : value 1 or 2 or 4 or 8
With Matlab
Declaration :
loadlibrary('C:\US-Compaq\US-Compact.dll','C:\US-Compaq\US-
Compact.h','alias','MyDLL');
With Labview
Frame_Mux
Description :
Programs the multiplexer 32 -> 64 channels. For Each sequence a 64 bits
word is applied at the input of the multiplexer. Each bit drives a switch
of the multiplexer. According to the following drawing
A table composed with all the 64 bits words is sent by calling the DLL. A
64 bits word is composed with four 16 bits words (LSB,LSB-1,MSB-
1,MSB). To program all sequences (64) the table size is 256 values.
Use :
With : DLL US-Compaq (C:\US-Compact\US-
Compact.dll)
Frame_Mux (Device_Number.l,*Tab_In)
Device_Number.l : set the number of usb device (0 for one us-array
*Tab_In : Table of multiplexer control words (see before for description)
With Matlab
Declaration :
loadlibrary('C:\US-Compaq\US-Compact.dll','C:\US-Compaq\US-
Compact.h','alias','MyDLL');
j = 0;
for i=1:128
Tab_In(i+j) = i; %
Tab_In(i+1+j) = 0; %
Tab_In(i+2+j) = 0; %
Tab_In(i+3+j) = 0; %
j = j + 3;
end
[Retour] = calllib('MyDLL','Frame_Mux',Device_Number,Tab_In);
With Labview
Data_RF
Description :
This function must be used to acquire RF raws sampled by US-ARRAY
CANs. Calling this function returns the RF rows of the 32 Channels. Each
RF signal is 4096 samples long. Each sample is a 16 bits (U16) word but
the sample is on 10 bits (Six last bits are set to 0) coded from 0 to 1023.
The size of the returned table is 4096 * 32 = 131 072 words:
0 - RF channel 1
4096 - RF channel 2
8192 - RF channel 3
…
..
126 976 – RF channel 32
Use :
With : DLL US-Compaq (C:\US-Compact\US-
Compact.dll)
Data_RF (Device_Number.l,*Tab_out)
Device_Number.l : set the number of usb device (0 for one us-array)
*Tab_out: Table of samples as descripted before (size: 131072).
With Matlab
Declaration :
loadlibrary('C:\US-Compaq\US-Compact.dll','C:\US-Compaq\US-
Compact.h','alias','MyDLL');
tStart = tic;
xlabel('Samples','FontSize',14);
ylabel('Volts','FontSize',14);
drawnow;
With Labview