Modbus RTU on a Prop
Hi i'm a long time reader, first time poster. Thanks for the useful info i've already gleaned from these forums.
Background:
I'm new to the propellor but I get by in Spin but ASM is beyond me at the moment. I learn by attempting to build things, so I decided to build a wireless temperature probe. Which I've suceeded in doing by using a couple of xbee modules and a MAX6674 thermocouple to digital converter and outputting the results to a parallel LCD. Now i've shown this to a friend at work who informed by boss that·it would be a good idea to use these at work to monitor concrete temps. Now I've built multiple remote units and I think i've got the multiple probes all reporting to the master unit.
Problem:
My master reciever has to relay the temps to a datalogger/chart recorder(slave) using MODBUS/RTU. I've checked out the specs and i've got some modbus simulation software so I can check what I build but I think implementing this is a bit beyond me as i've only just nailed basic serial comms. What would be great is if someone has written a spin object already or if someone could break down what would be involved in writing my own driver. I've searched the forums already but to no avail.
Thanks for any help and sorry for the really long post.
·
Background:
I'm new to the propellor but I get by in Spin but ASM is beyond me at the moment. I learn by attempting to build things, so I decided to build a wireless temperature probe. Which I've suceeded in doing by using a couple of xbee modules and a MAX6674 thermocouple to digital converter and outputting the results to a parallel LCD. Now i've shown this to a friend at work who informed by boss that·it would be a good idea to use these at work to monitor concrete temps. Now I've built multiple remote units and I think i've got the multiple probes all reporting to the master unit.
Problem:
My master reciever has to relay the temps to a datalogger/chart recorder(slave) using MODBUS/RTU. I've checked out the specs and i've got some modbus simulation software so I can check what I build but I think implementing this is a bit beyond me as i've only just nailed basic serial comms. What would be great is if someone has written a spin object already or if someone could break down what would be involved in writing my own driver. I've searched the forums already but to no avail.
Thanks for any help and sorry for the really long post.
·
Comments
stampDAQ http://www.parallax.com/html_pages/downloads/software/software_stampDAQ.asp
StampPlot lite http://www.parallax.com/html_pages/downloads/software/stamp_plot_pro_info.asp
StampPlot Pro http://www.parallax.com/html_pages/downloads/software/stamp_plot_pro_info.asp
these products all capture data comming in over a serial port and allow it to be saved to disk. (they also let u plot the data and other stuff)
my two cents,
marty
First, check the documentation on your data logger - what types of registers does it support?
Simplest would be if it can log the 4xxxx range of registers.
If it can, implementing a simple modbus serial slave is pretty easy, and you could do it in spin, I'm guessing at up to 19.2kbps
Modbus/RTU is well documented, and very easy to implement if you only have to deal with the 4xxxx registers. Implementing coils etc is not too bad either.
google it, and there is also a good thread on these forums (that I found via google):
http://forums.parallax.com/showthread.php?p=622351
Best Regards,
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com - a new blog about microcontrollers
Cheers marty but our quality control people are quite happy with their logger as it has run for a about 6 years none stop, so they are quite comfortable with it and would be very reluctant to change.
Bill thanks for the help, i've looked at the thread you have linked but I am still struggling, perhaps it's too advanced a subject for a newbie like me. The prop needs to act as a master as far as i can see from the loggers manual. http://www.chessell.com/library/products/graphicdaq/5000_series/manuals/5000_028122_5.pdf is the link for the manual if anyone would like to have a look. The concept just seems·so easy but when I start trying to code it, I cannot see where to begin.
Post Edited (Damien Allen) : 1/25/2007 3:08:36 PM GMT
I work about 20 feet from the guys who do east coast support for the Chessel products, I do Controls support myself.
russell.read@_nospam_eurotherm.com, take out the "_nospam_" wrote the Sampler software from version 2.2# an on up. You could say he knows Modbus and has recently moved from a primarily Controls to Chessell support role. I suggest you send him an email with questions as to what the recorder expects, he can help you.
Or for that matter, I can help you with modbus. Check out:
www.eurotherm.com/library/products/controllers/2000_series/manuals/s2kc_026230_2.pdf
Starting with page 27, that manual lays out how to create a Modbus RTU packet.
Yours, Tom Perkins