Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL Blocking - Gateware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Conv TTL Blocking - Gateware
Commits
eb3f1987
Commit
eb3f1987
authored
Feb 17, 2017
by
Maciej Sumiński
Committed by
Projects
Feb 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc/gw-test-procedure: pulsegen description
parent
ca007ca1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
147 additions
and
3 deletions
+147
-3
gw-test-procedure.bib
doc/gw-test-procedure/gw-test-procedure.bib
+5
-0
gw-test-procedure.tex
doc/gw-test-procedure/gw-test-procedure.tex
+142
-3
No files found.
doc/gw-test-procedure/gw-test-procedure.bib
View file @
eb3f1987
...
...
@@ -7,3 +7,8 @@
title = {{Conv TTL Blocking Repository on OHWR}},
howpublished = {\url{http://www.ohwr.org/projects/conv-ttl-blo/repository}}
}
@misc{33250a-ug,
title = {{Agilent 33250A User's Guide}},
howpublished = {\url{http://cp.literature.agilent.com/litweb/pdf/33250-90002.pdf}}
}
doc/gw-test-procedure/gw-test-procedure.tex
View file @
eb3f1987
...
...
@@ -751,16 +751,155 @@ Instructions for filling in the table:
Instructions for filling in the table:
\begin
{
itemize
}
\item
Make sure the glitch filter
is
\textbf
{
O
N
}
\item
Make sure the glitch filter
switch is set to
\textbf
{
GF E
N
}
\item
Following the test procedure in Section~
\ref
{
sec:proc
-
ttlbar
-
blo
}
(
under step~
\ref
{
item:ttlbar
-
proc
}
)
,
tick each box if the output is as expected
\item
Start with inputting a signal from the pulse generator on the front panel,
then after validation, change the input to the rear panel
\item
Tick the
\textbf
{
TTL
}
boxes if the TTL
-
BAR output on the front panel is as specified
in step
\ref
{
item:ttlbar
-
meas
-
ttl
-
out
}
in step
~
\ref
{
item:ttlbar
-
meas
-
ttl
-
out
}
\item
Tick the
\textbf
{
Blo
}
boxes if the blocking output on the rear panel
is as specified in step
\ref
{
item:ttlbar
-
meas
-
blo
-
out
}
is as specified in step~
\ref
{
item:ttlbar
-
meas
-
blo
-
out
}
\end
{
itemize
}
\newpage
\section
{
Pulsegen script
}
\subsection
{
Introduction
}
Some of the tests require a generator capable of outputting a burst of more
than one million pulses. It is not a common feature for a signal generator,
especially given such high number of pulses.
Agilent
33250
A was the only signal generator in the lab, capable of generating
pulse bursts, but the pulse count is limited to one million. To overcome this
restriction, one can create an arbitrary waveform containing multiple pulses and
repeat the signal as many times as required.
Creating an arbitrary waveform using the signal generator interface is a
tedious task. To automate the process, a Python script called
\textit
{
pulsegen
}
has been developed.
\subsection
{
Principle of operation
}
\textit
{
Pulsegen
}
connects to Agilent
33250
A signal generator via its serial
port and uses SCPI commands~
\cite
[
ch.
4
]
{
33250
a
-
ug
}
for configuration.
The script allows to select the number of pulses, pulse duration, and repetition
rate. When the number of requested pulses is less or equal to one million, the
output signal type is set to pulse. For other cases arbitrary waveform is selected.
In the latter case, the script generates appropriate waveform by concatenating
multiple pulses of requested width.
\textbf
{
IMPORTANT:
}
If the number of requested pulses is high enough to use the arbitrary
waveform, it may happen that the actual number of pulses will be rounded to the
number of pulses in the arbitrary waveform. It is caused by the way the signal
is generated
(
a number of pulses in arbitrary waveform repeated multiple times
)
.
Once the generator is configured, the script checks if any errors occurred. It
may take a several second to configure the generator, if the arbitrary waveform
it to be used. It is normal to hear relays clicking, but a beep sound usually
indicates an error.
If there were not any problems, the output is enabled and the signal is
triggered. Scripts works in blocking mode, meaning it finishes its operation
only after the signal generation is completed.
\subsection
{
Usage
}
Connect Agilent
33250
A to a Linux PC via a null
-
modem
cable~
\cite
[
p.
221
]
{
33250
a
-
ug
}
to the PC serial port or a USB
-
to
-
serial
converter. If you use the converter, be sure it can be set to use
\textbf
{
RTS
/
CTS
}
handshake.
Configure the generator RS
-
232
interface using the front panel interface. Press
\textit
{
Utility
}
button, then choose
\textit
{
I
/
O
}
menu~
\cite
[
p.
45
]
{
33250
a
-
ug
}
.
Be sure that:
\begin
{
itemize
}
\item
\textit
{
I
/
O port
}
tab has
\texttt
{
RS
-
232
}
option highlighted
\item
\textit
{
Baud Rate
}
is set to
\texttt
{
115200
}
\item
\textit
{
Parity
/
\#
Bits
}
is set to
\texttt
{
None
/
8
bits
}
\item
\textit
{
Handshake
}
is set to
\texttt
{
RTS
}
\end
{
itemize
}
Run the script specifying the requested signal parameters. You may also
override the default settings for the serial port interface
(
device
/
dev
/
ttyUSB
0
,
115200
baud
)
.
List of possible arguments:
\begin
{
itemize
}
\item
{
\texttt
{
-
b|
--
baud
=
}}
serial port baud rate
(
default:
115200
)
\item
{
\texttt
{
-
d|
--
device
=
}}
serial port device path
(
default:
/
dev
/
ttyUSB
0
)
\item
{
\texttt
{
-
c|
--
count
=
}}
number of requested pulses
(
default:
2000000
)
\item
{
\texttt
{
-
f|
--
freq
=
}}
frequency of the pulses
[
Hz
]
(
default:
2000000
)
\item
{
\texttt
{
-
w|
--
width
=
}}
pulse duration
[
s
]
(
default:
250
e
-
9
s
)
\item
{
\texttt
{
-
h|
--
help
}}
shows this information
\end
{
itemize
}
An example
(
2000
pulses at
1
MHz
)
:
\begin
{
verbatim
}
.
/
pulsegen.py
-
c
2000
-
f
1
e
6
\end
{
verbatim
}
\subsection
{
Troubleshooting
}
\begin
{
itemize
}
\item
{
No module named 'serial'
}
If you receive an error, similar to the one below:
\begin
{
verbatim
}
Traceback
(
most recent call last
)
:
File ".
/
pulsegen.py", line
45
, in <module>
import serial
ModuleNotFoundError: No module named 'serial'
\end
{
verbatim
}
Indicates that you are missing the pyserial package. Please install it using:
\begin
{
verbatim
}
sudo pip install pyserial
\end
{
verbatim
}
\item
{
Cannot access a serial port device
}
If you get an error:
\begin
{
verbatim
}
could not open port
/
dev
/
ttyUSB
0
:
[
Errno
13
]
Permission denied: '
/
dev
/
ttyUSB
0
'
\end
{
verbatim
}
Then it means that your permissions are not sufficient to use the serial port
converter. You can either run scripts as root, or
(
recommended
)
add udev rules which
will grant you the required permissions.
To add a udev rule, create a file named
/
etc
/
udev
/
rules.d
/
99
-
serial.rules and put
the following contents
(
requires root privilege
)
:
\begin
{
verbatim
}
KERNEL
==
"ttyUSB
*
", MODE
=
"
0666
"
KERNEL
==
"ttyACM
*
", MODE
=
"
0666
"
\end
{
verbatim
}
Once saved, you need to reload the udev rules by executing the following command:
\begin
{
verbatim
}
sudo udevadm control
--
reload
\end
{
verbatim
}
The last step is to reconnect the serial port converter.
\end
{
itemize
}
\end
{
appendices
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment