CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Fri Jul 21, 2017 5:42 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
 Post subject: watchdog Decoder
PostPosted: Tue Jul 04, 2017 4:17 pm 
Offline

Joined: Wed Sep 24, 2014 2:51 pm
Posts: 7
Hi,

I have an application using SoMachineV4.1 SP2 (PLC LMC058 + servodrivers LXM32). The application calculate the points and save in table (PVL.tabValores) and then this values are using in the decoder. There are two while loops in the aplication, one for calculate the points and other do fill the GEO table/execute (loop_decoder.png). Both loops are used to reduce the time between execution of the differents "steps" of the movement.The loops are in different tasks. Im put debug boolean variables that set on when enter in the loop and reset when leave. None of those variable where set when the exception happen.

The program works fine, but once a while the PLC got exception and stops. (Running fews days and stop).
Attachment:
description_exception.jpg


Tasks monitor normal cycle:
Attachment:
task_monitor_without_EXCEPTION.jpg


Task monitor with exception:
Attachment:
task_monitor_WITH_EXCEPTION.jpg


Loop decoder:
Attachment:
loop_decoder.png


Loop calcs:
Attachment:
loop_calc.png


Thanks.


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


Top
   
 Post subject: Re: watchdog Decoder
PostPosted: Thu Jul 06, 2017 8:45 am 
Offline

Joined: Thu Jan 05, 2006 11:46 am
Posts: 31
Hello,

could you please attach the whole project or at least the task configuration to see the properties(cycle time etc) ,do you have activated a watchdog for the decoding task?
With LMC058 you have to be careful with while loops.

Bruno


Top
   
 Post subject: Re: watchdog Decoder
PostPosted: Tue Jul 11, 2017 2:51 am 
Offline

Joined: Wed Sep 24, 2014 2:51 pm
Posts: 7
when took those pics the task configuration were:
Motion
priority: 1
type: External Can1_Sync
watchdog enabled: true
watchdog time: 250ms
sensitivity: 2

Can0_Sync:
priority: 2
type: External Can0_Sync
watchdog enabled: true
watchdog time: 300ms
sensitivity: 1

Decoder
priority: 3
type: Cyclic
interval: 10ms
watchdog enabled: true
wathcdog time: 300ms
sensitivity: 2

Mast
priority: 15
type: Freewheling
watchdog enabled: true
wathcdog time: 1000ms
sensitivity: 2

Task_26
priority: 26
type: Cyclic
interval: 1000ms
watchdog enabled: true
wathcdog time: 1000ms
sensitivity: 5

Because of the max time of the decoder task, I create a new task moving some POU of the decoder task. Also changeg the decoder interval but keeps doing watchdog in a while.
The new task must use in short interval have a pulse counter inside.

Decoder
priority: 3
type: Cyclic
interval: 30ms


Task_04
priority: 4
type: Cyclic
interval: 10ms
watchdog enabled: true
wathcdog time: 1000ms
sensitivity: 5


Top
   
 Post subject: Re: watchdog Decoder
PostPosted: Tue Jul 11, 2017 9:12 pm 
Offline
Frequent User
Frequent User

Joined: Wed May 04, 2016 6:00 pm
Posts: 128
Hi.

The thing that I will do is move all for loop code to the assync task, and start this code via an execute-done method.

I make all my trajectory calcs, read-write files,... in the assync task.

Enviat des del meu Aquaris M5.5 usant Tapatalk


Top
   
 Post subject: Re: watchdog Decoder
PostPosted: Wed Jul 12, 2017 3:02 pm 
Offline

Joined: Thu Jan 05, 2006 11:46 am
Posts: 31
Hello,

you should use on LMC58 a lower prio for the Decoder-Task > 15 then also increment the cycle-time e.x. to 40ms and disable the watchdog.
Also a freewheling task (Mast) on this controller is not a good idea this could also block other tasks which leads to a wachtdog.

Bruno


Top
   
 Post subject: Re: watchdog Decoder
PostPosted: Mon Jul 17, 2017 4:05 pm 
Offline

Joined: Wed Sep 24, 2014 2:51 pm
Posts: 7
I split the loop of the decoder task in other task calling by event.
Also changed the MAST task to cyclic and the priorities.

The wacthdog exception is not happing since those changes.

Thanks a lot for helping.

BR.


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

All times are UTC+01:00


Who is online

Users browsing this forum: A. Akkerman 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