search
Start typing to search...

Using Visca to Control a PTZ Camera From Aximmetry

Author:

Introduction

Aximmetry can send VISCA-over-IP commands directly to most professional PTZ cameras, allowing you to control your PTZ camera directly from within Aximmetry.
This guide explains:

  • How to add a VISCA device in Aximmetry
  • How to use ready-made command compounds for major brands
  • How to build custom commands when your camera or a specific feature is not yet covered

Setting Up Visca for Controlling Cameras

Open the Manage Devices... menu.
NOTE: If you just started Aximmetry Composer and you are at the Aximmetry Startup Configuration Window, click on the Manage Devices... button. If you are already running Aximmetry Composer, go to Edit\Manage Devices...

Scroll down to the bottom and select Visca under Camera Controllers, then click Add...:

Specify the target camera's Hostname (IP address) and the Port number. Click OK when you are ready to Add a new Visca Channel, then click OK again to save the changes in the Manage Devices menu:

Sending Commands

Different PTZ brands use various command sets. To accommodate this, Aximmetry provides pre-made compounds for the Bolin, Canon, PTZOptics, and Sony brands. These compounds are designed for easy integration with Aximmetry's data formats and use the correct commands for each specific brand.

Using Command Set Compounds

The command set compounds are located in [Common_Studio]:Compounds\Visca\, with each brand having its own subfolder.

Within each brand's folder, you will find multiple compounds, each controlling a specific aspect of the PTZ camera. You can drag and drop these into any compound (project) you are working on.

NOTE: In the File Browser, you can select multiple compounds by holding Shift or Ctrl, then drag and drop all of them at once into the Flow Editor. Once dropped, all are selected in the Flow Editor. Since the Flow Editor allows you to edit pins of multiple selected nodes at once, this is a convenient time to set all these compounds' Device pin (details below).

Example: Resetting Pan and Tilt

Let’s consider the [Common_Studio]:Compounds\Visca\Canon\PanTilt_Reset.xcomp compound. This compound sends a simple reset command to return the PTZ camera to its default pan and tilt position.

All Visca compounds have the following common pins:

  • Engine: Determines which machine(s) send the Visca command. In multi-machine setups, you may want a different machine to send commands rather than the controller machine. For single-machine setups, leave this at the default Local setting.
  • Device: Select here the device you previously specified in Manage Devices as the Camera Controller.
  • Send: Triggers the command to be transmitted to the selected Device.

Triggering the Send of the PanTilt_Reset.xcomp compound will reset the PTZ camera to its default pan and tilt position.

Example: Setting Pan and Tilt Position

Now, consider the [Common_Studio]:Compounds\Visca\Canon\PanTilt_AbsolutePosition.xcomp compound. This one offers additional parameter pins:

  • Pan Position and Tilt Position: Defines the new rotational position for the PTZ camera.
  • Speed: Sets the movement speed.

When Send is triggered, the parameters are sent together and the camera moves accordingly.
If Auto Send is enabled, any change to these parameters immediately sends the update to the PTZ camera, so manual triggering with Send is not necessary.

Creating Custom Commands with the Camera Controller Module

If your brand or specific device is not already covered, or you need a Visca command not addressed by existing compounds, you can create your own using the Camera Controller module.

For simple instructions without parameters, you can usually find the command's Hexadecimal format in your PTZ camera’s documentation.
Use a Text To Bytes module, copy and paste the Hex command into its Text pin, set the Source Format to Hexadecimal, and then connect the Out pin to the Camera Controller module's Command Bytes pin:

The Camera Controller module works similarly to the above Visca compounds but also includes a Priority pin, allowing you to specify command-sending order if multiple modules are triggered simultaneously.

Complex Commands

For commands with parameters (e.g., setting a new position), it is best to start with an existing Visca compound, such as the [Common_Studio]:Compounds\Visca\Canon\PanTilt_AbsolutePosition.xcomp compound.
Add it to the Flow Editor. Right-click and use Edit Compound In-Place from the context menu:

You can read more about Edit Compound In-Place here: Linked Compound

Then, you can double-click on the PanTilt_AbsolutePosition compound to enter it. Inside, you will see that the base command is specified by the Text To Bytes module.
The parameters are processed by helper compounds. First, the rotation values are converted into integers. In this case, the conversion requires information about the minimum and maximum possible rotation for the PTZ camera. Next, these parameters are converted into bytes by the ViscaParam_ compounds.

Article Content

Loading
Close
Loading spinner icon
1/10