On Sun, 2012-08-12 at 20:38 +0000, Chris Morley wrote: > > > > > It's pretty easy to make a VFD/Modbus component for a new VFD, or other > > Modbus device. I have some notes here: > > http://wiki.linuxcnc.org/cgi-bin/wiki.pl?New_File_From_Vfs11 > > > > I seem to recall that some further work had been done when libmodbus3 > > came out, but I don't recall any details. > > > > Rather than try to make a generic VFD/Modbus driver, it's easy enough to > > just edit an existing file as needed. For those that don't know how to > > edit C files, it may be best to announce to the list the needed Modbus > > device and offer sufficient motivation. I believe there is an > > appropriate place to collect existing Modbus drivers on the Wiki. > > > > One issue that I vaguely recall, so far, Modbus drivers are either > > written to be compiled on their own with a corresponding Makefile, or > > the driver is meant to be placed in the LinuxCNC source with a Makefile > > that follows the source tree (?). If this is correct, it would be nice > > to resolve which (or both?) method should be used and document it. > > > > -- > > Kirk Wallace > > Well easy is a relative term ! > I wouldn't call editing a c file and adding to the MAKE file easy for a new > comer. > It also then becomes a completely custom system, one that updates will break. > but maybe comp can compile C file too...
Speaking from my experience, which may not apply to anyone else, after much head scratching I got one VFD working. The next one _was_ easy. If my notes where expanded a little, most LinuxCNC integrators should be able to handle it. > My current idea would be to create a python extension module for the modbus C > file. > Then a generic modbus program in python or you could make a specific one. > Python seems more appropriate then C for this (lowers the barrier) and if the > generic modbus program works out you wouldn't have to program at all. > It would ultimately have a GUI to configure it. When I started working with LinuxCNC, I had some beginning C experience from college and reading a book on my own. Learning Ladder, for me, would be another new layer to learn, and doesn't add any functionality. C comes in handy for all areas of Linux in general, so it seems should be the preferred language. > I'm curious why you advocate editing a specific driver to configuring a > general one. Because each device has its own feature set and addresses. One ends up having to customize something along the way and it seems cleaner to just have one file that ties everything together. On the other hand, some of my later Modbus work is starting to come back to me... I recall I split my driver into a device file for each device, then a Modbus file for each port, then a scheduler file to manage the time sharing/communication of the devices and ports. This allows for more than one device and port which I don't think is currently supported. I also seem to recall running out of time and grey cells. If anyone is interested, I can try to pull up what I did, but any reasonably clever developer could easily repeat and improve what I did. > IIRC libmodbus3 's licence is incompatible with linuxcnc. Oops, I didn't know this bit. -- Kirk Wallace http://www.wallacecompany.com/machine_shop/ http://www.wallacecompany.com/E45/index.html California, USA ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers