Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL Blocking
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
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
Commits
7f4ae8c2
Commit
7f4ae8c2
authored
Feb 03, 2017
by
Projects
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pulse_gen.py: Additional comments
parent
c1ff389d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
pulse_gen.py
software/utils/pulse_gen.py
+8
-2
No files found.
software/utils/pulse_gen.py
View file @
7f4ae8c2
...
...
@@ -11,7 +11,8 @@
#
# description:
# This script is used to configure an Agilent 33250A signal generator
# to generate an arbitrary burst of pulses via serial port interface.
# to generate an arbitrary burst of pulses via serial port interface
# (SCPI commands).
#
# Be sure that both the generator and the serial port have the same settings:
# - **RTS/CTS handshake enabled**
...
...
@@ -19,6 +20,9 @@
# - parity bit disabled
# - 1 bit start, 1 bit stop,
#
# SCPI commands for the generator are described in the Agilent 33250A manual
# (http://cp.literature.agilent.com/litweb/pdf/33250-90002.pdf)
#
#===============================================================================
# GNU LESSER GENERAL PUBLIC LICENSE
#===============================================================================
...
...
@@ -157,6 +161,7 @@ if(count <= MAX_COUNT):
ser
.
write
(
b
'PULS:PER
%
G
\r\n
'
%
(
1.0
/
freq
))
ser
.
write
(
b
'FUNC:SHAP PULS
\r\n
'
)
else
:
# store the original values to compare them against the requested ones
orig_count
=
count
orig_width
=
width
...
...
@@ -227,7 +232,7 @@ ser.write(b'BURS:NCYC %d\r\n' % count)
ser
.
write
(
b
'BURS:PHAS 0
\r\n
'
)
ser
.
write
(
b
'BURS:STAT ON
\r\n
'
)
# check errors queue
# check errors queue
and printout error messages if any
error
=
False
while
True
:
ser
.
write
(
b
'SYST:ERR?
\r\n
'
)
...
...
@@ -262,6 +267,7 @@ while True:
print
(
'ERROR: Operation interrupted (status:
%
s)'
%
status
)
break
# disable output
ser
.
write
(
b
'OUTP OFF
\r\n
'
)
ser
.
close
()
...
...
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