CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Fri Nov 24, 2017 12:59 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Fri Dec 30, 2016 10:03 am 
Offline

Joined: Mon Apr 25, 2011 1:37 pm
Posts: 7
Hello!

I connected CANopen bus. connection is correct, as shown in Figure
Attachment:
can_ok.png


after rebooting the controller connection is lost, as shown in the figure. Diagnosis of an error. "NetID 0: No CAN driver"
Attachment:
can_error.png


after the operation "Tool -> Update Beaglebone Black" the connection is restored, as shown in the figure
Attachment:
can_ok.png


What is the reason and what can be done?
I tried different versions of packages (3.5.9.0 and 3.5.10.0)
CoDeSys version 3.5 SP9+
I'm use bone-debian-8.6-lxqt-4gb-armhf-2016-11-06-4gb.img


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


Top
   
PostPosted: Sat Dec 31, 2016 7:22 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2253
Hi,
at moment no idea why this happens.
Have no hw here to check. But never seen it before.
Somehow the can driver is not ready at the point when the runtime is starting up.

Could you test if a restart lead to a working bootproject

/etc/init.d/codesyscontrol stop
/etc/init.d/codesyscontrol start


then a

cat /tmp/codesyscontrol.log and give us this output.

BR
Edwin


Top
   
PostPosted: Mon Jan 02, 2017 8:53 am 
Offline

Joined: Mon Apr 25, 2011 1:37 pm
Posts: 7
Happy New Year!

Thank you for responding quickly.

I am able to check only on 9 January.
Just write the result.


Top
   
PostPosted: Mon Jan 09, 2017 11:39 am 
Offline

Joined: Mon Apr 25, 2011 1:37 pm
Posts: 7
Hi!

1) After reboot saved log file -
Attachment:
codesyscontrol_after_reboot.zip

possible reason:
Socket_CanMiniDriver_Setup[1050]: using /opt/codesys/scripts/rts_set_baud.sh
Socket_CanMiniDriver_Setup[1063]: registering can interface 0
openRxSocket[583]: Opened socket for reading (can0)
openRxSocket[589]: ioctl(SIOCGIFINDEX): No such device

canopen bus NOT worked

2) After restart working bootproject
(/etc/init.d/codesyscontrol stop
/etc/init.d/codesyscontrol start) saved log file -
Attachment:
codesyscontrol_after_stop_start_service.zip


not exist error ioctl for can0

canopen bus worked

Somehow the can driver is not ready at the point when the runtime is starting up?
Help me, please!


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


Top
   
PostPosted: Wed Jan 11, 2017 3:45 pm 
Offline

Joined: Mon Apr 25, 2011 1:37 pm
Posts: 7
Hi,

I found a temporary solution.

I edited file /etc/rc.local
and add next strings:
sleep 15
systemctl stop codesyscontrol
sleep 1
systemctl start codesyscontrol

CAN bus work after a reboot, but now the boot is taking longer than 16 seconds.
Something wrong in codesyscontrol!
Need help developers!


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


Top
   
PostPosted: Thu Jan 12, 2017 9:14 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2253
hi,

our problem at the moment is on our board this does not happen.
Then can0 interface starts relieable.
So I would give this a try:

add in /etc/network/Interfaces then can0 interface

Example:

auto can0
iface can0 inet static
address 192.168.99.1
netmask 255.255.255.0
network 192.168.99.0

Could you please try this an give a feedback if this solves it reliable for every startup?

BR
Edwin


Top
   
PostPosted: Sun Jan 15, 2017 10:37 am 
Offline

Joined: Mon Apr 25, 2011 1:37 pm
Posts: 7
Hi,
Thanks for the advice!
I'll try tomorrow and I will write immediately.
Network settings work through the file /etc/network/interfaces in Debian 8.6?
I thought all the network settings in Debian 8.6 (Jessie) made through the service ConnMan, and file /etc/network/interfaces is not used.

The original post I got this from can be found here: https://groups.google.com/forum/#!topic ... fNwIk_dWlg.
Thanks to Brian Anderson for the original comment.


Top
   
PostPosted: Mon Jan 16, 2017 2:59 pm 
Offline

Joined: Mon Apr 25, 2011 1:37 pm
Posts: 7
Hi,

I'm try add in /etc/network/Interfaces then can0 interface

auto can0
iface can0 inet static
address 192.168.99.1
netmask 255.255.255.0
network 192.168.99.0

NOT worked!
(After restart BBB, command ifconfig not show can0)

What else can I try?


Top
   
PostPosted: Wed Jan 18, 2017 8:15 am 
Offline

Joined: Tue Sep 06, 2016 9:46 am
Posts: 2
Hi all!

Same problem with my app. Thank you alt your previous post, it was very helpful for me (rc-local solution).

One more thing... Have you any experience, whats happening when BBB starting on the CANbus, because I have an other CAN capable device and if BBB starting then the other device going to wrong?! It means the ARM processor will stop when my BBB booting.

Regards, Siggi.


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


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