Vibration demo MWP


This script demonstrates how to program the MWP unit to deliver a vibration using the built-in motor. This motor is a stepper motor, with 200 steps to make a full rotation. However the motor is mounted such that it cannot rotate freely, but movement attempts move the plate that the stand stands on - hence the turns (or attempted turns) can pass vibrations to the animals. This is the same motor (& control) as used for the peristaltic pump and feeders (for the AD/LT).

Top

Script explanation

Here we explain the key points for operating the vibration stimuli in the MWP using the ZCOMMAND. It is recommended that you test different vibration settings to see which ones are the best for your experiments.

DEFINE NUM_TIMES 2 
DEFINE WAIT_TIME 3 
 
ACTION MAIN
 
 INVOKE(SAMPLE_VIBRATIONS,NUM_TIMES) 
 
COMPLETE

The commands above define conditions used later in the script and outline the ACTION MAIN which is an overview of the whole experiment:

  • The two DEFINE commands specify a wait time in seconds and the number of times the sequence SAMPLE_VIBRATIONS in the action main will be repeated.
ACTION SAMPLE_VIBRATIONS
 
 ZCOMMAND("U0 D1000 M10 M-10") 
 WAIT(WAIT_TIME) 
 
 ZCOMMAND("U1 D1000 M10 M-10") 
 WAIT(WAIT_TIME) 
 
 ZCOMMAND("U2 D1000 M10 M-10") 
 WAIT(WAIT_TIME)
 
 ZCOMMAND("U3 D1000 M10 M-10") 
 WAIT(WAIT_TIME) 
 
 ZCOMMAND("U0 D1000 M1 M-1 M1 M-1 M1 M-1 M1 M-1 M1 M-1") 
 WAIT(WAIT_TIME) 
 
 ZCOMMAND("U1 D1000 M1 M-1 M1 M-1 M1 M-1 M1 M-1 M1 M-1") 
 WAIT(WAIT_TIME) 
 
 ZCOMMAND("U2 D1000 M1 M-1 M1 M-1 M1 M-1 M1 M-1 M1 M-1") 
 WAIT(WAIT_TIME) 
 
 ZCOMMAND("U3 D1000 M1 M-1 M1 M-1 M1 M-1 M1 M-1 M1 M-1") 
 WAIT(WAIT_TIME) 
 
COMPLETE

The above action programs the unit to deliver a range of different sized vibratory stimuli using the ZCOMMAND:

  • The "M" command programs how many steps the motor rotates. In the first 4 ZCOMMANDS the motor will rotate 10 steps clockwise. In the last 4 ZCOMMANDS the motor will rotate 1 step clockwise and 1 step anticlockwise for a total of 10 steps. This can provide a smaller but smoother stimuli than using M10. The greater the number of "M's" the longer the vibration. Multiple commands in the same direction often lead to slippage of the stepper motor (as it is prevented by its mounting from turning all the way), and bigger vibrations, but they are not strictly repeatable / consistent. We recommend always using the M1 M-1 option for writing vibration stimuli so that the motor position is always reset at the end of each stimulus, and this leads to great consistency.
  • The "U" command tells the unit how big each step should be, where "U0" is a full step (i.e. 1.8 degrees), "U1" is a half step (0.9 degrees), "U2" is a quarter step (0.45 degrees), "U3" is an eighth of a step (0.225 degrees).
    • If you set the step mode at a full step (U0), and the motor to move 200 steps (i.e. M200) the motor would rotate a full cycle - 200 steps of 1.8 degrees = 360 degrees - (if the motor was free to rotate).
    • The smallest step mode (U3) has the smallest vibration
  • The "D" command controls the total amount of 'delays' between each step. Delays are in units of 4.25 µsecs (0.00000425 seconds). Therefore, for D2000, there are 2000 'delays' of 4.25 µsec between steps, which translates to a frequency of 1/(2000 x 0.00000425), 118Hz.

Frequency Calculator for Vibrations in the MWP

Download the spreadsheet below to quickly calculate the "D" command value needed for a desired frequency or the frequency created from a specified "D" command value.

Frequency Calculator For Vibrations MWP

Top

Script download

To download the vibration_demo_MWP demo scripts as .zs files (file type Zantiks software reads), choose the Save File As option in the right-click dialogue box. Clicking on the script name hyperlink will open a read-only version of the script.

Script download:
vibration_demo_MWP.zs