TN - 1483 Embedding Axis Camera Views in InTouch
Last updated: March 7th, 2025Description
- Author: Richard Brooks
- Published: March 7th, 2025
Details:
Description
This article from InSource shows how to embed Axis camera views in an Aveva InTouch HMI application.
- Author: Rich Brooks
- Published: 3/4/2025
- Applies to: Aveva InTouch HMI 2023 R2 SP1 or higher
Details
Live camera streams may be embedded in an InTouch application using the WebWidget.
Create a new Industrial Graphic symbol. Drag and drop the WebWidget onto the canvas.
The WebWidget has a single property named URL. Build a data change script such as the following to define the URL. URL_String, Cam_User, Cam_PW, and Cam_Num are message tags that are passed in from InTouch. The Cam_User and Cam_PW are the login and password for the camera. Cam_IP is the camera IP address. Cam_Num is the camera number. Set it to default to "1" if not defined.
dim URL_String as string;
URL_String = "https://" + Cam_User + ":" + Cam_PW + "@" + Cam_IP + "/axis-cgi/mjpg/video.cgi?camera=" + Cam_Num + "&resolution=1920x1080&fps=15";
Cam_URLPB = URL_String;
The syntax for the URL is "https://<user name>:<password>@<ip address>/axis-cgi/mjpg/video.cgi?camera=<camera number>&resolution=1920x1080&fps=15"
The camera number and resolution are optional. 1080p is the minimum resolution for some cameras. 15 frames per second is the industry standard.
The following is a screen capture of the streaming video from one of the cameras.
A preset name may be sent to a PTZ camera using the following command. Cam_PresetName is and InTouch tag used to pass the configured preset name for a camera view. This is sent following the first URL string described previously when there is a desired PTZ camera preset view required.
URL_String = "https://" + Cam_User + ":" + Cam_PW + "@" + Cam_IP + "/axis-cgi/com/ptz.cgi?gotoserverpresetname=" + Cam_PresetName;
The syntax for the URL is "https://<user name>:<password>@<ip address>/axis-cgi/com/ptz.cgi?gotoserverpresetname=<camera preset name>"