This page is a brief outline of the necessary CGI scripts that will be used for the implementation of the web interface of the Cryo Board.

Required Scripts Thought of Thus Far

drive_set

The drive_set script configures the signal processing path consisting of the DAC, ADC, sinusoidal signal generator and related sequencers. This signal path has two classes of parameter: those which are associated with a particular channel (e.g. drive voltage), and those which affect the entire signal path. The drive_set script configures both types of parameter; the channel argument should only be provided when the parameter is associated with a particular channel. (To supply channel for a non-associative parameter is an error and will be reported to avoid confusion.)

Inputs

CGI Parameter Description Format
channel Channel to modify (when appropriate) Integer, 0..15
type Sensor type String (diode or rtd)
amplitude Drive current Microamps, floating-point

Outputs

  • result: { code: "OK"/"ERROR", message: "free-form message" }

Notes

  • What about frequency?

drive_get

Reads back drive settings from firmware. All drive settings are returned. (Returning more information than required is likely to require less resources than multiple requests for smaller information parcels.)

Inputs

CGI Parameter Description Format
N/A

Outputs

  • result: { code: "OK"/"ERROR", message: "free-form message" }

sense_get

Reads back current sense values from the ADC. As above, sense values for all channels are returned.

Inputs

CGI Parameter Description Format
N/A

Outputs

  • result: { code: "OK"/"ERROR", message: "free-form message" }
  • channels: { 0: { volts: 0.123, counts: 456, kelvin: 789 } }, ... }

housekeeping

Retrieves housekeeping values from board. (Voltage regulator and temperature readouts. See how this is done on the DfMUX.)

Inputs

CGI Parameter Description Format

Outputs

  • result: { code: "OK"/"ERROR", message: "free-form message" }

Comments

  • Results provided both in ADC counts (as on the DfMUX) and in "human" units (Degrees celcius, Volts) to avoid multiple conversions in Python, JavaScript
  • Housekeeping values are slowly time-varying.
  • Data:
    • Timestamp
    • Voltages
    • Temperatures

system

Retrieves static values from board, reflecting firmware and hardware versions.

Inputs

CGI Parameter Description Format

Outputs

  • result: { code: "OK"/"ERROR", message: "free-form message" }

Comments

  • Only static results are retrieved by this script, since the results may be cached indefinitely by the client.
  • This is the same as the sysutils CGI script on the DfMUX, renamed to clarify
  • Data:
    • Board serial number

Required Script Description Required Variables Description Type
heater_set (up to 8 channels 0-7) sets the current in the heater circuits set_heater_current (micro amps) sets the value of the current supplied through the heater circuit input
heater_measure (up to 8 channels 0-7) will be a check on the heater circuit making sure that we are supplying the current we think we are to the places we think we are voltage_measure(volts) the voltage measured across the resistor in the heater circuit output
voltage_converted_current(amps) the converted voltage to current i.e. putting in the value of the resistor in the heater circuit. output
cryo_fifo_get (first 3 variables have 16 channels 0-15 otherwise one per board) retrieves the information for the fifo file adc_count (adc) the adc of the signal after passing through the sensor output
adc_converted_voltage (volts) conversion of the adc into a measure of the voltage output
voltage_converted_temperature (Kelvin) conversion of the voltage into actual temperature using a conversion table for the given sensor output
board_temp (Kelvin) read out from the ADT 7301 output
time_stamp will give the time stamp of the last readout for the board output
cryo_program (associated with the program page on line takes one of 3 scripts) This script will take input scripts from the user and program either the flash, the fpga, or the fridge cycle flash_program(MCS file) Will download an mcs file to the flash input
fpga_program (bit) takes a bit file and programs the fpga input
fridge_program(python or c or something similar in the end) takes some sort of script to program input
streamer (for all 8 heaters and 16 drive/sense?) this cgi will turn off and on the streamer and will determine where to stream to streamer_status(boolean) either on or off input
ip_address tells which IP to stream to input
port tells which port to stream to at given IP input
streamer_mode (boolean) either multicast or unicast input


Free Association

  • Labels for channels: "channel 1" is not helpful, but "4k_rtd" is.
    • Channels are still referenced by number (e.g. 0-15) under the hood
    • For the first cut, label them the same way.
    • Eventually, add a "profile" of some sort that assigns labels to channels in the web interface
    • In Python, the same reverse mapping may be performed via dictionary lookups.


This topic: CryoElectronics > DigitalFMux > CryoCgiScripts Topic revision: r10 - 2009-08-25 - GraemeSmecher
© 2020 Winterland Cosmology Lab, McGill University, Montréal, Québec, Canada