Promotic

How to use cameras in the PROMOTIC system

The commonly sold Web cameras are connectable either via the USB to specific computer, or independent IP cameras connected via Wi-Fi or directly into LAN networks.

The advantages and disadvantages:
The USB Web camera is the cheapest solution but it must be located near the computer, requires the installation of WDM or BDA drivers, that are not always 100% reliable, requires additional software for displaying or streaming the captured images, and while streaming, the images are delayed 3 - 10 seconds compared to reality.
For the IP camera the higher price is the main disadvantage, but it is independent on the computer and the distance is also not the issue, the supplied software or the images provided in the network can be easily integrated in the PROMOTIC system, it is more reliable, and suffers minimal image delay.

From the practical point of view, we therefore recommend the usage of Web IP cameras in the PROMOTIC system.

WebCam - USB

The cameras connectable via the USB require the installation of WDM or BDA drivers created by the manufacturer of the specific device (similarly to PC TV cards, etc.). But in Windows OS, there is no default application, able to use such drivers and display the captured images. One possible solution is to use some software (VLC media player), that can connect to such drivers, convert the captured video (sound) into some known format (WMV), and offer that video on specified IP address and port into the LAN network in the form of streamed video. When receiving such stream, we follow the same way as for the RSTP protocol described below.

WebCam - Lan (IP)

The manufacturers of these devices are also providing the corresponding software. The software is usually used for detecting the IP address of the camera via the Web interface. After the camera is detected, the software can be used for controlling the cameras (zoom, turning, ...) and additional parameters. The software may also contain ActiveX object for displaying the streamed video. The network device can also act as Web server, offering Web pages (on its IP address) containing the streamed video. If the current type supports RTSP (Real Time Streaming Protocol), then the video can be displayed in arbitrary stream viewer (WMP, Winamp ...). If the current type supports FTP (File Transfer Protocol), then it is possible to save the stream into the file(s).

The possible options of displaying the streamed video in the PROMOTIC application:

- if the ActiveX object displaying the streaming video is available:
In the panel of the PROMOTIC application select "Preconfiguration PmgActiveX "ActiveX - General"". In the "ProgID" configurator select the corresponding ActiveX and its interface is used in order to connect to the camera's IP address (tested with Air Live WL-5400CAM type).


- if the RTSP protocol is supported:


1) Windows media player

In the panel of the PROMOTIC application select "Preconfiguration PmgActiveX "ActiveX - General"". In the ActiveX objects list select the Windows media player and its properties menu is used for setting the camera's URL address (the url entry).
Another option is to create own HTML page containing the Windows media player plugin with the connection to a specific address. This page can be then offered by the PmaWebDir object and also displayed by the PmaReport object.
Example of the HTML page:
for connection the Windows Media Player plugin to a stream on the IP address 10.131.184.70 and on port 8090
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WebCam</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
<!-- //
function Init()
{
    var oVideoPlayer = '<embed id="tgPlugin" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows/mediaplayer/" src="http://10.131.184.70:8090" width="640" height="480" hidden="false" showstatusbar="1" showcontrols="1" autostart="true"></embed>';
    document.getElementById("tgVideoPlayer").innerHTML=oVideoPlayer;
}
window.onload=Init;
//-->
</script>
</head>
<body>
<div id="tgVideoPlayer"></div>
</body>
</html>


or

2) VLC player

Another option is to use the ActiveX object VideoLAN.VLCPlugin that can be installed to computer together with the VLC playeru installation. In the panel, then select the PmgActiveX object that connects to this plugin. In the onStart event of this object then set the connection to RTSP stream as follows:
VLC plugin - connecting the RTSP stream:
JavaScriptVBScriptSelect and copy to clipboard

var oPlayer = pMe.Acx;
oPlayer.playlist.add("rtsp://streamaddress");
oPlayer.playlist.play();
oPlayer.volume = 50;
oPlayer.Toolbar = false;


- If the camera offers the Web page containing the streaming video on its IP address:
The PmaReport object can be used for displaying the desired page.
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
 
- How to use cameras in the PROMOTIC system
 
 
- SVG
© MICROSYS, spol. s r.o.