Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Calibration
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
White Rabbit Calibration
Commits
f28cf50b
Commit
f28cf50b
authored
Feb 22, 2018
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced 4 wire 100 ohm and PT_100 function and do a direct temp measurement on the DMM
parent
2278009c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
34 deletions
+4
-34
wr_serial.py
sw/insitu_alpha/wr_serial.py
+4
-34
No files found.
sw/insitu_alpha/wr_serial.py
View file @
f28cf50b
...
...
@@ -239,36 +239,6 @@ def get_statusline(ser_slave):
return
(
stat_lst
)
############################################################################
def
pt_100
(
ohm
):
"""
Calculates the temperature for a given measured PT-100 resistance.
ohm -- Ohmic value of the PT-100
"""
# Rt = R0.(1 + A.t + B.t^2 + C.(t-100).t^3)
R0
=
float
(
100.0
)
A
=
float
(
3.9083e-3
)
B
=
float
(
-
5.7750e-7
)
# C = -4,1430e-12 for t < 0 degrees / 0.0 for t >= 0 degrees
# For C = 0 =>
temp
=
(
-
R0
*
A
+
(
R0
**
2
*
A
**
2
-
4
*
R0
*
B
*
(
R0
-
ohm
))
**
0.5
)
/
(
2
*
R0
*
B
)
return
(
temp
)
############################################################################
def
get_spool_temp
(
dmm
):
"""
Read the fiber spool temperature with the Digital Multimeter
"""
ohm
=
float
(
dmm
.
ask
(
"READ?"
))
return
(
pt_100
(
ohm
))
###############################################
# Main
...
...
@@ -347,10 +317,10 @@ if __name__ == "__main__":
print
(
dmm
.
ask
(
"*IDN?"
))
# Returns 'Keysight Technologies,34465A,MY57501367,A.02.14-02.40-02.14-00.49-03-01'
# Configure for 4 wire resistance range 100 ohm
dmm
.
write
(
"CONFigure:FRESistance 100"
)
# Configure for 4 wire temperature measurement
dmm
.
write
(
"SAMPle:COUNt 1"
)
#print("Fiber Spool temperature", get_spool_temp(dmm))
dmm
.
write
(
"UNIT:TEMPerature C"
)
print
(
"Fiber Spool temperature"
,
float
(
dmm
.
ask
(
"MEAS:TEMP? FRTD"
)))
ser_slave
=
serial
.
Serial
()
...
...
@@ -512,7 +482,7 @@ if __name__ == "__main__":
crtt_mean
=
numpy
.
mean
(
crtt
[(
crtt_skip
+
1
):])
# skip first measurements
if
args
.
t
!=
None
:
# open and configue Digital Multimeter with attached PT100
spool_temp
=
get_spool_temp
(
dmm
)
spool_temp
=
float
(
dmm
.
ask
(
"MEAS:TEMP? FRTD"
)
)
print
(
"sfp_channel: "
,
sfp_ch
,
"itu_channel: "
,
ch
,
"crtt avarage over "
+
str
(
crtt_measurement
)
+
" measurments: "
+
str
(
crtt_mean
)
+
" fiber-spool temp: "
+
str
(
spool_temp
))
data_file
.
write
(
str
(
sfp_ch
)
+
", "
+
str
(
ch
)
+
", "
+
str
(
wavelength
)
+
", "
+
str
(
crtt_mean
)
+
", "
+
str
(
curr_drxm
)
+
", "
+
str
(
curr_drxs
)
+
", "
+
str
(
spool_temp
)
+
", "
+
str
(
curr_temp
)
+
"
\n
"
)
...
...
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