Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
OXPS.MAC | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: Other hardware | ||||||
Description:
| ||||||
Documentation:
Those macros provide users with remote setup and control of Oxford PS power supplies; control and monitoring can be done through SPEC pseudo motor/counter feature or not. OVERVIEW SETUP
DEPENDENCIES - The file oxPS.mac has has to be read in; it needs: pseudo.mac and menu.mac. | ||||||
Macros:
Usage: oxpssetup [number_of_devices] , OR [device_index] ["Serial"|"GPIB"|"ISOBUS"] [address1] [address2] [sleep_time] [motor_mnemonic] [mode] Sets both the macros and the controller up. When command line setup, that macro must be called first with the total number of devices as only argument, then it must be called once for each device with the following arguments: A list of mnemonics is proposed as "parameters readout". if those mnemonics are simply put as counters in config, the corresponding parameter is automatically read at counting. The list of mnemonics is configurable through edition of the macro _oxps_Read_parameter_list. It is safe to copy that macro in a private file that you load after oxPS.mac. Note that you can eventually configure more mnemonics that the ones listed in the menu, as far as it is formatted that way "psn_d", where n corresponds to Rn command (see manual or _oxps_Read_parameter_text), and d is the device number started from 1 and assigned by oxpssetup. Pseudo motor/Field Setpoint control is also automatically installed as soon as a motor mnemonic (whatever it is) is specified here and put in config. _oxps_Read_parameter_list Usage: _oxps_Read_parameter_list This macros helps customising your setup. Edit it and comment out the lines you don\'t want to appear in oxpssetup as parameter readout proposals. oxpsinit Usage: oxpsinit Same as oxpssetup without parameters input. oxpsmaxf Usage: oxpsmaxf [field_value] Sets absolute field upper limit. (software limit). oxpsmaxr Usage: oxpsmaxr [rate] Sets absolute sweep rate upper limit. (software limit). oxpsflush Usage: oxpsflush Get rid of all unwanted data remaining on the line or on the bus. oxpspar Usage: oxpspar Prints out various controller parameters. Parameters selection and scaling is configurable through edition of _oxps_Read_parameter_scale and _oxps_Read_parameter_text macros. It is safe to copy those macros in a private file that you load after oxPS.mac. _oxps_Read_parameter_scale Usage: _oxps_Read_parameter_scale Edit that macro to set your own scaling on parameters readout. (oxpspar output, pseudo counters read out, pseudo motor, as well as any reference to those parameters (e.g. oxpsfield or oxpsrate...) is affected by that scaling). scale not specified is converted into 1. The number into brackets (array index) corresponds to the one of the R command. see the manual, or _oxps_Read_parameter_text macro. _oxps_Read_parameter_text Usage: _oxps_Read_parameter_text This macros helps customising your oxpspar output. Edit it and comment out the lines of parameters you don\'t want to read. The number enclosed into brackets corresponds to the one of the R command. oxpsstat Usage: oxpsstat Prints out controller status. oxpsdev Usage: oxpsdev [device_num] Changes current device index. device_num from 1. oxpsfield Usage: oxpsfield [field_value] Sets field target absolute value. oxps_field Usage: oxps_field <field_value> Sets field target polarised value. oxpspol Usage: oxpspol [1|2|3] Sets field polarity. (Forward (1), or reverse (2), or toggles (3)) oxpsdo Usage: oxpsdo [|1|2|3|4] Performs an action with the magnet (HOLD (1), go to SET POINT (2), go to ZERO (3), CLAMP (4)) oxpsheater Usage: oxpsheater [1|0] Switches heater on (1) and off (0). Waits 10 seconds. oxpsrate Usage: oxpsrate [sweep_rate] Sets field sweep rate. oxpssetfield Usage: oxpssetfield [Field_value] Changes field value. i.e., changes setpoint, switches, if fitted, heater, then go to setpoint and wait till it is reached. oxpssync Usage: oxpssync Will force next "wa" to read position from devices, even if the field value was not "mved" beforehand. All devices set up are concerned. oxpsoff Usage: oxpsoff [device_num] Disables Oxford PS control. All devices set up are concerned, unless specified. device_num from 1. oxpson Usage: oxpson [device_num] Enables back Oxford PS control. All devices set up are concerned, unless specified. device_num from 1. | ||||||
Internal Macros: | ||||||
Usage: oxpsunsetup Disables Oxford control. Used by "general setup" feature, what means it is called when you comment out oxpssetup lines in your setup file (setup command from SPEC). Goal is to get rid of ALL oxford power supply software. oxps_init Usage: oxps_init Sets controller in remote and unlocked mode, then get the firmware message. oxps_pseudomotordef Usage: oxps_pseudomotordef Installs field setpoint control as pseudo-motor. this is automatically done if a motor mnemonic is specified in oxpssetup, and configured. oxps_pseudocounterdef Usage: oxps_pseudocounterdef Installs various parameters readout as pseudo-counters. this is automatically done if the relevant mnemonics are configured as counters in config. see oxpssetup. Note that you can eventually configure more mnemonics that the ones listed in oxpssetup, as far as it is formatted that way "psn_d", where n corresponds to Rn command (see manual or _oxps_Read_parameter_text macro), and d is the device number, as assigned by oxpssetup, started from 1. oxpssetup_menu Usage: oxpssetup_menu Setup menu display. _oxpsdeldev Usage: _oxpsdeldev Deletes one controller from menu. oxps_iof Usage: oxps_iof (device_index , command , flag) Input/Output function. If flag is 1, the response is read back, but not checked. Responses are read up to a "\r". device_index from 0. oxps_put Usage: oxps_put (interface_address , isobus_address , command) Sends command to the controller. oxps_get Usage: oxps_get (interface_address , ending_character) Reads back response from the controller, up to the specified character (default is "\r"). oxps_heater Usage: oxps_heater <1|0> Switches heater on (1) and off (0). Waits 10 seconds. _oxpspersistoff Usage: _oxpspersistoff <device_index> Turns the magnet out of persistant mode. device_index from 0. _oxpspersiston Usage: _oxpspersiston <device_index> Turns the magnet into persistant mode. device_index from 0. oxps_stat Usage: oxps_stat (device_index , key_letter) Returns the value marked by the key letter in the response to the Oxford "X" command. device_index from 0. oxps_getfield Usage: oxps_getfield <motor_mnemonic> <device_idx> <polarity_care (if 1)> Reads in as pseudo motor position the desired field value. (- Hooked to user_getpangles -). device_idx from 0. oxps_mvsetpt Usage: oxps_mvsetpt <motor_mnemonic> <device_idx> <polarity_care (if 1)> Sets field setpoint from standard SPEC motors commands. (- Hooked to user_checkall -). device_idx from 0. oxps_do Usage: oxps_do <0|1|2|4> <device_idx> Performs an action with the magnet (HOLD (0), go to SET POINT (1), go to ZERO (2), CLAMP (4)). (command A). device_idx from 0. oxps_wait Usage: oxps_wait <mnemonic> <device_idx> Waits till setpoint is reached. (- Hooked to user_finished1 -). The setpoint is assumed to be reached when the PowerSupply output is constant and the desired polarity in accordance with the one commanded. device_idx from 0. _oxps_wait_mag_pol Usage: _oxps_wait_mag_pol <device_idx> <polarity_sign> Waits till setpoint and desired polarity are reached. called by oxps_wait. device_idx from 0. polarity sign is the sign of the second argument. oxps_getpar Usage: oxps_getpar <counter_mnemonic> Reads in the value returned by PS Rn command as a pseudo counter value. (- Hooked to user_getcounts -). _oxps_cleanup Usage: _oxps_cleanup Cleanup macros. (- Hooked to user_cleanup2 -). Sets the magnet activity to HOLD. oxpsbody Usage: oxpsbody(mode) For blmenu (use blmenu.mac). | ||||||
|