This script demonstrates the code to include in a script for a behavioural assay, such as aversion learning, that involves delivering a mild shock to fish.
The shocking plates must be plugged in to socket CN5 at the back of the top box of the AD unit.
For full instructions on how to set up the AD unit with the mild shock plates see the AD Tutorial, Pavlovian avoidance learning.
A strip of LED lights are supplied with the Zantiks AD unit to test the shocking plates using the demo script below. The LEDs will flash to indicate a shock was successfully initiated (the voltage level must be no lower than 9000 for the test). To run the experiment, unplug the LED lights so the voltage isn't drained away from the plates.
The script below demonstrates how to write a script that delivers a mild electrical shock stimulus. In this script the shock stimuli is repeated 3 times with a wait period between each shock
DEFINE ITI 5 DEFINE TRIALS 3 ACTION MAIN INVOKE(SHOCK,TRIALS) COMPLETE
The code above will run an action called SHOCK and repeat for a number of times as defined by TRIALS at the top of the script.
ACTION SHOCK SET(VOLTAGE_LEVEL,9000) WAIT(ITI) SET(VOLTAGE4,70) WAIT(ITI) COMPLETE
The SET command sets the voltage level. Here it is set at at 9000 (the highest this can go is 10000).
After the unit waits for a period, defined in seconds by ITI at the the top of the script, the unit generates a pulse by setting VOLTAGE4 for 70ms followed by another wait period.
If a longer stimulus is required then this can be managed by including different code at the point that you want the continuous shock to happen. The script needs to tell the unit to turn the voltage on for a WAIT period and then turn the voltage off:
SET(VOLTAGE_LEVEL,9000) SET(VOLTAGE4,ON) WAIT(SHOCK_TIME) SET(VOLTAGE4,OFF)
To download the mild_shock_demo script as a .zs file (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.