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).
Tasks monitor normal cycle:
Task monitor with exception:
Loop decoder:
Loop calcs:
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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).
Tasks monitor normal cycle:
Task monitor with exception:
Loop decoder:
Loop calcs:
Thanks.
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
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
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
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
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.