Citectscada 2018 and Pelco

I turn to the following help.
The challenge is to implement a video signal in Citectscada 2018.
Due to the presence of Activex for PELCO cameras as part of scada,
I plan to implement this task on PELCO equipment.
The camera will stand in the rain collector, the distance to the GSM router is 30m and the power point,
I ask you to help focus on a model with a high IP (65.66.67) and, if possible, with a backlight, which Scada will pick up without problems.

Parents
  • I tried to use the Pelco ActiveX that comes with Citect recently and found has never been updated for modern cameras. See my technote: TN9046. In that article I provide an alternate method using VLC Media Player and some Cicode to open it.

    I noticed all the carriage returns in the Cicode were lost when the article was moved to the Aveva technotes and the link to another article with a supporting function was incorrect, so here is the required code. I have sent a request to Aveva to fix the article.

    //Display the feed from a camera in a popup VLC media player window 
    //If VLC is not installed in "C:\Program Files\VideoLAN\VLC" you can 
    //set the path with the citect.ini parameter: [Path]VLC  
    // 
    //Example: ShowCameraFeed("rtsp://192.168.10.225/stream1") 
    // 
    FUNCTION ShowCameraFeed(STRING sURL)     
    	STRING cMinimalInterface = "--qt-minimal-view ";
    	INT cMsgStopIcon = 16;
    	INT cRecentSizePos = 4;
    	INT nErr;
    	STRING sVLCDefaultPath;
    	STRING sVLCPath;
    	
    	sVLCDefaultPath = GetEnv("ProgramFiles(x86)");
    
    	IF sVLCDefaultPath = "" THEN
    		sVLCDefaultPath = GetEnv("ProgramFiles");
    	END
    	
    	sVLCDefaultPath = sVLCDefaultPath + "\VideoLan\VLC";
    	sVLCPath = ParameterGet("Path", "VLC", sVLCDefaultPath);
    	nErr = ExecEx("vlc.exe", cMinimalInterface + sURL, "open", sVLCPath, cRecentSizePos);
    
    	IF nErr <> 0 THEN
    		Message("Video Error", "Failed to open vlc.exe from " + sVLCPath, cMsgStopIcon);
    	END
    END
    
    
    INT mhShellExecute = -1;
    
    // Run an application or opens a file, folder, shortcut, email, or web page with the associated application
    //
    // Arguments:
    //
    // sFile           Name of the file, folder, or web page. May contain path substitutions
    // sParameters     List of parameters if running an application (default = "")
    // sOperation      Action verb for file associations. Right-click on the file in
    //                 Windows Explorer to see the available options. For example:
    //                 "edit"     Launch the editor for the document
    //                 "explore"  Open Windows Explorer for the specified folder
    //                 "find"     Open Windows Find dialog
    //                 "open"     Open the file, folder, or application (default)
    //                 "print"    Print the document
    // sDefaultFolder  Default folder for the application to use. May contain path substitutions
    // iMode           Request that the application window opens in a specific state:
    //                 0  Hidden
    //                 1  Normal (default)
    //                 2  Minimized
    //                 3  Maximized
    //                 4  Recent size & position
    //                 5  Current size & position
    //                 7  Minimized (active window remains active)
    //                 10 Default state
    //
    // Return Value:
    //
    // 0   No error
    // 2   File not found
    // 3   Path not found
    // 5   Access denied
    // 8   Out of memory
    // 11  Corrupt exe file
    // 26  Sharing violation
    // 27  File association invalid
    // 28  DDE timeout
    // 29  DDE failed
    // 30  DDE busy
    // 31  No application associated with the file or operation
    // 32  DLL not found
    //
    // Examples:
    //
    // Open Windows' Find dialog:             ExecEx("", "", "find");
    // Open Windows Explorer for c:\windows:  ExecEx("c:\windows");
    // Open a document:                       ExecEx("[data]:report.xls");
    // Print a document:                      ExecEx("c:\doc\report.doc", "", "print");
    // Open an application:                   ExecEx("notepad.exe");
    // Open a web page:                       ExecEx("http://www.citect.com");
    // Create an email message:               ExecEx("mailto:test@microsoft.com");
    // Open a shortcut:                       ExecEx("c:\documents and settings\all users\start menu\My Application.lnk");
    // Run a DOS command:                     ExecEx("cmd.exe", "/c <DOS command>");
    //
    INT
    FUNCTION
    ExecEx(STRING sFile, STRING sParameters = "", STRING sOperation = "", STRING sDefaultFolder = "", INT iMode = 1)
        INT hWindow = WinGetWndHnd();
        INT iError;
        IF mhShellExecute = -1 THEN
            mhShellExecute = DLLOpen("shell32.dll", "ShellExecuteA", "JJCCCCJ");
        END
        sFile = PathToStr(sFile);
        sDefaultFolder = PathToStr(sDefaultFolder);
        iError = DLLCallEx(mhShellExecute, hWindow, sOperation, sFile, sParameters, sDefaultFolder, iMode);
        IF iError > 32 THEN     // Any value over 32 means success
            iError = 0;
        END
        RETURN iError;
    END
    

Reply
  • I tried to use the Pelco ActiveX that comes with Citect recently and found has never been updated for modern cameras. See my technote: TN9046. In that article I provide an alternate method using VLC Media Player and some Cicode to open it.

    I noticed all the carriage returns in the Cicode were lost when the article was moved to the Aveva technotes and the link to another article with a supporting function was incorrect, so here is the required code. I have sent a request to Aveva to fix the article.

    //Display the feed from a camera in a popup VLC media player window 
    //If VLC is not installed in "C:\Program Files\VideoLAN\VLC" you can 
    //set the path with the citect.ini parameter: [Path]VLC  
    // 
    //Example: ShowCameraFeed("rtsp://192.168.10.225/stream1") 
    // 
    FUNCTION ShowCameraFeed(STRING sURL)     
    	STRING cMinimalInterface = "--qt-minimal-view ";
    	INT cMsgStopIcon = 16;
    	INT cRecentSizePos = 4;
    	INT nErr;
    	STRING sVLCDefaultPath;
    	STRING sVLCPath;
    	
    	sVLCDefaultPath = GetEnv("ProgramFiles(x86)");
    
    	IF sVLCDefaultPath = "" THEN
    		sVLCDefaultPath = GetEnv("ProgramFiles");
    	END
    	
    	sVLCDefaultPath = sVLCDefaultPath + "\VideoLan\VLC";
    	sVLCPath = ParameterGet("Path", "VLC", sVLCDefaultPath);
    	nErr = ExecEx("vlc.exe", cMinimalInterface + sURL, "open", sVLCPath, cRecentSizePos);
    
    	IF nErr <> 0 THEN
    		Message("Video Error", "Failed to open vlc.exe from " + sVLCPath, cMsgStopIcon);
    	END
    END
    
    
    INT mhShellExecute = -1;
    
    // Run an application or opens a file, folder, shortcut, email, or web page with the associated application
    //
    // Arguments:
    //
    // sFile           Name of the file, folder, or web page. May contain path substitutions
    // sParameters     List of parameters if running an application (default = "")
    // sOperation      Action verb for file associations. Right-click on the file in
    //                 Windows Explorer to see the available options. For example:
    //                 "edit"     Launch the editor for the document
    //                 "explore"  Open Windows Explorer for the specified folder
    //                 "find"     Open Windows Find dialog
    //                 "open"     Open the file, folder, or application (default)
    //                 "print"    Print the document
    // sDefaultFolder  Default folder for the application to use. May contain path substitutions
    // iMode           Request that the application window opens in a specific state:
    //                 0  Hidden
    //                 1  Normal (default)
    //                 2  Minimized
    //                 3  Maximized
    //                 4  Recent size & position
    //                 5  Current size & position
    //                 7  Minimized (active window remains active)
    //                 10 Default state
    //
    // Return Value:
    //
    // 0   No error
    // 2   File not found
    // 3   Path not found
    // 5   Access denied
    // 8   Out of memory
    // 11  Corrupt exe file
    // 26  Sharing violation
    // 27  File association invalid
    // 28  DDE timeout
    // 29  DDE failed
    // 30  DDE busy
    // 31  No application associated with the file or operation
    // 32  DLL not found
    //
    // Examples:
    //
    // Open Windows' Find dialog:             ExecEx("", "", "find");
    // Open Windows Explorer for c:\windows:  ExecEx("c:\windows");
    // Open a document:                       ExecEx("[data]:report.xls");
    // Print a document:                      ExecEx("c:\doc\report.doc", "", "print");
    // Open an application:                   ExecEx("notepad.exe");
    // Open a web page:                       ExecEx("http://www.citect.com");
    // Create an email message:               ExecEx("mailto:test@microsoft.com");
    // Open a shortcut:                       ExecEx("c:\documents and settings\all users\start menu\My Application.lnk");
    // Run a DOS command:                     ExecEx("cmd.exe", "/c <DOS command>");
    //
    INT
    FUNCTION
    ExecEx(STRING sFile, STRING sParameters = "", STRING sOperation = "", STRING sDefaultFolder = "", INT iMode = 1)
        INT hWindow = WinGetWndHnd();
        INT iError;
        IF mhShellExecute = -1 THEN
            mhShellExecute = DLLOpen("shell32.dll", "ShellExecuteA", "JJCCCCJ");
        END
        sFile = PathToStr(sFile);
        sDefaultFolder = PathToStr(sDefaultFolder);
        iError = DLLCallEx(mhShellExecute, hWindow, sOperation, sFile, sParameters, sDefaultFolder, iMode);
        IF iError > 32 THEN     // Any value over 32 means success
            iError = 0;
        END
        RETURN iError;
    END
    

Children
No Data