Comments (8)
Also need to teach Mr. Freeze about the Lake Shore 331.
from mrfreeze.
The Varian is a little tricky because it requires a handshake;
Client: PR1 <CR> [<LF>]
Controller Response: <ACK> <CR> <LF>
Client: <ENQ>
Controller Response:: 0,8.3400E-03 <CR> <LF>
Client: <ENQ>
Controller Response:: 1,8.0000E-04 <CR> <LF>
where the response is of the form
x,sy.yyyyEsyy <CR><LF>
where x == Status, defined as
0 –> Measurement data okay
1 –> Underrange
2 –> Overrange
3 –> Sensor error
4 –> Sensor off
5 –> No sensor
6 –> Identification error
7 –> Error FRG-720, FRG-730
and the rest is the actual pressure reading, in exponential notation.
from mrfreeze.
It's also a little tricky because by default, it'll just start spewing values at you once per second; from the datasheet
When the AGC-100 is put into operation, it starts
transmitting measured values in intervals of 1 s. As soon
as the first character is transferred to the AGC-100, the
automatic transmission of measured values stops. After
the necessary inquiries or parameter modifications have
been made, the transmission of measured values can be
started again with the COM command
from mrfreeze.
Seems like the best path forward is to do something like this:
S<CR><LF>
<ETX><CR><LF>
PR1<CR><LF>
[check for an ACK]
<ENQ><CR><LF>
[check the status and parse the actual measurement]
That sends an initial character to stop the COM
spew, clear the input buffer with the ETX
command, then actually get the measurement with the PR1
command.
from mrfreeze.
LS331 was simple enough, but I've currently got it running on the side for CSHELL. The Varian is still TBD, I've been using the world's shittiest serial <-> USB converters and I can't get one to actually transmit. But I don't think it'll be any more complicated than what I suspected above.
from mrfreeze.
Fun fact from the future - the cable I was trying to use for the Varian was really an unmarked null modem cable (or it could have been one of the 'custom pinout' APC ones), so it would have never worked. Buzzed the cables and tried to label them appropriately, and picked up a couple of "known good" regular ones so hopefully I won't make that same bonehead mistake in the future.
from mrfreeze.
Also need to add in the Scientific Instruments 9620-1 that I got going during the last cool down/warm up.
from mrfreeze.
e.g.
# Lake Shore 331
lsport = 4001
lsterm = "\r\n"
lsdict = {"TempA": "KRDG? A",
"TempB": "KRDG? B",
"Setp1": "SETP? 1",
"HtrL1": "HTR?",
"Setp2": "SETP? 2",
"HtrL2": "AOUT?"}
# Varian AGC-100 Controller
vport = 4002
vterm = "\r\n"
enq = "\x05"
vdict = {"Pressure": ["\x03", "PR1", enq]}
# Scientific Instruments 9620-1
siport = 4003
siterm = "\r"
sidict = {"Temp1": "T",
"Temp2": "t",
"Setp": "S",
"Htr": "H"}
It'd be nice to leave the port settings somewhere easy to find too since they're abstracted away by the MOXA box.
from mrfreeze.
Related Issues (16)
- Proper packaging
- Documentation!
- Parsers need rails HOT 3
- Planning out the 'gettemp' replacement HOT 5
- Figure out log file support
- Figure out enabling/disabling modules without restarting manually HOT 5
- Remote/broker command set definition HOT 17
- Tie broker subscriptions to 'enabled' statuses? HOT 1
- Query all enabled devices at startup HOT 1
- Migrate old instrument temperature data HOT 2
- Fix hardcoded config items HOT 2
- Calculate and store temperature ramp rates
- Fix up LOIS log parsing more HOT 1
- Sort out serComm HOT 4
- Fix listener HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mrfreeze.