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

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







Modbus
PostPosted: Sun Jul 22, 2007 7:53 pm     Reply with quote

Hi !

I looking the easy way to control a WAGO 750-315 Rs485 Modbus with pic 16f876 ?

I just nned to turn on and off output on it !

Thanks in advance

Alain Tanguay
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jul 22, 2007 10:07 pm     Reply with quote

CCS has a modbus driver and 3 example files for modbus. Look in the
Drivers and Examples directories for the current CCS compiler.
(Don't ask me to post them. It's against the forum rules).

Also, Neutone has posted a modbus example in this forum's code library.
umka



Joined: 28 Aug 2007
Posts: 99
Location: New Zealand

View user's profile Send private message

PostPosted: Wed Feb 27, 2008 7:14 pm     Reply with quote

what is the name of the example files coz i can find any. i can find the modbus driver.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 27, 2008 8:53 pm     Reply with quote

I find files by using a text search program such as Examine32.
When I tell it to search the compiler directory for all .c and .h files
containing the word 'modbus', I get this result:
Quote:

c:\program files\picc\examples\ex_modbus_master.c
c:\program files\picc\examples\ex_modbus_slave.c
c:\program files\picc\examples\ex_modbus.c
c:\program files\picc\drivers\modbus.c


You can do the same thing by using the Windows "Find" program.
Go to Explorer and navigate to the compiler directory. Then press F3.
In the 'Find' window, enter *.c for the files to search, and then enter
"modbus" in the text to search box. It will find those files even quicker
than Examine32 will.
umka



Joined: 28 Aug 2007
Posts: 99
Location: New Zealand

View user's profile Send private message

PostPosted: Wed Feb 27, 2008 9:14 pm     Reply with quote

i tried that and still can't find them. maybe i deleted them by mistake.

i have pcwh4 am i correct in guessing they did come with this compiler but on the ccs website under examples it doesnt list the modbus code
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 27, 2008 10:36 pm     Reply with quote

They're in vs. 4.068 and several versions before that.

If you don't have them, email CCS support and politely ask if
they'll send them to you. Give them your customer reference
number so they'll know you own the compiler.
ljbeng



Joined: 10 Feb 2004
Posts: 205

View user's profile Send private message

PostPosted: Thu Feb 28, 2008 3:59 pm     Reply with quote

I just wrote a vb.net program to turn relays on/off on an AutomationDirect PLC. Modbus is fairly simple if you just want to be the master to 1 slave.

Code:

send:
01         ID of slave
05         Write to Single Coil
AddHigh  Address of coil
AddLow
ValHi      Value to send
ValLow
CRCL     CRC on all bytes
CRCH
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