248 C1553M-B (4/05)
The camera is locked during the delay. An operator who is viewing the camera’s gadget or Device Control dialog box when the FTP delay occurs
will see the Lock button change to yellow, indicating that the camera is locked by a script. For information on the Lock button, refer to the
appropriate camera Driver Notes in the VMX300(-E) Client Operation Manual.
File name: FTP image files are JPG files. The file name should end with “.jpg”. If a file of that name already exists on the FTP server, the old file
is overwritten when the new one is uploaded.
In detail, VMX300(-E) executes an FTP statement as follows:
1. If the specified custom window is closed, open the window. Set the window content type to LiveVideo.
2. Switch the specified camera to the window. If the switch was unsuccessful, the FTP command fails.
3. If the switch was successful, lock the camera and start timing the delay. A delay of zero seconds causes the capture to be taken
immediately.
4. If a preset is specified, send the camera to the preset.
5. When the delay has elapsed, unlock the camera. If the camera was sent to a preset, check that it is still positioned at the preset. The
camera might have been moved from the preset by a user or script with higher priority than the FTP script. If the camera is not at the preset,
the FTP command fails.
6. Capture the video displayed in the custom window and create the image file.
7. When the image file has been created, log in to the FTP server and upload the file. If a file with the specified name already exists, overwrite it.
Failure: If any step in the FTP process fails, the FTP command fails. If you want the script to continue executing, include an ON ERROR RESUME
NEXT command at the beginning of the script.
Below are some possible causes of failure:
No switch path found.
The camera is locked by a higher priority user or script, and the camera is not at the desired preset.
A higher priority user or script took the lock from the FTP script and moved the camera.
An operator or script switched a different camera to the window after the FTP switch.
An operator or script changed the content type of the FTP window before the capture was taken.
The capture failed, possibly because the window has the wrong type of canvas defined for it.
The specified preset does not exist, because it has been renamed.
FTP SCRIPTS
Like any script command, the FTP command can be used in any type of script. Often, FTP commands are put in a global script that is run from a
schedule’s script using the RUN command. Putting the FTP commands in a global script allows you to have more than one schedule that calls the
script. For example, you might want to have two schedules: one for weekdays and another for weekends, so the sequence can be run more
frequently on weekdays.
Using a global script also allows an operator to run the script on demand from the client, provided the operator has the necessary permissions.
Make sure you limit permissions to just those users you want to be able to run the global script.
A schedule runs on the client of any operator specified in the schedule’s recipient group, provided the operator is logged in when the script
executes. If no recipients are specified in the schedule, VMX300(-E) runs the script on any running client that has the necessary window.
In some cases, VMX300(-E) will execute different lines of the script on different clients. For example, suppose a particular schedule has no
recipients. The schedule’s script has two FTP commands:
FTP Window1, Cam1, NoPreset, 0, Corway_Web_Site, “image.jpg”
FTP Window2, Cam1, NoPreset, 0, Corway_Web_Site, “image.jpg”
The only difference between the two commands is the window specified. When the first FTP command executes, VMX300(-E) looks for a running
client that has Window1 defined on it. Suppose Client1 is running and has Window1 defined on it. The first FTP command executes on Client1.
When the second FTP command executes, VMX300(-E) looks for a running client that has Window2 defined on it. Suppose Client2 is running and
has Window2 defined on it. The second FTP command executes on Client2.