CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Fri Sep 20, 2019 10:39 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Force Crash
PostPosted: Mon Jul 01, 2019 10:39 am 
Offline

Joined: Thu Jan 24, 2019 10:15 am
Posts: 8
Hello,

I am searching errors in our ECU code. Allegedly the ECU crashes every once in a while. I have created some diagnostic source, which I would like to test. Therefore I want to let the ECU crash.

Is there an (easy) way to let the ECU crash explicitly?
(Division by zero didn't work -> "inf". How about pagefaults?)

Best regards and thanks in advance


Top
   
 Post subject: Re: Force Crash
PostPosted: Tue Jul 02, 2019 12:40 pm 
Offline

Joined: Thu Jan 24, 2019 10:15 am
Posts: 8
This worked for me:

Code:
   test_byte: BYTE :=5;
   test_crash: POINTER TO BYTE;

Code:
test_crash := 16#FF88FF12;
test_crash^:=5;


Top
   
 Post subject: Re: Force Crash
PostPosted: Tue Jul 02, 2019 1:08 pm 
Offline
Frequent User
Frequent User

Joined: Thu Mar 17, 2016 1:24 pm
Posts: 187
Or one line less:

Code:
   test_byte: BYTE;
   test_crash: POINTER TO BYTE;
   
   test_byte := test_crash^;

_________________
Make CODESYS great again


Top
   
 Post subject: Re: Force Crash
PostPosted: Tue Jul 02, 2019 1:39 pm 
Offline

Joined: Thu Jan 24, 2019 10:15 am
Posts: 8
That didn't work for me...


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 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