CameraStream Fail

cifuen
2015-10-20
2021-04-25
  • cifuen

    cifuen - 2015-10-20

    Hi,

    I tried using the camerastream example and not get it to work. (Example camera OK)

    In the attachment I show the process followed.

    Please help

    camerastream_fail.pdf [945.61 KiB]

     
    • danielkhushairi

      danielkhushairi - 2021-04-24

      Hello Cifuen.
      I am encountering the exact problem right now. With the new update of the Raspberry pi package for CODESYS, the program code is already replaced with the one you mentioned. But I do not know why mine does not work.

       
  • cifuen

    cifuen - 2015-11-03

    Solved.

    With the new installation of Apache, the working directory is / var / www / html, so replacing the progam code '/ var / www' to '/ var / www / html', the file video.htm will be copied in this directory. It works perfectly both photo and video.
    Since the installer must "start" the camera.

     
  • eschwellinger

    eschwellinger - 2015-12-04

    Hi,
    follow these instructions here:
    http://elinux.org/RPi-Cam-Web-Interface ... stallation
    seems that on installing this on Jessie is slightly different.

    In the stream example ("c:\Users\<yourwindowsusername>\CODESYS Control for Raspberry PI\2.2.0.2\Examples\CameraStream.project" ) you need to add the path</yourwindowsusername>

    IF xStart THEN
    //copy video.htm to the webserver
    SysFileCopy('/var/www/html/video.htm', 'PlcLogic/Application/video.htm', ADR(dwCopySize));

    BR
    Edwin

    IMG: location.jpg

     
  • Ernest

    Ernest - 2017-11-28

    Hi
    I just started digesting the codesys and trying to connect the USB camera to the jitter
    on raspberry pi ,use an example for streaming, but I do not turn on the camera.
    The question is, can I connect the usb camera and watch the video?
    if yes , how to do it ?

     
  • Ingo

    Ingo - 2017-11-29

    Hello Ernest,

    this heavily depends on the chip, which is used in the USB cam. Then it depends, if there is a linux driver, and if this driver is included in your kernel. The example which Edwin mentioned uses Video4Linux. So virtually every camera which supports v4l can be used in the Web Visu in the way, which is proposed by the example project.

    Sorry if I can't help you more with the specific one.

    BR,
    Ingo

    Gesendet von meinem LG-H870 mit Tapatalk

     
  • Ernest

    Ernest - 2017-12-03

    Thank you very much for the answer, I connected )))

     
  • Coco

    Coco - 2018-11-05

    When I run the camera stream example and open the visualization, I see the html/ folder as shown in the screen shot below.

    I have made sure to modify the path to as shown below:
    SysFileCopy('/var/www/html/video.htm', 'PlcLogic/Application/video.htm', ADR(dwCopySize));

    I can click on the html/ folder and this shows the streaming.

    Is there something I can do to modify my code so it starts showing streaming as soon as visualization is launched in the browser?

    Don't know if this is related or not, but I get precompiler errors: C0046: Identifier 'PiCamera' not defined, C0080: Functionblock 'Camera' must be instantiated to be access, and C0004: 'PiCamera' is no component of 'Camera'.

    Otherwise the streaming works.

    I am using Codesys 3.5 SP13 patch 1 and RPI 9 Stretch OS

    IMG: RPI_Codesys_StreamingWebPage.PNG

    IMG: RPI_Codesys_StreamingWebPage.PNG

     
  • Coco

    Coco - 2018-11-17

    Since I am new to all of this, I had to determine if this were a RPI, Apache, PHP, or a Codesys issue. I finally figured it out that there were two configuration files in my apache directory on my RPI. The 000-default.conf RootDirectory was /var/www/html and there was another configuration file called raspicam.conf and its RootDirectory was /var/www. So I changed the raspicam.conf RootDirectory to /var/www/html.
    Just in case anyone else encounters this.

     

Log in to post a comment.