Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Sample Changer Panel

The sample changer panel allows you to create a mapping between a slotID and associated devices known as slot. Optianally, a sample can be assigned with a slot too. For example: in the picture below, slot 2 has sampleAngle.zero at 1 degree, sampelTiltY.zero at 5 degrees, and sampleTransY at 2 degrees.

This slot is associated to sample 2. Depending on the sampleID.slotLink, the association between slotId and sampleId behaves differently. This will be explained in detail below

A picture of the sample changer panel
An image of the sample changer panel in Candor
Credit: Adeniyi Fawaz Joseph

Panel

Table

The table will always have two column: Slot ID, and Sample ID, both columns are representative values for sampleID(sampleID.primaryNode) and slotID(slotID.slotID) nodes respectively.

If sample.slotLink is NONE, the Sample ID column is hidden

The slot ids are tied to row index in the table.

Slot Id 4 is the 4th row in the table, if a slot id 4 moved up one will become slot 3 with the node values of the slots being the same

Buttons

Table operations

 

Redefine Slot to Current Node Position

Update the selected row with the current values of the nodes the columns represent

Add Slot

Adds a row to the table, the default value of the rows will be the current node values

Copy Slot

Copy the selected row(s) and appends the copies to the end of the table

Move Slot Up/Move Slot Down

Rearrange the selected row accordingly. You can also use the cursor to drag the rows in place.

Delete Slot

Delete the current row(s)

Clear Table

Clear the table and the current file loaded (if any)

SANS Specific Button

Offset Sample Block

Copies all the slots to the end of the table with the specified horizontal offset number added to the node value of the copied slot

File operations

Save

Save the current table to a file (if there is no file, you will be asked to create one). The file is added to the Recent Files drop down box

Save As…

Save the current table to a new file. The file is added to the Recent Files combobox

Load

Load the selected file in the combo box

Delete File

Delete the selected file in the combo box, Right click to just remove the file name from the combo box (This will not delete the actual file)

Load File…

Load a new file from the server. The file is added to the Recent Files combobox

Sample Changer Node Current Values

A picture of the sample changer panel with a red arrow pointing to a section that has the relevant nodes current values
The Sample Changer Nodes Current Values shows the current value of all the nodes (and the tolerance nodes) that the panel is controlling.
Credit: Adeniyi Fawaz Joseph

The Sample Changer Nodes Current Values shows the current value of all the nodes (and the tolerance nodes) that the panel is controlling.

The node sampleID.slotLink defines the association between sampleID and slotID

There are three possible values for the slotLink: BOTH, MOVE_ONLY, NONE

BOTH

Both SampleID and slotID affects each other. When you move sampleID and there is a corresponding slot in the table, it will also move slotID to that slot. If there is no slotID match to a sampleID, there will be an error.

Likewise, sampleID value is determind by slotID.
If slotID validity is BAD, then sampleID is BAD, otherwise sampleID is the associated sample for the slot id current value. If the slot has no sample, then the sample ID is 0 (0 is reserved for “no sample”).

Examples

There are 5 slots in the table and 6 sample defined.
The sixth sample has no slot attached to it.
The fourth slot has no sample attached to it.

A row has slot 3 and sample 5, sampleTiltY.zero 10 degrees.

  1. User moves sample Id to 5
    1. The slot moves to 3, which moves sampleTiltY.zero to 10 degrees.
  2. User moves sampleID to 6
    1. Devices model errors out, because sample 6 is not associated with any slot
  3. User read sampleID, slotID is currently 3
    1. slot 3 is attached to sample 5, so sampleID is 5
  4. User reads sampleID, slotID’s validity is BAD
    1. sampleID’s validity is BAD
  5. User reads sampleID, slotID is current 4
    1. There is no sample attached to slot 4
      1. sampleID is 0
  6. User move slotID to 3 from 4
    1. User read sampleID
      1. There is a Sample ID column associated with row 3: 5
      2. sampleID is 5 (no move actually occurred for sampleID)

MOVE_ONLY

sampleID affects slotID, but not the other way around. When you move sampleID and there is a corresponding slot in the table, it will also move slotID to that slot. If there is no slotID match to a sampleID, there will be an error.

Examples

There are 5 slots in the table and 6 sample defined.
The sixth sample has no slot attached to it.
The fourth slot has no sample attached to it.

A row has slot 3 and sample 5, sampleTiltY.zero 10 degrees.

  1. User moves sample Id to 5
    1. The slot moves to 3, which moves sampleTiltY.zero to 10 degrees.
  2. User moves sampleID to 6
    1. Devices model errors out, because sample 6 is not associated with any slot
  3. User read sampleID, last valid move was 4
    1. sampleID will be 4

NONE

sampleID and slotID are fully independent nodes. A move on one node doesn’t affect the other.

This will also hide the Sample ID column in the table

For Scientist use only

The sample changer table is only visible if sample changer is installed. Additionally, the columns in the table can be configured via add/removable configuration file (e.g. sample-changer.cfg)

Sample-changer can be installed if configuration file exist

The Install Devices Panel with the sample-changer config installed
The Install Devices Panel with the sample-changer config installed
Credit: Adeniyi Fawaz Joseph

sample_changer.cfg includes a map with a unique nodes key. It lets you specify which columns (devices/nodes) can be controlled by each slot.

NOTE: You have to include tolerance node if you are including a position node, so the panel can figure out if the position node is where it needs to be.

The nodes key in the config file that defines a sample changer
The nodes key of a config file defining the sample changer
Credit: Adeniyi Fawaz Joseph
Created April 17, 2025, Updated April 18, 2025