User Tools

Site Tools


commands:rbmode

Command:RBMODE (RM)

MS2000 or RM2000 syntax
Shortcut RM
Format RBMODE [X=control] [Y=axis_byte] [Z=buffer_pointer] [F=mode_byte]
Remembered Using SS Z
Firmware Module Required RING BUFFER (and ARRAY MODULE from some RM F functions)
Tiger syntax
Shortcut RM
Format [addr#]RBMODE [X=control] [Y=axis_byte] [Z=buffer_pointer] [F=mode_byte]
Type Card-Addressed
Remembered Using [addr#]SS Z
Firmware Module Required RING BUFFER (and ARRAY MODULE from some RM F functions)

Provides control of movement and save operations involving the controller’s internal 50-position ring-buffer (optionally to 250 positions, contact ASI). The LOAD command or the joystick button are used to fill the ring buffer.

For ring-buffer moves, check the axis_byte parameter if you are having trouble moving an axis.
MS2000 firmware builds set the axis_byte to 3 as a default, so only the X and Y axes are enabled.
TG1000 firmware builds set the axis_byte to all axes present on the controller as the default.

The command, without any arguments, sets the TTL input interrupt flag and performs the same operation that a TTL IN0 input pulse would control as determined by the current IN0_mode. See TTL command.

A move to the Next Position may be initiated by:

  • a TTL pulse when the appropriate IN0_mode is selected (See TTL command, IN0_INT Firmware Module Required).
  • a short press and release of the @ button (as long as other special functions are not utilizing the @ button).
  • by the RM command without arguments.

The argument variables are defined as follows:

X: control

0 – Clears the ring buffer (RING_BUFFER firmware required)
1 – Starts array scan (ARRAY_MODULE firmware required)

RM X? returns the number of used positions in the ring buffer (Tiger v2.89+ or MS2000 v9.2g+).

Consume mode:
RM X? returns the number of open positions in the ring buffer. (MS2000 9.2p)

Y: axis_byte

1-31: The axis_byte is a decimal value that represents the underlying binary bit pattern of a byte. This value determines which axes are commanded to move, the same axis positions are reported using TTL IN0_mode=5. The ordering of axes is the order on the card/controller, with the first axis getting the LSB. The axis_byte setting also applies to the SERVOLOCK_TTL module and TTL-triggered moves. The default is 3.

You can determine the axis order by looking at the BU X command, which will respond with axis information below the build name. This will be something like: “Motor Axes: X Y Z F” in a 4-axis build, which would mean the axis indices are X=0, Y=1, Z=2, F=3. You can verify the axis index with the Z2B <axis>? command.

The decimal value to use for the axis_byte is the sum of the binary digits corresponding to the desired axes, in the above case the first four axes are present so the value is 1+2+4+8 = 15. For example to enable all 4 axes you would send the command RM Y=15.

::::fzyx → which axes are in each bit position
00001111 → the bit pattern needed to enable all axes (15 in decimal)
MSB::LSB → most significant bit - least significant bit

If you wanted to disable only the Z axis in a 4-axis build like this you would send the command RM Y=11 to the controller (11 is 00001011 in binary = 1+2+8).

In MS2000 9.2o the default axis_byte behavior matched Tiger, enabling all axes present. 9.2p and future MS2000 builds maintain the legacy (<9.2o) default behavior of only implementing the X and Y axes for ring buffer moves (RM Y=3).

Z: read_index

Sets or reads the read index for the next move. The read index is zero-indexed, so its maximum value is the one less than the number of positions in the ring buffer.

Consume mode:
The read index is read-only. (MS2000 9.2p)

F: mode_byte

When entering and exiting consume mode the ring buffer is cleared and the read/write indices are reset to 0.

  1. Consume mode → Any other mode.
  2. Any other mode → Consume mode.

The lowest two bits are used to specify the mode:

0 – Consume Mode: A TTL pulse or RM command moves to the next position and consumes that position if a position exists in the ring buffer. New positions can be loaded on the fly. This mode reduces the capacity of the ring buffer by 1. Requires MS2000 v9.2p or Tiger v3.41 firmware.

1 – TTL Triggered Mode: (default) A TTL pulse or RM command without arguments moves to the next position of the ring buffer or array.

2 – One-shot Autoplay Mode: A TTL pulse or RM or AR command without arguments plays the ring buffer from the current position to end, or an array from the beginning, with a delay between points set by RT Z (make sure delay is set appropriately; e.g. setting 1ms won’t work with motorized stage). After the stage has reached the final position in the array, it will go back to the starting position of the array, set by AHOME.

3 – Repeat Autoplay Mode: Upon a TTL pulse or RM or AR command without arguments, plays from current position, or an array from the beginning, continuously in a loop with delay set by RT Z (make sure delay is set appropriately; e.g. setting 1ms won’t work with motorized stage). While running, another trigger causes autoplay to stop. Starting v3.24, this mode works on TGLED card too. When TTL X=21, TGLED cycles through all LED channels without waiting for a TTL trigger.

4 – One-shot Autoplay Mode Without Return to Start Position: A TTL pulse or AR command without arguments plays the array from beginning to end with a delay between points set by RT Z. This mode does not go back to the first position of the array when finished, instead it stays at the last position of the array. Requires Tiger v3.45 or MS2000 v9.52 firmware with ARRAY MODULE.

Bits 4-7 are unused.
MSB (Bit 8) – read-only, set to 1 (128 is added) if ring buffer is auto playing and 0 otherwise

On Tiger v2.81-2.88 these were on the X pseudoaxis instead of F

CAUTION: If you are using TTL mode 12 (see the TTL command), the values entered into the ring buffer using the LOAD command represent RELATIVE coordinates, not ABSOLUTE coordinates. You must drive the stage to the appropriate starting position before triggering a ring buffer sequence.
Address: 29391 W Enid Rd. Eugene, OR 97402, USA | Phone: +1 (541) 461-8181
commands/rbmode.txt · Last modified: 2024/03/12 18:22 by chrisd