CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

MODBUS - 0C Exception

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Geps



Joined: 05 Jul 2010
Posts: 129

View user's profile Send private message

MODBUS - 0C Exception
PostPosted: Sun Sep 12, 2010 9:59 am     Reply with quote

Hi,


I have the following setup:

Code:

Slave                                            Master
PIC18F4520                                       PIC18F4580 (on CCS CAN development board)
INTRC_IO 16MHz                                   HS 20MHz

B1 - - - - - - - - - - - - - - - - - - - - - - ->B0
B0 - - - - - - - - - - - - - - - - - - - - - - ->B1


Where -> represent simple wires as described in the comment block at the top of the programs.

Both are running their respective CCS example programs.

The menu loads, I enter any command and it comes back with 0C exception.

Any ideas on how to resolve it?

Many thanks,
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Sep 12, 2010 12:36 pm     Reply with quote

0C exception is a Microsoft Windows error. You are undoubtedly running
some Windows application that is generating this error. If it's not the
CCS compiler, then it's some other Windows app, maybe written by you.
But it's not a CCS problem in that case.

Search for this on Google.
Quote:
windows "exception 0C"
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Sep 13, 2010 2:18 am     Reply with quote

Quote:
0C exception is a Microsoft Windows error


Hm. I understand, that exception code 12 respectively 0xc is issued by the MODBUS master. This simply means timeout - no answer received. The next step would be to check if the master is actually sending data, if the slave receives it, feels addressed, answers in time, the master gets the answer ... and so on.

Just the ordinary debugging work, programmers do all day. Smile
Geps



Joined: 05 Jul 2010
Posts: 129

View user's profile Send private message

PostPosted: Mon Sep 13, 2010 2:51 am     Reply with quote

PCM Programmer the 0C Exception is printed in the console directly from the PIC. Changing the error handling code in the program to, for example "Exton" changes this Exton 0C.

Thanks FvM, I'll hook up my logic analyser to it soon as I get back and see what is being sent.

My initial thoughts were it would be conversion to a 18 series PIC from the 16 series as used in the examples.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group