Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
please access the webvisu in your browser and then give me a screenshot of the logger in codesys (if you do at in /tmp/codesyscontol.log - this is only flushed from time to time)
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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.
- I haven't IPv4 and I can't access to Webvisu form Browser.
- I add a screenshot of the log.
Thank you very much to everyone for your help.
PD. The license was check and ok (yellow light)
BR
Hector.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
still searching in /etc/CODESYSControl.cfg (see screenshot), although i modified the /etc/init.d/codesyscontrol:
do_start(){    make_mknod    exportPlcConfigFile=/media/CODESYSControl.cfg    if[-d"/sys/bus/platform/drivers/bcm2708_i2c/"];then        echobcm2708_i2c.0>/sys/bus/platform/drivers/bcm2708_i2c/unbind        echo400000>/sys/module/i2c_bcm2708/parameters/baudrate        echobcm2708_i2c.0>/sys/bus/platform/drivers/bcm2708_i2c/bind    fi    # 1 wire    modprobew1-gpiopullup=1    modprobew1-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||return1    start-stop-daemon--start--background--make-pidfile--pidfile$PIDFILE--chdir$WORKDIR--startas/bin/bash ---c"exec $DAEMON -d $CONFIGFILE >$LOGFILE 2>&1 "||return2    # pin codesys to first cpu!    /usr/bin/taskset-a-p01$(cat$PIDFILE);    sleep1&&pgrepcodesyscontrol>/dev/null&&echo"codesyscontrol started"||echo"ERROR: codesyscontrol not started!";}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 licensemkdir /home/pi/cmact_licensescp /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_licensessudo 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 startsmkdir /tmp/cmact_licensescp /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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
no i alreade changed this like you mentioned in your previous post:
Zitat:
6.add/change to /etc/CODESYSControl.cfg [SysFile]
FilePath.1=/etc/, 3S.dat
FilePath.2=/media/, .app, .crc
move CODESYSControl.cfg and 3S.dat to your new location - in my case /media/
rootDesired=Unknown/Install/Remove/Purge/Hold|Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend|/Err?=(none)/Reinst-required(Status,Err:uppercase=bad)||/Name      Version   ArchitectureDescription+++-==============-============-============-=========================================ii codesyscontrol3.5.11.10  all     V3.5.11.10,Do10.Aug12:28:26CEST2017
I recognize following and maybe that is a problem. In your instruction you said:
Zitat:
5. change the runtime application directory to /media
sudo nano /etc/init.d/codesyscontrol
see screenshot
and change the location of PlcConfigFile
export PlcConfigFile=/media/CODESYSControl.cfg
and
cd /media/
In the screenshot i put my /etc/init.d/codesyscontrol.
I changed/added the yellow lines. The script is slightly diffrent then yours (see orange rectangle).
And i see that WORKDIR still pointing to /var/opt/codesys which is a unionfs (/var_org and /var_rw). So writing an boot image for example will not be stored remanent on the sd card (stored to /var_rw/opt/codesys which is a ramfs)?!?!
You said:
Zitat:
...
2. all applications files are redirected to /media (Usb stick)
you should see Application.app, Application.crc visu directory etc on the USB Stick /media
...
and thats not the case. Maybe soming in the init.d script has changed which i have to pay attention on?!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
you mean everything works now (your license - missing license file) is solved?
I think the missing part is now:
Since 3.5SP11 the /etc/CODESYSControl.cfg is splittet in an fix part
CODESYSControl.cfg and Userpart CODESYSControl_User.cfg ... so if you do an download CODESYS add in CODESYSControl_User.cfg
the name of the Booproject for example.
'and thats not the case. Maybe soming in the init.d script has changed which i have to pay attention on?!'
Could you please check if on your /media/PlcLogic Directory after downloading the application you see Application/Application.app and Application.crc?
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Zitat:
Since 3.5SP11 the /etc/CODESYSControl.cfg is splittet in an fix part
CODESYSControl.cfg and Userpart CODESYSControl_User.cfg ... so if you do an download CODESYS add in CODESYSControl_User.cfg
the name of the Booproject for example.
1.) I changed the WORKDIR variable in the init.d script to /media/var/opt/codesys. Then i created the directorys and copied all files from /var/opt/codesys to it.
2.) I copied the file /etc/CODESYSControl_User.cfg to /media/CODESYSControl_User.cfg
3.) I changed the path /etc/CODESYSControl_User.cfg to /media/CODESYSControl_User.cfg in the configuration file /media/CODESYSControl.cfg
After reboot CODESYS starts normally, but still with the licence issue. Downloading an application successfully creates the directoy /media/var/opt/codesys/PlcLogic/Application and the files "Application.app and Application.crc".
As expected, in the directoy /var/opt/codesys/PlcLogic nothing is created.
After 2nd reboot i can go online and the application is running!
So "only" the license issue is still a problem...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
please access the webvisu in your browser and then give me a screenshot of the logger in codesys (if you do at in /tmp/codesyscontol.log - this is only flushed from time to time)
BR
Edwin
Log.
hi,
seems to work from logger messages... is that the case where you do not have a connection in the browser?
The error case screenshot is needed.
BR
Edwin
No.
I try to send a new log when the problem exists.
Regards
Hi Edwin.
1000 watchdog reboots in 12 hours with sd card read only and usb drive as run time host without problem!
Regards.
Hi,
very good, seems to work reliable.
BR
Edwin
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.
Hi,
I have several problems when the app is running for long time:
After two hours:
After four hours:
Thank you very much to everyone for your help.
PD. The license was check and ok (yellow light)
BR
Hector.
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.
still searching in /etc/CODESYSControl.cfg (see screenshot), although i modified the /etc/init.d/codesyscontrol:
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
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
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 licensemkdir /home/pi/cmact_licensescp /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_licensessudo 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 startsmkdir /tmp/cmact_licensescp /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
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.
Hi,
guess you haved missed to change it here:
BR
Edwin
no!
Dont understand the messages (see screenshot):
Hi,
you need to move the 3S.dat from /etc/ to your new runtime directory... (Location where CODESYSControl.cfg is located)
BR
Edwin
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):
hi,
then you Need to adapt this entry here:
BR
Edwin
no i alreade changed this like you mentioned in your previous post:
I just change the entry to this:
Still not working...
EDIT:
Missing license is just for Profinet right?!?!?
[SysFile]
FilePath.1=/media/, 3S.dat
FilePath.2=/media/, .app, .crc
if you see a message in the logger 'missing license file'
all fieldbus licenses/webvisu is missing.
You are using 3.5SP11 runtime - right?
BR
Edwin
yes, 3.5.11.10:
Package-Info:
I recognize following and maybe that is a problem. In your instruction you said:
In the screenshot i put my /etc/init.d/codesyscontrol.
I changed/added the yellow lines. The script is slightly diffrent then yours (see orange rectangle).
And i see that WORKDIR still pointing to /var/opt/codesys which is a unionfs (/var_org and /var_rw). So writing an boot image for example will not be stored remanent on the sd card (stored to /var_rw/opt/codesys which is a ramfs)?!?!
You said:
and thats not the case. Maybe soming in the init.d script has changed which i have to pay attention on?!
Hi,
you mean everything works now (your license - missing license file) is solved?
I think the missing part is now:
Since 3.5SP11 the /etc/CODESYSControl.cfg is splittet in an fix part
CODESYSControl.cfg and Userpart CODESYSControl_User.cfg ... so if you do an download CODESYS add in CODESYSControl_User.cfg
the name of the Booproject for example.
[CmpSettings]
FileReference.0=SysFileMap.cfg, SysFileMap
FileReference.1=/etc/CODESYSControl_User.cfg
Maybe you addapt this already.
'and thats not the case. Maybe soming in the init.d script has changed which i have to pay attention on?!'
Could you please check if on your /media/PlcLogic Directory after downloading the application you see Application/Application.app and Application.crc?
BR
Edwin
no, license still dont work!
1.) I changed the WORKDIR variable in the init.d script to /media/var/opt/codesys. Then i created the directorys and copied all files from /var/opt/codesys to it.
2.) I copied the file /etc/CODESYSControl_User.cfg to /media/CODESYSControl_User.cfg
3.) I changed the path /etc/CODESYSControl_User.cfg to /media/CODESYSControl_User.cfg in the configuration file /media/CODESYSControl.cfg
After reboot CODESYS starts normally, but still with the licence issue. Downloading an application successfully creates the directoy /media/var/opt/codesys/PlcLogic/Application and the files "Application.app and Application.crc".
As expected, in the directoy /var/opt/codesys/PlcLogic nothing is created.
After 2nd reboot i can go online and the application is running!
So "only" the license issue is still a problem...