OTSC_Block_Codes.md

OmniTrak Serial Communication (OTSC)

Principal Data Block Code List

This is the principal list for OmniTrak Serial Communication (OTSC) data block codes. Values set in the following table will override and overwrite any changes made to any other file. Edit this document first when adding new block codes.


Block Code (hex) Block Code (uint16) Definition Name Description
0x0000 0 CLEAR Reset communication with the device.
0x0001 1 REQ_COMM_VERIFY Request verification that the connected device is using the OTSC serial code library.
0x0002 2 REQ_DEVICE_ID Request the device type ID number.
0x0003 3 DEVICE_ID Set/report the device type ID number.
0x0004 4 REQ_USERSET_ALIAS Request the user-set name for the device.
0x0005 5 USERSET_ALIAS Set/report the user-set name for the device.
0x0006 6 REQ_VULINTUS_ALIAS Request the Vulintus alias (adjective/noun serial number) for the device.
0x0007 7 VULINTUS_ALIAS Set/report the Vulintus alias (adjective/noun serial number) for the device.
0x000A 10 REQ_MAC_ADDR Request the device MAC address.
0x000B 11 MAC_ADDR Report the device MAC address.
0x000C 12 REQ_MCU_SERIALNUM Request the device microcontroller serial number.
0x000D 13 MCU_SERIALNUM Report the device microcontroller serial number.
0x0015 21 FW_FILENAME Report the firmware filename.
0x0016 22 REQ_FW_FILENAME Request the firmware filename.
0x0017 23 FW_DATE Report the firmware upload date.
0x0018 24 REQ_FW_DATE Request the firmware upload date.
0x0019 25 FW_TIME Report the firmware upload time.
0x001A 26 REQ_FW_TIME Request the firmware upload time.
0x001F 31 REQ_LIB_VER Request the OTSC serial code library version.
0x0020 32 LIB_VER Report the OTSC serial code library version.
0x0021 33 UNKNOWN_BLOCK_ERROR Indicate an unknown block code error.
0x0022 34 ERROR_INDICATOR Indicate an error and send the associated error code.
0x0032 50 REQ_CUR_FEEDER Request the current dispenser index.
0x0033 51 CUR_FEEDER Set/report the current dispenser index.
0x0034 52 REQ_FEED_TRIG_DUR Request the current dispenser triggger duration, in milliseconds.
0x0035 53 FEED_TRIG_DUR Set/report the current dispenser triggger duration, in milliseconds.
0x0036 54 TRIGGER_FEEDER Trigger feeding on the currently-selected dispenser.
0x0037 55 STOP_FEED Immediately shut off any active feeding trigger.
0x0038 56 DISPENSE_FIRMWARE Report that a feeding was automatically triggered in the device firmware.
0x003B 59 MODULE_REHOME Initiate the homing routine on the module.
0x003C 60 HOMING_COMPLETE Indicate that a module's homing routine is complete.
0x003D 61 MOVEMENT_START Indicate that a commanded movement has started.
0x003E 62 MOVEMENT_COMPLETE Indicate that a commanded movement is complete.
0x003F 63 MODULE_RETRACT Retract the module movement to it's starting or base position.
0x0040 64 REQ_TARGET_POS_MM Request the current target position of a module movement, in millimeters.
0x0041 65 TARGET_POS_MM Set/report the target position of a module movement, in millimeters.
0x0042 66 REQ_CUR_POS_MM Request the current position of the module movement, in millimeters.
0x0043 67 CUR_POS_MM Set/report the current position of the module movement, in millimeters.
0x0044 68 REQ_MIN_POS_MM Request the current minimum position of a module movement, in millimeters.
0x0045 69 MIN_POS_MM Set/report the current minimum position of a module movement, in millimeters.
0x0046 70 REQ_MAX_POS_MM Request the current maximum position of a module movement, in millimeters.
0x0047 71 MAX_POS_MM Set/report the current maximum position of a module movement, in millimeters.
0x0048 72 REQ_MIN_SPEED_MM_S Request the current minimum speed (i.e. motor start speed), in millimeters/second.
0x0049 73 MIN_SPEED_MM_S Set/report the current minimum speed (i.e. motor start speed), in millimeters/second.
0x0050 74 REQ_MAX_SPEED_MM_S Request the current maximum speed, in millimeters/second.
0x0051 75 MAX_SPEED_MM_S Set/report the current maximum speed, in millimeters/second.
0x0052 76 REQ_ACCEL_MM_S2 Request the current movement acceleration, in millimeters/second^2.
0x0053 77 ACCEL_MM_S2 Set/report the current movement acceleration, in millimeters/second^2.
0x0054 78 REQ_MOTOR_CURRENT Request the current motor current setting, in milliamps.
0x0055 79 MOTOR_CURRENT Set/report the current motor current setting, in milliamps.
0x0056 80 REQ_MAX_MOTOR_CURRENT Request the maximum possible motor current, in milliamps.
0x0057 81 MAX_MOTOR_CURRENT Set/report the maximum possible motor current, in milliamps.
0x0065 101 STREAM_PERIOD Set/report the current streaming period, in milliseconds.
0x0066 102 REQ_STREAM_PERIOD Request the current streaming period, in milliseconds.
0x0067 103 STREAM_ENABLE Enable/disable streaming from the device.
0x006E 110 AP_DIST_X Set/report the autopositioner x position, in millimeters.
0x006F 111 REQ_AP_DIST_X Request the current autopositioner x position, in millimeters.
0x0070 112 AP_ERROR Indicate an autopositioning error.
0x0078 120 READ_FROM_NVM Read bytes from non-volatile memory.
0x0079 121 WRITE_TO_NVM Write bytes to non-volatile memory.
0x007A 122 REQ_NVM_SIZE Request the non-volatile memory size.
0x007B 123 NVM_SIZE Report the non-volatile memory size.
0x0100 256 PLAY_TONE Play the specified tone.
0x0101 257 STOP_TONE Stop any currently playing tone.
0x0102 258 REQ_NUM_TONES Request the number of queueable tones.
0x0103 259 NUM_TONES Report the number of queueable tones.
0x0104 260 TONE_INDEX Set/report the current tone index.
0x0105 261 REQ_TONE_INDEX Request the current tone index.
0x0106 262 TONE_FREQ Set/report the frequency of the current tone, in Hertz.
0x0107 263 REQ_TONE_FREQ Request the frequency of the current tone, in Hertz.
0x0108 264 TONE_DUR Set/report the duration of the current tone, in milliseconds.
0x0109 265 REQ_TONE_DUR Return the duration of the current tone in milliseconds.
0x010A 266 TONE_VOLUME Set/report the volume of the current tone, normalized from 0 to 1.
0x010B 267 REQ_TONE_VOLUME Request the volume of the current tone, normalized from 0 to 1.
0x0160 352 INDICATOR_LEDS_ON Set/report whether the indicator LEDs are turned on (0 = off, 1 = on).
0x0180 384 CUE_LIGHT_ON Turn on the specified cue light.
0x0181 385 CUE_LIGHT_OFF Turn off any currently-showing cue light.
0x0182 386 NUM_CUE_LIGHTS Report the number of queueable cue lights.
0x0183 387 REQ_NUM_CUE_LIGHTS Request the number of queueable cue lights.
0x0184 388 CUE_LIGHT_INDEX Set/report the current cue light index.
0x0185 389 REQ_CUE_LIGHT_INDEX Request the current cue light index.
0x0186 390 CUE_LIGHT_RGBW Set/report the RGBW values for the current cue light (0-255).
0x0187 391 REQ_CUE_LIGHT_RGBW Request the RGBW values for the current cue light (0-255).
0x0188 392 CUE_LIGHT_DUR Set/report the current cue light duration, in milliseconds.
0x0189 393 REQ_CUE_LIGHT_DUR Request the current cue light duration, in milliseconds.
0x018A 394 CUE_LIGHT_MASK Set/report the cue light enable bitmask.
0x018B 395 REQ_CUE_LIGHT_MASK Request the cue light enable bitmask.
0x018C 396 CUE_LIGHT_QUEUE_SIZE Set/report the number of queueable cue light stimuli.
0x018D 397 REQ_CUE_LIGHT_QUEUE_SIZE Request the number of queueable cue light stimuli.
0x018E 398 CUE_LIGHT_QUEUE_INDEX Set/report the current cue light queue index.
0x018F 399 REQ_CUE_LIGHT_QUEUE_INDEX Request the current cue light queue index.
0x01A0 416 CAGE_LIGHT_ON Turn on the overhead cage light.
0x01A1 417 CAGE_LIGHT_OFF Turn off the overhead cage light.
0x01A2 418 CAGE_LIGHT_RGBW Set/report the RGBW values for the overhead cage light (0-255).
0x01A3 419 REQ_CAGE_LIGHT_RGBW Request the RGBW values for the overhead cage light (0-255).
0x01A4 420 CAGE_LIGHT_DUR Set/report the overhead cage light duration, in milliseconds.
0x01A5 421 REQ_CAGE_LIGHT_DUR Request the overhead cage light duration, in milliseconds.
0x0200 512 POKE_BITMASK Set/report the current nosepoke status bitmask.
0x0201 513 REQ_POKE_BITMASK Request the current nosepoke status bitmask.
0x0202 514 POKE_ADC Report the current nosepoke analog reading.
0x0203 515 REQ_POKE_ADC Request the current nosepoke analog reading.
0x0204 516 POKE_MINMAX Set/report the minimum and maximum ADC values of the nosepoke infrared sensor history, in ADC ticks.
0x0205 517 REQ_POKE_MINMAX Request the minimum and maximum ADC values of the nosepoke infrared sensor history, in ADC ticks.
0x0206 518 POKE_THRESH_FL Set/report the current nosepoke threshold setting, normalized from 0 to 1.
0x0207 519 REQ_POKE_THRESH_FL Request the current nosepoke threshold setting, normalized from 0 to 1.
0x0208 520 POKE_THRESH_ADC Set/report the current nosepoke threshold setting, in ADC ticks.
0x0209 521 REQ_POKE_THRESH_ADC Request the current nosepoke auto-threshold setting, in ADC ticks.
0x020A 522 POKE_THRESH_AUTO Set/report the current nosepoke auto-thresholding setting (0 = fixed, 1 = autoset).
0x020B 523 REQ_POKE_THRESH_AUTO Request the current nosepoke auto-thresholding setting (0 = fixed, 1 = autoset).
0x020C 524 POKE_RESET Reset the nosepoke infrared sensor history.
0x020D 525 POKE_INDEX Set/report the current nosepoke index for multi-nosepoke modules.
0x020E 526 REQ_POKE_INDEX Request the current nosepoke index for multi-nosepoke modules.
0x0220 544 LICK_BITMASK Set/report the current lick sensor status bitmask.
0x0221 545 REQ_LICK_BITMASK Request the current lick sensor status bitmask.
0x0222 546 LICK_CAP Report the current lick sensor capacitance reading.
0x0223 547 REQ_LICK_CAP Request the current lick sensor capacitance reading.
0x0224 548 LICK_MINMAX Set/report the minimum and maximum capacitance values of the lick sensor capacitance history.
0x0225 549 REQ_LICK_MINMAX Request the minimum and maximum capacitance values of the lick sensor capacitance history.
0x0226 550 LICK_THRESH_FL Set/report the current lick sensor threshold setting, normalized from 0 to 1.
0x0227 551 REQ_LICK_THRESH_FL Request the current lick sensor threshold setting, normalized from 0 to 1.
0x0228 552 LICK_THRESH_CAP Set/report the current lick sensor threshold setting.
0x0229 553 REQ_LICK_THRESH_CAP Request the current lick sensor auto-threshold setting.
0x022A 554 LICK_THRESH_AUTO Set/report the current lick sensor auto-thresholding setting (0 = fixed, 1 = autoset ).
0x022B 555 REQ_LICK_THRESH_AUTO Request the current lick sensor auto-thresholding setting (0 = fixed, 1 = autoset ).
0x022C 556 LICK_RESET Reset the lick sensor infrared capacitance history.
0x022D 557 LICK_INDEX Set/report the current lick sensor index for multi-lick sensor modules.
0x022E 558 REQ_LICK_INDEX Request the current lick sensor index for multi-lick sensor modules.
0x022F 559 LICK_RESET_TIMEOUT Set/report the current lick sensor reset timeout duration, in milliseconds (0 = no time-out reset).
0x0230 560 REQ_LICK_RESET_TIMEOUT Request the current lick sensor reset timeout duration, in milliseconds (0 = no time-out reset).
0x0280 640 TOUCH_BITMASK Set/report the current capacitive touch status bitmask.
0x0281 641 REQ_TOUCH_BITMASK Request the current capacitive touch status bitmask.
0x0300 768 REQ_THERM_PIXELS_INT_K Request a thermal pixel image as 16-bit unsigned integers in units of deciKelvin (dK, or Kelvin * 10).
0x0301 769 THERM_PIXELS_INT_K Report a thermal image as 16-bit unsigned integers in units of deciKelvin (dK, or Kelvin * 10).
0x0302 770 REQ_THERM_PIXELS_FP62 Request a thermal pixel image as a fixed-point 6/2 type (6 bits for the unsigned integer part, 2 bits for the decimal part), in units of Celcius.
0x0303 771 THERM_PIXELS_FP62 Report a thermal pixel image as a fixed-point 6/2 type (6 bits for the unsigned integer part, 2 bits for the decimal part), in units of Celcius. This allows temperatures from 0 to 63.75 C.
0x0310 784 REQ_THERM_XY_PIX Request the current thermal hotspot x-y position, in units of pixels.
0x0311 785 THERM_XY_PIX Report the current thermal hotspot x-y position, in units of pixels.
0x0320 800 REQ_AMBIENT_TEMP Request the current ambient temperature as a 32-bit float, in units of Celsius.
0x0321 801 AMBIENT_TEMP Report the current ambient temperature as a 32-bit float, in units of Celsius.
0x0380 896 REQ_TOF_DIST Request the current time-of-flight distance reading, in units of millimeters (float32).
0x0381 897 TOF_DIST Report the current time-of-flight distance reading, in units of millimeters (float32).
0x4000 16384 VIB_DUR Set/report the current vibration pulse duration, in microseconds.
0x4001 16385 REQ_VIB_DUR Request the current vibration pulse duration, in microseconds.
0x4002 16386 VIB_IPI Set/report the current vibration train onset-to-onset inter-pulse interval, in microseconds.
0x4003 16387 REQ_VIB_IPI Request the current vibration train onset-to-onset inter-pulse interval, in microseconds.
0x4004 16388 VIB_N_PULSE Set/report the current vibration train duration, in number of pulses.
0x4005 16389 REQ_VIB_N_PULSE Request the current vibration train duration, in number of pulses.
0x4006 16390 VIB_GAP_START Set/report the current vibration train skipped pulses starting index.
0x4007 16391 REQ_VIB_GAP_START Request the current vibration train skipped pulses starting index.
0x4008 16392 VIB_GAP_STOP Set/report the current vibration train skipped pulses stop index.
0x4009 16393 REQ_VIB_GAP_STOP Request the current vibration train skipped pulses stop index.
0x400A 16394 START_VIB Immediately start the vibration pulse train.
0x400B 16395 STOP_VIB Immediately stop the vibration pulse train.
0x400C 16396 VIB_MASK_ENABLE Enable/disable vibration tone masking (0 = disabled, 1 = enabled).
0x400D 16397 VIB_TONE_FREQ Set/report the currently selected vibration masking tone's frequency, in Hz.
0x400E 16398 REQ_VIB_TONE_FREQ Request the currently selected vibration masking tone's frequency, in Hz.
0x400F 16399 VIB_TONE_DUR Set/report the currently selected vibration masking tone's duration, in milliseconds.
0x4010 16400 REQ_VIB_TONE_DUR Request the currently selected vibration masking tone's duration, in milliseconds.
0x4011 16401 VIB_TASK_MODE Set/report the current vibration task mode (1 = BURST, 2 = GAP).
0x4012 16402 REQ_VIB_TASK_MODE Request the current vibration task mode (1 = BURST, 2 = GAP).
0x4013 16403 VIB_INDEX Set/report the current vibration motor/actuator index.
0x4014 16404 REQ_VIB_INDEX Request the current vibration motor/actuator index.
0x410A 16650 STAP_REQ_FORCE_VAL Request the current primary force/loadcell value. DEPRECATED: Switch to REQ_PRIMARY FORCE_VAL (0xAA0A).
0x410B 16651 STAP_FORCE_VAL Report the current force/loadcell value. DEPRECATED: Switch to PRIMARY FORCE_VAL (0xAA0B).
0x410C 16652 STAP_REQ_FORCE_BASELINE Request the current force calibration baseline, in ADC ticks.
0x410D 16653 STAP_FORCE_BASELINE Set/report the current force calibration baseline, in ADC ticks.
0x410E 16654 STAP_REQ_FORCE_SLOPE Request the current force calibration slope, in grams per ADC tick.
0x410F 16655 STAP_FORCE_SLOPE Set/report the current force calibration slope, in grams per ADC tick.
0x4110 16656 STAP_REQ_DIGPOT_BASELINE Request the current force baseline-adjusting digital potentiometer setting.
0x4111 16657 STAP_DIGPOT_BASELINE Set/report the current force baseline-adjusting digital potentiometer setting.
0x4119 16665 STAP_STEPS_PER_ROT Set/report the number of steps per full revolution for the stepper motor.
0x411A 16666 STAP_REQ_STEPS_PER_ROT Return the current number of steps per full revolution for the stepper motor.
0x411E 16670 STAP_MICROSTEP Set/report the microstepping multiplier.
0x411F 16671 STAP_REQ_MICROSTEP Request the current microstepping multiplier.
0x4120 16672 CUR_POS Set/report the target/current handle position, in micrometers.
0x4121 16673 REQ_CUR_POS Request the current handle position, in micrometers.
0x4122 16674 MIN_SPEED Set/report the minimum movement speed, in micrometers/second.
0x4123 16675 REQ_MIN_SPEED Request the minimum movement speed, in micrometers/second.
0x4124 16676 MAX_SPEED Set/report the maximum movement speed, in micrometers/second.
0x4125 16677 REQ_MAX_SPEED Request the maximum movement speed, in micrometers/second.
0x4126 16678 RAMP_N Set/report the cosine ramp length, in steps.
0x4127 16679 REQ_RAMP_N Request the cosine ramp length, in steps.
0x4128 16680 PITCH_CIRC Set/report the driving gear pitch circumference, in micrometers.
0x4129 16681 REQ_PITCH_CIRC Request the driving gear pitch circumference, in micrometers.
0x412A 16682 CENTER_OFFSET Set/report the center-to-slot detector offset, in micrometers.
0x412B 16683 REQ_CENTER_OFFSET Request the center-to-slot detector offset, in micrometers.
0x4130 16688 TRIAL_SPEED Set/report the trial movement speed, in micrometers/second.
0x4131 16689 REQ_TRIAL_SPEED Request the trial movement speed, in micrometers/second.
0x4132 16690 RECENTER Rapidly re-center the handle to the home position state.
0x4133 16691 RECENTER_COMPLETE Indicate that the handle is recentered.
0x4141 16705 SINGLE_EXCURSION Select excursion type: direct single motion (L/R)
0x4142 16706 INCREASING_EXCURSION Select excursion type: deviation increase from midline
0x4143 16707 DRIFTING_EXCURSION Select excursion type: R/L motion with a net direction
0x4144 16708 SELECT_TEST_DEV_DEG Set deviation degrees: used in mode 65, 66 and 67
0x4145 16709 SELECT_BASE_DEV_DEG Set the baseline rocking: used in mode 66 and 67
0x4146 16710 SELECT_SYMMETRY Sets oscillation around midline or from mindline
0x4147 16711 SELECT_ACCEL
0x4148 16712 SET_EXCURSION_TYPE Set the excursion type (49 = simple movement, 50 = wandering wobble)
0x4149 16713 GET_EXCURSION_TYPE Get the current excurion type.
0x6544 25924 CUR_DEBUG_MODE Report the current debug mode ("Debug_ON_" or "Debug_OFF");
0x6564 25956 TOGGLE_DEBUG_MODE Toggle OTSC debugging mode (type "db" in a serial monitor).
0xAA0A 43530 REQ_PRIMARY_FORCE_VAL Request the current primary force/loadcell value.
0xAA0B 43531 PRIMARY_FORCE_VAL Report the current force/loadcell value.
0xAA0C 43532 REQ_FORCE_BASELINE Request the current force calibration baseline, in ADC ticks.
0xAA0D 43533 FORCE_BASELINE Set/report the current force calibration baseline, in ADC ticks.
0xAA0E 43534 REQ_FORCE_SLOPE Request the current force calibration slope, in grams per ADC tick.
0xAA0F 43535 FORCE_SLOPE Set/report the current force calibration slope, in grams per ADC tick.
0xAA10 43536 REQ_DIGPOT_BASELINE Request the current force baseline-adjusting digital potentiometer setting.
0xAA11 43537 DIGPOT_BASELINE Set/report the current force baseline-adjusting digital potentiometer setting.
0xAA19 43545 STEPS_PER_ROT Set/report the number of steps per full revolution for the stepper motor.
0xAA1A 43546 REQ_STEPS_PER_ROT Return the current number of steps per full revolution for the stepper motor.
0xAA1E 43550 MICROSTEP Set/report the microstepping multiplier.
0xAA1F 43551 REQ_MICROSTEP Request the current microstepping multiplier.
0xAA28 43560 NUM_PADS Set/report the number of texture positions on the carousel disc.
0xAA29 43561 REQ_NUM_PADS Request the number of texture positions on the carousel disc.
0xAA32 43570 CUR_PAD_I Set/report the current texture position index.
0xAA33 43571 REQ_CUR_PAD_I Return the current texture position index.
0xAA34 43572 PAD_LABEL Set/report the current position label.
0xAA35 43573 REQ_PAD_LABEL Return the current position label.
0xAA36 43574 ROTATE_CW Rotate one position clockwise (viewed from above).
0xAA37 43575 ROTATE_CCW Rotate one position counter-clockwise (viewed from above).
0xAB00 43776 VOLTAGE_IN Report the current input voltage to the device.
0xAB01 43777 REQ_VOLTAGE_IN Request the current input voltage to the device.
0xAB02 43778 CURRENT_IN Report the current input current to the device, in milliamps.
0xAB03 43779 REQ_CURRENT_IN Request the current input current to the device, in milliamps.
0xABCD 43981 COMM_VERIFY Verify use of the OTSC serial code library, responding to a REQ_COMM_VERIFY block.
0xBCDE 48350 PASSTHRU_DOWN Route the immediately following block downstream to the specified port or VPB device.
0xBCDF 48351 PASSTHRU_UP Route the immediately following block upstream, typically to the controller or computer.
0xBCE0 48352 PASSTHRU_HOLD Route all following blocks to the specified port or VPB device until the serial line is inactive for a set duration.
0xBCE1 48353 PASSTHRU_HOLD_DUR Set/report the timeout duration for a passthrough hold, in milliseconds.
0xBCE2 48354 REQ_PASSTHRU_HOLD_DUR Request the timeout duration for a passthrough hold, in milliseconds.
0xBCF0 48368 REQ_OTMP_IOUT Request the OmniTrak Module Port (OTMP) output current for the specified port, in milliamps.
0xBCF1 48369 OTMP_IOUT Report the OmniTrak Module Port (OTMP) output current for the specified port, in milliamps.
0xBCF2 48370 REQ_OTMP_ACTIVE_PORTS Request a bitmask indicating which OmniTrak Module Ports (OTMPs) are active based on current draw.
0xBCF3 48371 OTMP_ACTIVE_PORTS Report a bitmask indicating which OmniTrak Module Ports (OTMPs) are active based on current draw.
0xBCF4 48372 REQ_OTMP_HIGH_VOLT Request the current high voltage supply setting for the specified OmniTrak Module Port (0 = off , 1 = high voltage enabled).
0xBCF5 48373 OTMP_HIGH_VOLT Set/report the current high voltage supply setting for the specified OmniTrak Module Port (0 = off , 1 = high voltage enabled).
0xBCF6 48374 REQ_OTMP_OVERCURRENT Request a bitmask indicating which OmniTrak Module Ports (OTMPs) are in overcurrent shutdown.
0xBCF7 48375 OTMP_OTMP_OVERCURRENT Report a bitmask indicating which OmniTrak Module Ports (OTMPs) are in overcurrent shutdown.
0xBDCA 48586 BROADCAST_OTMP Route the immediately following block to all available OmniTrak Module Ports (RJ45 jacks).