Code Monkey home page Code Monkey logo

Comments (8)

astrobokonon avatar astrobokonon commented on June 25, 2024

Also need to teach Mr. Freeze about the Lake Shore 331.

from mrfreeze.

astrobokonon avatar astrobokonon commented on June 25, 2024

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.

astrobokonon avatar astrobokonon commented on June 25, 2024

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.

astrobokonon avatar astrobokonon commented on June 25, 2024

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.

astrobokonon avatar astrobokonon commented on June 25, 2024

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.

astrobokonon avatar astrobokonon commented on June 25, 2024

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.

astrobokonon avatar astrobokonon commented on June 25, 2024

Also need to add in the Scientific Instruments 9620-1 that I got going during the last cool down/warm up.

from mrfreeze.

astrobokonon avatar astrobokonon commented on June 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.