Difference between revisions of "Ramp Generator"

From MCEWiki
 
(9 intermediate revisions by 3 users not shown)
Line 4: Line 4:
 
* The ramp can only operate on a single MCE register at a time.  This means that parameters that are spread over multiple cards can not be ramped simultaneously.
 
* The ramp can only operate on a single MCE register at a time.  This means that parameters that are spread over multiple cards can not be ramped simultaneously.
  
= Commands and Usage =
+
'''For script-level support: see [[mce_internal_ramp]].'''
* Commands:
 
** '''internal_cmd_mode (0xB0):'''  Enable or disable internal housekeeping/ ramping commands.  Default = 0.
 
*** mode = 0:  Disable internal commands
 
*** mode = 1:  Enable Housekeeping commands
 
*** mode = 2:  Enable ramp commands
 
*** mode = 3: Enable arbitrary waveform (AWG) commands
 
** '''ramp_step_period (0xB1):'''  Specify the number of frame periods between each ramp step.
 
** '''ramp_param_id (0xB5):'''  Specify the parameter ID of the register to be ramped.
 
** '''ramp_card_addr (0xB6):'''  Specify the card address of the register to be ramped. 
 
** '''ramp_step_data_num (0xB7):'''  Specify the number of data that are to be written per ramp command.
 
** '''ramp_min_val:''' Start value for the ramp.
 
** '''ramp_max_val:''' Maximum value for the ramp.
 
** '''ramp_step_size:''' Step size for the ramp.
 
  
* Usage:
+
== Low-Level MCE Parameters for internal Ramp ==
 +
 
 +
If you are writing your own script, the following MCE parameters need to be set:
 +
* '''internal_cmd_mode''', '''ramp_step_period''', '''ramp_param_id''', '''ramp_card_addr''',''' ramp_step_data_num''', '''ramp_min_val''', '''ramp_max_val''', '''ramp_step_size''', '''ramp_step_phase'''(optional).
 +
 
 +
Refer to [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf MCE Command Description] for details.
 +
 
 +
* Example:
 
  wb cc internal_cmd_mode 0    # Disable internal commanding
 
  wb cc internal_cmd_mode 0    # Disable internal commanding
  wb cc ramp_card_addr 7      # Card id (BC1, here)
+
  wb cc ramp_card_addr 7      # Card id for BC1
  wb cc ramp_param_id 0x21    # Parameter id (bias, here)
+
  wb cc ramp_param_id 0x21    # Parameter id for bias
  wb cc ramp_step_data_num 1  # Write the value only once to this register
+
  wb cc ramp_step_data_num 1  # number of data elements for bias
  wb cc ramp_step_period 10    # Period, in internal MCE frames.  Don't go too low here.
+
  wb cc ramp_step_period 10    # Number of multiplexing frames between issuing the internal ramp command
  wb cc ramp_min_val 0        # Ramp starts at 0
+
  wb cc ramp_min_val 0        # Ramp is defined by its min/max and step values.
  wb cc ramp_step_size 10      # Ramp increments by 10
+
  wb cc ramp_step_size 10      #  
  wb cc ramp_max_val 200      # Highest value is 200, then restarts.
+
  wb cc ramp_max_val 200      #  
  wb cc internal_cmd_mode 2    # Enable the ramp.
+
  wb cc internal_cmd_mode 2    # Enable internal ramp
 
   
 
   
  
= Card and parameter IDs =
+
== Card and parameter IDs ==
  
 
To determine the card and parameter ids in your MCE, run "mce_status" with the "-g" option (this option forces a dump of the active mce.cfg hardware configuration file details without issuing any MCE commands).  e.g.:
 
To determine the card and parameter ids in your MCE, run "mce_status" with the "-g" option (this option forces a dump of the active mce.cfg hardware configuration file details without issuing any MCE commands).  e.g.:
Line 49: Line 43:
  
 
From this dump we see that the "tes bias" virtual parameter is mapped, in this MCE, to the bias card "bias" parameters.  We then note that "bc1 bias" corresponds to parameter id 0x21 and card id 0x07.
 
From this dump we see that the "tes bias" virtual parameter is mapped, in this MCE, to the bias card "bias" parameters.  We then note that "bc1 bias" corresponds to parameter id 0x21 and card id 0x07.
 +
 +
== Timing of Internal Commands ==
 +
See [[MCE_Timing_Diagram#Timing_of_Internal_commands]]
 +
 +
[[Category:Clock Card Firmware]]

Latest revision as of 18:53, 31 August 2016

  • The MCE can be set to write values to internal registers. For arbitrary shapes, see Arbitrary Waveform Generator .
  • Setup for simple ramps is similar to the setup for arbitrary waveforms.
  • The ramp operates between a minimum and maximum value, with some step value. Once the maximum value is passed, the ramp will reset to the minimum value and repeat.
  • The ramp can only operate on a single MCE register at a time. This means that parameters that are spread over multiple cards can not be ramped simultaneously.

For script-level support: see mce_internal_ramp.

Low-Level MCE Parameters for internal Ramp

If you are writing your own script, the following MCE parameters need to be set:

  • internal_cmd_mode, ramp_step_period, ramp_param_id, ramp_card_addr, ramp_step_data_num, ramp_min_val, ramp_max_val, ramp_step_size, ramp_step_phase(optional).

Refer to MCE Command Description for details.

  • Example:
wb cc internal_cmd_mode 0    # Disable internal commanding
wb cc ramp_card_addr 7       # Card id for BC1
wb cc ramp_param_id 0x21     # Parameter id for bias
wb cc ramp_step_data_num 1   # number of data elements for bias 
wb cc ramp_step_period 10    # Number of multiplexing frames between issuing the internal ramp command
wb cc ramp_min_val 0         # Ramp is defined by its min/max and step values.
wb cc ramp_step_size 10      # 
wb cc ramp_max_val 200       # 
wb cc internal_cmd_mode 2    # Enable internal ramp

Card and parameter IDs

To determine the card and parameter ids in your MCE, run "mce_status" with the "-g" option (this option forces a dump of the active mce.cfg hardware configuration file details without issuing any MCE commands). e.g.:

$ mce_status -g
physical   psc        brst                 0x60  1 cards: 0x01
physical   psc        cycle_pow            0x61  1 cards: 0x01
...
physical   bc1        scratch              0x9a  1 cards: 0x07
physical   bc1        flux_fb              0x20  1 cards: 0x07
physical   bc1        bias                 0x21  1 cards: 0x07
physical   bc1        flux_fb_upper        0x24  1 cards: 0x07
...
virtual    sa         bias                 maps: [(0,8)->('rc1 sa_bias'+ 0)] [(8,8)->('rc2 sa_bias'+ 0)]
virtual    sa         offset               maps: [(0,8)->('rc1 offset'+ 0)] [(8,8)->('rc2 offset'+ 0)]
virtual    tes        bias                 maps: [(0,1)->('bc1 bias'+ 0)] [(1,1)->('bc2 bias'+ 0)] [(2,1)->('bc3 bias'+ 0)]

From this dump we see that the "tes bias" virtual parameter is mapped, in this MCE, to the bias card "bias" parameters. We then note that "bc1 bias" corresponds to parameter id 0x21 and card id 0x07.

Timing of Internal Commands

See MCE_Timing_Diagram#Timing_of_Internal_commands