esrf

Beamline Instrument Software Support
SPEC Macro documentation: [ Macro Index | BCU Home ]

NHQ.mac
See other macros in category: Other hardware
Description:
    Support for the NHQ high voltage powersupply
Documentation:
    DESCRIPTION
    The following set of macros allow the user to interrogate the state, read and change the voltage setting on an NHQ high voltage powersupply. It has been tested on NHQ204M; NHQ??? It should work with NHQ : 102M 103M 104M 105M 106L 202M 203M 204M 205M 206L.

    SETUP
    The RS232 serial line parameters are:
    - 8 bits
    - no parity
    - 1 stop bit
    - 9600 bauds
    9600 raw in SPEC.

Macros:
    nhq_setup
    Usage: nhq_setup [mot_mnemonic] [serial line] [channel]
    setup NHQ mnemonic, channel and serial_line number. * mot_mnemonic + "_c" will be used for the counter mnemonic * The #serial line parameter is the ordinal number of the serial line device (starting from 0), as assigned in the config file * channel is 1 or 2.

    nhq_unsetup
    Usage: nhq_unsetup [mne]
    Removes globals and cdefs for 1 mne or for all if no mnemonic is given.

    nhq_info
    Usage: nhq_info [<mne>]
    Prints Status, Voltage, Ramp of NHQ for 1 or all NHQ Devices.

    _nhq_info
    Usage: _nhq_info (mne)
    Prints Status, Voltage, Ramp of NHQ (bench -> ~1.8s / channel)

    nhq_set_voltage
    Usage: nhq_set_voltage [<mne>] [<voltage>]
    Sets voltage of NHQ.

    nhq_ramp
    Usage: nhq_ramp mne [ramp_speed]
    Sets ramp speed of NHQ

    nhq_pseudo_setup
    Usage: nhq_pseudo_setup (mne)
    Defines the nhq mne as pseudo c(ounter) and pseudo m(otor)
    Pseudo names are: "mne"_c for counter, "mne" for motor

    nhq_pseudo_unsetup
    Usage: nhq_pseudo_unsetup
    Undefines the nhq mne as pseudo c(ounter) and pseudo m(otor)

    nhq_on
    Usage: nhq_on [mne]
    Activates pseudo counter/motor for NHQ given its mnemonic.

    nhq_off
    Usage: nhq_off [mne]
    Undefines pseudo counter/motor for NHQ given its mnemonic.

Internal Macros:
    _nhq_write
    Usage: _nhq_write (mne, str)
    Writes string charcter by character to NHQ serial line. (c by c ???) The commands are transmitted in ASCII. All commands are terminated by the sequence <CR> <LF> ( 0x0D 0x0A , 13 10 respectively). Leading zeroes can be omitted on input, output is in fixed format.

    _nhq_read
    Usage: _nhq_read(mne)


    _nhq_send_no_ans
    Usage: _nhq_send_no_ans(mne, cmd)


    _nhq_send
    Usage: _nhq_send(mne, cmd)


    _nhq_status
    Usage: _nhq_status (mne)
    Returns status of one NHQ channel. "S" command

    _nhq_mod_status
    Usage: _nhq_mod_status (mne)
    Returns Module Status of one NHQ module. "T" command

    _nhq_mod_status
    Usage: _nhq_mod_status (mne)
    Returns Module Status of one NHQ module. "T" command

    _nhq_id
    Usage: _nhq_id (mne)
    Returns ID of one NHQ channel.

    _nhq_set_voltage
    Usage: _nhq_set_voltage (mne, voltage)
    Sets voltage of NHQ.

    _nhq_get_float
    Usage: _nhq_get_float(str)


    _nhq_get_voltage
    Usage: _nhq_get_voltage (mne)
    Returns voltage of NHQ "U" command Returns an ABSOLUTE value (???)

    _nhq_get_voltage_limit
    Usage: _nhq_get_voltage_limit (mne)
    Returns Voltage limit of NHQ ; "M" command Returns an ABSOLUTE value ###

    _nhq_get_current
    Usage: _nhq_get_current (mne)
    Returns current of NHQ "I" command

    _nhq_get_current_limit
    Usage: _nhq_get_current_limit (mne)
    Returns Current limit of NHQ ; "N" command

    _nhq_get_current_trip
    Usage: _nhq_get_current_trip (mne)
    Returns Current Trip of NHQ ; "L" command

    _nhq_set_current_trip
    Usage: _nhq_set_current_trip (mne)
    Returns Current Trip of NHQ ; "L" command

    _nhq_set_ramp
    Usage: _nhq_set_ramp (mne, ramp)
    Sets ramp speed of NHQ. "Vn=xxxx" command

    _nhq_get_ramp
    Usage: _nhq_get_ramp (mne)
    Gets ramp speed of NHQ. "V" command

    _nhq_get_break_time
    Usage: _nhq_get_break_time <mne>
    Read "break time" from NHQ device ("W" commad)

    _nhq_write_break_time
    Usage: _nhq_write_break_time <mne> , <break_time>
    Write "break time" from NHQ device ("W" commad) <break_time> : 2..255 ms

    _nhq_getpangles
    Usage: _nhq_getpangles (mne)


    _nhq_checkall
    Usage: _nhq_checkall (mne)


    _nhq_getcounts
    Usage: _nhq_getcounts (mne)
    Reads voltage and places it in S array.

    nhq_test_R
    Usage: nhq_test_R


    nhq_test_WR
    Usage: nhq_test_WR


Filename: nhq.mac
Author: NHQ204M.MAC AG 2.98 EP 3.03 CG X.2008
Last mod.: 21/09/2018 16:18 by guilloud