Hi Kirk, > I made up a comp .c file for each of the Modbus devices I have been > playing with. It's not difficult if one knows C. I suppose using Classic > Ladder is another option but I don't know ladder. I might look into doing that. If you use Modbus in ClassicLadder you have to have the GUI running. That really slows my computer down.
Ladder logic is easy. It takes a little while to get used to ClassicLadder but once you get used to it, you can do an awful lot with it. The GUI has it's fair share of quirks, especially the fairly old version that ships with EMC. It controls a lot of the operation of my lathe, including the auto gear change, drive enable timing, spindle + coolant logic and monitoring things like gearbox oil pressure and way lube level. It may seem overkill to use ladder for way lube but I have it set up so it only checks the oil if the machine isn't executing code. That way if you run out half way through a part it will continue until the part is finished then stop. The oil pressure is another case. When you power up the drives it takes a couple of seconds for the oil pressure to come up so it has a timer that ignores the oil pressure for a couple of seconds. > Les, if you could provide links to your reference material and config > files, I could fill in some missing Ladder information on the wiki > Modbus page, or if you want, just post the information directly. The ClassicLadder stuff is pretty specific to my machine. I can publish the config files etc but I don't think they are likely to be that useful to anyone else. > I did find this link: > http://sites.google.com/site/jpmzometa/arduino-mbrt/examples > from here: > http://www.arduino.cc/playground/Main/InterfacingWithHardware That is a Modbus master implementation. I based my code on this Modbus implementation <http://sites.google.com/site/jpmzometa/arduino-mbrt/arduino-modbus-slave>. The original code only handles holding registers so I added support for coils and inputs. Once I have finished testing and tidying the code up a bit I'll release the source. The Modbus side would be useful to others but the main code won't because it is specific to my front panel as both the switches and LEDs are multiplexed. > Frankly, I don't see the Arduino as being well suited to CNC > applications, but they seem to be very popular. Maybe a Chipsduino would > be popular too. Actually the Aruino hardware is great for this sort of thing. It is cheap, simple and there are lots of plug-in I/O modules available for it if you don't want to roll your own. The Arduino Mega has lots of I/O pins. I like Atmel micros. They are generally very reliable and handle electrically noisy environments better than many others. The Arduino IDE is a bit naff but in the end it does get the job done. Although they try to hide it, basically the code is standard C++, compiled with GCC. Les ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users