This demo script demonstrates how you can capture an image (picture) and a video during a model organism behavioural assay run in a Zantiks unit.
You may use the video and picture commands any number of times during your experiment.
When recording a video make sure that the length of the video (in seconds) is shorter that the time programmed to run after the video command. The maximum length of a video is one hour (3,600 seconds). You can program the unit to take more than one video during an experiment, however bear in mind that there is a limit on how much storage is on the unit so it won't be able to store too many long videos. Consequently users who want a video record often program multiple videos, for a short period, at different stages of the experiment.
INCLUDE zsys DEFINE ITI 15 ACTION MAIN VIDEO(14,"videotest") WAIT(ITI) PICTURE("ZPIC") COMPLETE
- Every script must start with INCLUDE ZSYS.
- A value of 15 for ITI is defined.
- ACTION MAIN starts the main experiment.
- A video of the arena will be recorded for 14 seconds and called videotest (or any name put in parentheses " " and saved in the Media directory on the unit). You can view and download the video straight after the experiment finishes.
- The unit will wait the unit of time (ITI) as defined earlier, in this case 15 seconds.
- A picture of the arena will be captured before the experiment finishes. This image (called ZPIC in this instance) will be saved in the unit's Media directory.
Using the video function
You can easily add the video function into any of your scripts.
Points to remember:
- You can program the script to take videos of any length, calculate the length in seconds and insert this number in the line of code above in place of the X.
- You can only take one video at a time. If you start a video, you can only begin a second video recording after the first recording has finished.
- If the script finishes before the video has finished recording, the video will continue to record until programmed, unless you switch the unit off. Please note, this could impact on a new service that you run.
Here you can download the video picture demo. Right click on the download link below and download / save the file as a zanscript file, i.e. in the same format: video_picture_demo.zs .
Script download: video_picture_demo.zs
Run the demo service
Build as a service - Copy and paste the demo script into the unit's Zanscript directory. Once you are happy with the script, click on Build so that you create a service (.zex file) which will automatically save in the Services directory. Go to the Settings page and save the service in one of the 20 slots a service - in this instance write video_picture_demo in a slot and click on Set.
Run the demo service - The experiment can now be operated from the home page. In the following video example the demo script was run with 1 fake fish.
This 'videotest' was recorded in the unit using the script above.