CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Sun Dec 16, 2018 7:25 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
 Post subject: CameraStream Fail
PostPosted: Tue Oct 20, 2015 9:56 pm 
Offline

Joined: Sun Dec 28, 2014 11:48 am
Posts: 7
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


You do not have the required permissions to view the files attached to this post.


Top
   
 Post subject: Re: CameraStream Fail
PostPosted: Tue Nov 03, 2015 6:11 pm 
Offline

Joined: Sun Dec 28, 2014 11:48 am
Posts: 7
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.


Top
   
 Post subject: Re: CameraStream Fail
PostPosted: Fri Dec 04, 2015 7:19 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3019
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

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

BR
Edwin


You do not have the required permissions to view the files attached to this post.


Top
   
 Post subject: Re: CameraStream Fail
PostPosted: Tue Nov 28, 2017 4:32 pm 
Offline

Joined: Thu Nov 23, 2017 4:32 pm
Posts: 22
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 ?


Top
   
 Post subject: Re: CameraStream Fail
PostPosted: Wed Nov 29, 2017 2:18 pm 
Offline

Joined: Mon Dec 13, 2010 3:02 pm
Posts: 44
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


Top
   
 Post subject: Re: CameraStream Fail
PostPosted: Sun Dec 03, 2017 10:18 pm 
Offline

Joined: Thu Nov 23, 2017 4:32 pm
Posts: 22
Thank you very much for the answer, I connected )))


Top
   
 Post subject: Re: CameraStream Fail
PostPosted: Mon Nov 05, 2018 12:29 am 
Offline

Joined: Fri Aug 19, 2016 7:36 pm
Posts: 3
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


You do not have the required permissions to view the files attached to this post.


Top
   
 Post subject: Re: CameraStream Fail
PostPosted: Sat Nov 17, 2018 10:22 pm 
Offline

Joined: Fri Aug 19, 2016 7:36 pm
Posts: 3
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited