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

VB6.0 code for CRC16 (RTU protocal)

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



Joined: 08 Apr 2009
Posts: 100
Location: Chennai, India

View user's profile Send private message

VB6.0 code for CRC16 (RTU protocal)
PostPosted: Wed Aug 11, 2010 5:33 am     Reply with quote

dear forum

can any one please give me the code (or links) for calculating CRC16 code in VB6.0.... i studeid a lot in the VB6.0 (actually Googled) i found some but they are not that perfect then what i expect.... even i tried to write the algo but i have problems with Right rotate accumulator (that is variable in the VB) and also problem with defining the 16 bit register... ( for 8 bit(1byte) it is "easy dim x as BYTE" but for 2 bytes Rolling Eyes )

please some one help me .........
collink



Joined: 08 Jan 2010
Posts: 137
Location: Michigan

View user's profile Send private message Visit poster's website

Re: VB6.0 code for CRC16 (RTU protocal)
PostPosted: Wed Aug 11, 2010 5:37 am     Reply with quote

mutthunaveen wrote:
dear forum

can any one please give me the code (or links) for calculating CRC16 code in VB6.0.... i studeid a lot in the VB6.0 (actually Googled) i found some but they are not that perfect then what i expect.... even i tried to write the algo but i have problems with Right rotate accumulator (that is variable in the VB) and also problem with defining the 16 bit register... ( for 8 bit(1byte) it is "easy dim x as BYTE" but for 2 bytes Rolling Eyes )

please some one help me .........


This is a forum dedicated to discussing PIC programming with the CCS compiler. VB6 on a PC is neither. Keep searching google. VB6 is ancient, I'm sure someone has done exactly what you want.
mutthunaveen



Joined: 08 Apr 2009
Posts: 100
Location: Chennai, India

View user's profile Send private message

PostPosted: Wed Aug 11, 2010 9:20 am     Reply with quote

thanks collink.... yes this is a ccs forum....

but some one who are using this forum may used this VB6.0 for MODBUS protocol.... between PC and PIC... they might help me in giving the code.... thanks
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Wed Aug 11, 2010 9:55 am     Reply with quote

May be you would like to know this regarding the CRC16 for MODBUS protocol, CCS uses the same CRC16
table as defined in the Modbus Standard, it is plain table assignment, not a complex algoritm.

Humberto
mutthunaveen



Joined: 08 Apr 2009
Posts: 100
Location: Chennai, India

View user's profile Send private message

PostPosted: Wed Aug 11, 2010 9:57 am     Reply with quote

Humberto wrote:
May be you would like to know this regarding the CRC16 for MODBUS protocol, CCS uses the same CRC16
table as defined in the Modbus Standard, it is plain table assignment, not a complex algoritm.

Humberto


hi bro can u please explain me in detail.... how can i use this and implement MODBUS between PC and PIC...
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Wed Aug 11, 2010 10:16 am     Reply with quote

Quote:

even i tried to write the algo but i have problems with Right rotate accumulator (that is variable in the VB) and
also problem with defining the 16 bit register... ( for 8 bit(1byte) it is "easy dim x as BYTE" but for 2 bytes

This is a C forum, my intention was just to give you a clue regarding how to get the CRC16, I assume that if you
could write it in VB a mathematical algoritm approach to calculate it, you can do it applying the table assignement
method, that is used by CCS.

Humberto
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