Lab::Moose::Instrument::OI_Mercury::Magnet - Oxford Instruments Mercury magnet power supply
version 3.841
use Lab::Moose; my $magnet = instrument( type => 'OI_Mercury::Magnet', connection_type => 'Socket', connection_options => {host => '192.168.3.15'}, magnet => 'X', # 'X', 'Y' or 'Z'. default is 'Z' ); say "He level (%): ", $magnet->get_he_level(); say "N2 level (%): ", $magnet->get_n2_level(); say "temperature: ", $magnet->get_temperature(); $magnet->oim_set_heater(value => 'ON'); say "Current field (T): ", $magnet->get_field(); # Sweep to 0.1 T with rate of 1 T/min $magnet->sweep_to_field(target => 0.1, rate => 1);
See also an example of a He/N2 level plotter.
The default names for the used board names are as follows. You can get the values for your instrument with the get_catalogue method and use the methods with the channel argument.
get_catalogue
channel
Temperature measurement: MB1.T1.
Level meter: DB5.L1
Magnet: Z (use DEV:GRPZ:PSU)
The default can be changed to X or Y with the magnet attribute in the constructor as shown in SYNOPSIS.
magnet
$mcat = $m->get_catalogue(); print "$mcat\n";
Returns the hardware configuration of the Mercury system. A typical response would be
DEV:GRPX:PSU:DEV:MB1.T1:TEMP:DEV:GRPY:PSU:DEV:GRPZ:PSU:DEV:PSU.M1:PSU:DEV:PSU.M2:PSU:DEV:GRPN:PSU:DEV:DB5.L1:LVL
Here, each group starting with "DEV:" describes one hardware component. In this case, we obtain for example:
DEV:GRPX:PSU | DEV:GRPY:PSU |- a 3-axis magnet power supply unit DEV:GRPZ:PSU | DEV:MB1.T1:TEMP -- a temperature sensor DEV:DB5.L1:LVL -- a cryoliquid level sensor
In each of these blocks, the second component after "DEV:" is the UID of the device; it can be used in other commands such as get_level to address it.
$t = $m->get_temperature(); $t = $m->get_temperature(channel => 'MB1.T1'); # default channel is 'MB1.T1'
Read out the designated temperature channel. Result is in Kelvin.
$level = $m->get_he_level(channel => 'DB5.L1');
Read out the designated liquid helium level meter. Result is in percent as calibrated.
$res = $m->get_he_level_resistance(channel => 'DB5.L1');
Read out the designated liquid helium level meter. Result is the raw sensor resistance.
$level = $m->get_n2_level(channel => 'DB5.L1');
Read out the designated liquid nitrogen level meter. Result is in percent as calibrated.
$frq = $m->get_n2_level_frequency(channel => 'DB5.L1');
Read out the designated liquid nitrogen level meter. Result is the raw internal frequency value.
$curr = $m->oim_get_current();
Reads out the momentary current of the PSU in Ampere.
TODO: what happens if we're in persistent mode?
$field = $m->oim_get_persistent_current();
Read PSU current for persistent mode in Amps.
$field = $m->oim_get_field();
Read PSU field in Tesla. Internally, this uses oim_get_current and calculates the field with the A-to-B factor.
Returns 0 when in persistent mode.
$field = $m->oim_get_persistent_field();
Read PSU field for persistent mode in Tesla. Internally, this uses oim_get_persistent_current and calculates the field with the A-to-B factor.
$t = $m->oim_get_heater();
Returns the persistent mode switch heater status as ON or OFF.
$m->oim_set_heater(value => 'ON'); $m->oim_set_heater(value => 'OFF');
Switches the persistent mode switch heater. Nothing happens if the power supply thinks the magnet current and the lead current are different.
$m->heater_on(); $m->heater_off();
Enable/disable switch heater. Wait for 60s after changing the state of the heater.
if ($m->in_persistent_mode()) { ... }
Return 1 if in persistent mode; otherwise return false.
Switches the persistent mode switch heater. Parameter is "ON" or "OFF".
Dangerous. Works also if magnet and lead current are differing.
$rate = $m->oim_get_current_sweeprate();
Gets the current target sweep rate (i.e., the sweep rate with which we want to go to the target; may be bigger than the actual rate if it is hardware limited), in Ampere per minute.
$m->oim_set_current_sweeprate(value => 0.01);
Sets the desired target sweep rate, parameter is in Amperes per minute.
$rate = $m->oim_get_field_sweeprate();
Get sweep rate (Tesla/min).
$rate_setpoint = $m->oim_set_field_sweeprate(value => 0.001); # 1mT / min
Set sweep rate (Tesla/min).
Retrieves the current power supply activity. See oim_set_activity for values.
$m->oim_set_activity(value => 'HOLD');
Sets the current activity of the power supply. Values are:
HOLD - hold current RTOS - ramp to set point RTOZ - ramp to zero CLMP - clamp output if current is zero
$setpoint = $m->oim_set_current_setpoint(value => 0.001);
Sets the current set point in Ampere.
$sp = $m->oim_get_current_setpoint();
Get the current set point in Ampere.
$m->oim_set_field_setpoint(value => 0.01); # 10 mT
Set the field setpoint in Tesla.
$sp = $m->oim_get_field_setpoint();
Get the field setpoint in Tesla.
Returns the current to field factor (A/T)
Return the minimum field stepwidth of the magnet
This software is copyright (c) 2023 by the Lab::Measurement team; in detail:
Copyright 2017 Simon Reinhardt 2018 Andreas K. Huettel, Simon Reinhardt 2019 Simon Reinhardt 2020 Andreas K. Huettel, Simon Reinhardt 2021-2022 Simon Reinhardt
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Lab::Measurement, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lab::Measurement
CPAN shell
perl -MCPAN -e shell install Lab::Measurement
For more information on module installation, please visit the detailed CPAN module installation guide.