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 support@ccsinfo.com

modbus_serial_receive not defined

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







modbus_serial_receive not defined
PostPosted: Tue Sep 29, 2009 1:45 pm     Reply with quote

Beginning of code strictly generated from wizard (except as noted):
Code:

#define SLAVE_PC stdout
#define MODBUS_BUS SERIAL
#define MODBUS_TYPE MODBUS_TYPE_SLAVE <-- originally gen'd SLAVE (error)
#define MODBUS_SERIAL_USE_EXT_INT TRUE
#define MODBUS_SERIAL_BAUD 9600
#define MODBUS_OUR_ADDRESS 1
#include "modbus.c"


void main()
{   modbus_init();
   fprintf(SLAVE_PC, "\n\rReady...");

   while(TRUE)
   {
      while(!modbus_serial_receive(FALSE)); <-- this is the function call not defined
...

All of this relates to modbus.c located in the drivers directory. I tried to define it extern modbus_serial_receive(byte) but that caused more problems with "different from previous definition" on
Code:
#byte TXSTA=getenv("sfr:TXSTA").

Any ideas?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Sep 29, 2009 2:06 pm     Reply with quote

Was that line put in by the CCS Wizard ?

It appears that modbus_serial_receive() is a function used in an older
version of the CCS modbus.c driver file. See this link:
http://www.infohit.si/Download/Public/PIC/PICC/Drivers/modbus.c

It appears that in the current version of the compiler (4.xxx), CCS has
re-named and re-written that function. Its new name is modbus_kbhit().
Look in the modbus.c file to see it.
Kevin Doney
Guest







Modbus problem
PostPosted: Tue Sep 29, 2009 2:27 pm     Reply with quote

Thank you for the fast response. Yes all of the code you saw came from the wizard. I had made some minor corrections first but this one I couldn't solve. I have 4.099 of all of the tools.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Sep 29, 2009 2:42 pm     Reply with quote

You should send an email to CCS support about this Wizard issue.
Tell that that it's in vs. 4.099.
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