CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Sun Nov 19, 2017 12:09 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 56 posts ]  Go to page Previous 1 2 3 4 Next
Author Message
PostPosted: Fri Oct 03, 2014 3:57 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2241
Hi,
very good, seems to work reliable.

BR
Edwin


Top
   
PostPosted: Sat Nov 01, 2014 9:12 am 
Offline

Joined: Sat Sep 13, 2014 4:27 pm
Posts: 1
hi
I have been breaking the sd card several times, the solution seems very good, doing this, we would already be enabled Retain variables ?.
Could someone put an image with condiguracion sd read only?
Thank you.
Greetings.


Top
   
PostPosted: Wed Apr 19, 2017 11:51 am 
Offline

Joined: Thu Feb 16, 2017 3:39 pm
Posts: 8
Hi,

I have several problems when the app is running for long time:


After two hours:

-I haven't trend. I tried to change the directory and configuration, always the same error.
Attachment:
after 2 hours.PNG

Attachment:
config.PNG

Attachment:
aconfig.PNG

Attachment:
codesys.PNG



After four hours:

- It can´t write log in Pendrive or SD. Error= NO_EXIST but i can see the directory and files with VNC. My personal log was running by 4h no more.

Attachment:
write error.PNG



- I haven't IPv4 and I can't access to Webvisu form Browser.
Attachment:
Ip.PNG


- I add a screenshot of the log.
Attachment:
log.PNG



Thank you very much to everyone for your help.

PD. The license was check and ok (yellow light)

BR
Hector.


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


Top
   
PostPosted: Thu Oct 26, 2017 1:36 pm 
Offline

Joined: Mon Mar 27, 2017 1:31 pm
Posts: 13
Just put my raspy in read only mode. Instead of a usb drive i created a 3rd partition and followed the instructions of Mr. Schwellinger.

Unfortunally i get a licence error for the Profinet Interface (Screenshots after Download, not started!)

Can somebody help me pls...

Regards.


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


Top
   
PostPosted: Thu Oct 26, 2017 1:55 pm 
Offline

Joined: Mon Mar 27, 2017 1:31 pm
Posts: 13
still searching in /etc/CODESYSControl.cfg (see screenshot), although i modified the /etc/init.d/codesyscontrol:

Code:
do_start () {

        make_mknod

        export PlcConfigFile=/media/CODESYSControl.cfg

        if [ -d "/sys/bus/platform/drivers/bcm2708_i2c/" ]; then
                echo bcm2708_i2c.0 > /sys/bus/platform/drivers/bcm2708_i2c/unbind
                echo 400000 > /sys/module/i2c_bcm2708/parameters/baudrate
                echo bcm2708_i2c.0 > /sys/bus/platform/drivers/bcm2708_i2c/bind
        fi

        # 1 wire
        modprobe w1-gpio pullup=1
        modprobe w1-therm

        cd /media/

        # Return
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test --chdir $WORKDIR > /dev/null || return 1
        start-stop-daemon --start --background --make-pidfile --pidfile $PIDFILE --chdir $WORKDIR --startas /bin/bash  -- -c "exec $DAEMON -d $CONFIGFILE >$LOGFILE 2>&1 " || return 2

        # pin codesys to first cpu!
        /usr/bin/taskset -a -p 01 $(cat $PIDFILE);


        sleep 1 && pgrep codesyscontrol > /dev/null && echo "codesyscontrol started" || echo "ERROR: codesyscontrol not started!";

}


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


Top
   
PostPosted: Thu Oct 26, 2017 3:32 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2241
Hi,

which readonly system do you use?
a nice approach would be this one (based on strech lite):

https://www.raspberrypi.org/blog/adafruits-read-only/

BR
Edwin


Top
   
PostPosted: Fri Oct 27, 2017 6:13 am 
Offline

Joined: Mon Mar 27, 2017 1:31 pm
Posts: 13
Hello Mr. Schwellinger,

I used the raspian strecht lite (https://downloads.raspberrypi.org/raspbian_lite_latest).

After first boot, i used fdisk to resize root partition to 4gig. Then i created a 3rd partition with the remaining memory (i use a 8gig SD) and folled every step mentioned by your previous post...

Can you explain the first error of my last screen: "cannot find configuration /etc/CODESYSControl.cfg"? Why CODESYS still searching in this directory instead of /media/CODESYSControl.cfg?

Regards,
adv


Top
   
PostPosted: Fri Oct 27, 2017 8:54 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2241
Hi,
I'm using it that way(this is a bit tricky, guess there are many better solutions for doing it):
Install Stretch lite on the SD Card.
Execute
read-only-fs.sh

I use this jumper on GPIO Pins to select on bootup if the whole SD is monted readonly or not.
- set to rw - insall the CODESYS Runtime via Update Tool
-license the CODESYS Pi runtime
then execute the following script once:

read-only-CDS_after_licenseing.sh

#!/bin/bash

# Use this script to setup the licenses once in RW mode after activateing the license

mkdir /home/pi/cmact_licenses
cp /var/opt/codesys/cmact_licenses/* /tmp/cmact_licenses/
cp /var/opt/codesys/cmact_licenses/* /home/pi/cmact_licenses/
rm /var/opt/codesys/cmact_licenses/*
rmdir /var/opt/codesys/cmact_licenses
sudo ln -sf /tmp/cmact_licenses/ /var/opt/codesys/cmact_licenses


Then add to /etc/init.d/codesyscontrol just before the runtim start

[b]read-only-CDS.sh
[/b]
#!/bin/bash

# CDS Extension make it work this need to be called before CDS runtime starts

mkdir /tmp/cmact_licenses
cp /home/pi/cmact_licenses/* /tmp/cmact_licenses


This procedure copy the license to rw ram - which is needed to have it up an working.

BR
Edwin

Sure you could only copy new applications to the readonly Pi if you set this Jumper on the GPIO's to have it in RW mode.
BR
Edwin


Top
   
PostPosted: Tue Nov 07, 2017 8:31 am 
Offline

Joined: Mon Mar 27, 2017 1:31 pm
Posts: 13
Ok... but that's just another solution for read only raspy and don't solve my specific problem.

Can you just explain, why CODESYS searching in /etc/CODESYSControl.cfg although i modified the /etc/init.d/codesyscontrol...

I think this is the problem, which has to be fixed, instead of changing the whole setup like you described in your previous post...

Regards.


Top
   
PostPosted: Wed Nov 08, 2017 6:55 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2241
Hi,

guess you haved missed to change it here:

BR
Edwin


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


Top
   
PostPosted: Wed Nov 08, 2017 8:01 am 
Offline

Joined: Mon Mar 27, 2017 1:31 pm
Posts: 13
no!


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


Top
   
PostPosted: Wed Nov 08, 2017 12:46 pm 
Offline

Joined: Mon Mar 27, 2017 1:31 pm
Posts: 13
Dont understand the messages (see screenshot):


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


Top
   
PostPosted: Wed Nov 08, 2017 11:20 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2241
Hi,
you need to move the 3S.dat from /etc/ to your new runtime directory... (Location where CODESYSControl.cfg is located)

BR
Edwin


Top
   
PostPosted: Thu Nov 09, 2017 10:23 am 
Offline

Joined: Mon Mar 27, 2017 1:31 pm
Posts: 13
no, already done! :(

EDIT:
Which files are mandatory for licensing?
In which directory has these files to be exist?
Which files/directory has to be writable?

If i go to PLC-settings (SPS-Einstellungen) to "edit license" I see the license (see screenshot):


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


Last edited by adv on Thu Nov 09, 2017 10:36 am, edited 1 time in total.

Top
   
PostPosted: Thu Nov 09, 2017 10:33 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2241
hi,
then you Need to adapt this entry here:

BR
Edwin


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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 56 posts ]  Go to page Previous 1 2 3 4 Next

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 3 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:  
Powered by phpBB® Forum Software © phpBB Limited