CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Electronics > PIC Programing / Design


PIC Programing / Design Discuss programing of PIC chips here and design of electronics using PIC chips.


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-24-2012, 01:26 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,544
Al_The_Man is on a distinguished road
Buy me a Beer?
Modbus and the PIC

Rather than reinvent the wheel I am looking for a jumping off point to implement Modbus RTU in a Pic as a slave.
Anyone done this or know of a source of example code?
Al.
__________________
CNC, Mechatronics Integration and Machine Design.
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Reply With Quote

  #2   Ban this user!
Old 01-27-2012, 07:52 AM
 
Join Date: Jan 2006
Location: Serbia
Posts: 57
mardus is on a distinguished road

IMHO you will have to reinvent the wheel. Everybody talking about it, but nobody to explain it. I am looking for basic explanation too, but without success. Is it some kind of secret!? Everybody puts the link The Modbus Organization
and say that is easy to understand. To me, it is not.
I wish you luck to find explanation, or try to write your own protocol, its easiest way and you will know exactly what you done :-)
Good luck!
Reply With Quote

  #3  
Old 01-27-2012, 09:38 AM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,544
Al_The_Man is on a distinguished road
Buy me a Beer?

Working on it!
I am very surprised by the lack of Pic/Modbus oriented projects out there?
I found a few Pic related for I2c, SPI and MicroWire, Nothing on Modbus.
The robot guys seem to be using I2c.
I have an idea of the packet requirement, just have to work on the details.
Thanks.
Al.
__________________
CNC, Mechatronics Integration and Machine Design.
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Reply With Quote

  #4   Ban this user!
Old 01-27-2012, 02:58 PM
 
Join Date: Jan 2006
Location: Serbia
Posts: 57
mardus is on a distinguished road

Maybe this could help
USB Modbus Interface - Field of Cows
Reply With Quote

  #5  
Old 01-27-2012, 03:44 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,544
Al_The_Man is on a distinguished road
Buy me a Beer?

Thanks, I had seen that, it is just that the designer converts to descrete I/O and analogue control, I may be able to modify the code.
Al.
__________________
CNC, Mechatronics Integration and Machine Design.
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Reply With Quote

Sponsored Links
  #6  
Old 01-28-2012, 06:26 AM
Gold Member
 
Join Date: Oct 2005
Location: Australia
Posts: 2,251
RomanLini is on a distinguished road

Did you check Microchip.com? I would be surprised if they did not have an appnote on it.
Reply With Quote

  #7  
Old 01-28-2012, 09:24 AM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,544
Al_The_Man is on a distinguished road
Buy me a Beer?

Originally Posted by RomanLini View Post
Did you check Microchip.com? I would be surprised if they did not have an appnote on it.
That was my first seek? .
Al.
__________________
CNC, Mechatronics Integration and Machine Design.
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Reply With Quote

  #8  
Old 01-29-2012, 08:55 AM
Gold Member
 
Join Date: Oct 2005
Location: Australia
Posts: 2,251
RomanLini is on a distinguished road

Sorry Al, I just assumed they had one as it's a pretty standard comms protocol.

Microchip have a good user forum, maybe if you ask there one of the official guys or one of the PIC users might be able to suggest a solution for you. sometimes it can be a bit slow getting help there but the quality of the help can be good.
Reply With Quote

  #9  
Old 01-29-2012, 11:10 AM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,544
Al_The_Man is on a distinguished road
Buy me a Beer?

I am part of the way there adapting one of the PICMicro UART examples (AN774), it is a bit simplified in my case as I am only designing for master to one slave, RS422 and not multi-slave RS485.
Al.
__________________
CNC, Mechatronics Integration and Machine Design.
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Reply With Quote

  #10   Ban this user!
Old 01-29-2012, 08:43 PM
James Newton's Avatar  
Join Date: May 2005
Location: USA
Posts: 756
James Newton is on a distinguished road
Buy me a Beer?

A quick search of the archive at www.piclist.com finds

http://web.archive.org/web/201010300.../microchip.htm

Which may be of help.
__________________
James hosts the single best wiki page about steppers for CNC hobbyists on the net:
http://www.piclist.com/techref/io/steppers.htm Disagree? Tell him what's missing! ,o)
Reply With Quote

Sponsored Links
  #11  
Old 01-30-2012, 09:51 AM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,544
Al_The_Man is on a distinguished road
Buy me a Beer?

Thanks, I think I have something figured out.
Al.
__________________
CNC, Mechatronics Integration and Machine Design.
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Modbus I/O Using PIC rdhopkins PIC Programing / Design 7 05-02-2012 07:23 PM
Need Help!- MODBUS control of VFD ninefinger LinuxCNC (formerly EMC2) 21 05-09-2011 08:19 PM
Modbus to run GS-2 drive? mecheng10 Mach Mill 13 05-13-2009 08:59 PM
EMC2/Modbus......HELP! pauldkeeton LinuxCNC (formerly EMC2) 5 02-18-2007 04:47 PM
modbus device Drew Machines running Mach Software 14 02-11-2007 01:59 PM




All times are GMT -5. The time now is 03:47 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361