On Fri, 2012-02-03 at 19:13 +1100, Frank Tkalcevic wrote:
> I've taken the existing gs2_vfd.c from src/hal/user_comps and made an
> sj200_vfd.c
> 
> I don't like writing code that isn't modular and reusable, so I started to
> write the module so it could be configured by a table of values.  I only got
> as far as making it work for my use.  The plan was to have one "vfd" module,
> and just pass in a config file of values, however I don't have more than one
> device to test against.

I haven't considered a generic VFD or Modbus device driver, because not
only do the device functions vary widely, but so do implementations of
the Modbus standard. I'm leaning more towards preferring a wizard that
can help create a custom component. Having a custom component for each
VFD would be similar to display or other drivers, after a while a
library of components will get filled in and normal users will likely be
able to just plug in the one that matches their device. Having a utility
to aid in making the components could help fill the library more
quickly.

> I've attached a zip file with the .c file and SubMakefile.  I remember at
> the time I had a lot of trouble getting the submakefile to work and couldn't
> find any info on it.
> 
> I put it in src/hal/user_comps, modify the submakefile and build.  From
> memory, I don't think I could build from the src/hal/user_comps directory.
> I had to build the lot.

Early on, I avoided using the GS2 component as a sample because it
appeared that it had to be compiled within the LinuxCNC tree. It seemed
I would need to compile LinuxCNC every time I made a change, but this is
most likely because I don't understand programming very well.

> You'll notice in the code, 2 sets of tables.  I too, had problems with v1
> and v2 documentation.

I am hoping to find the time to gather this VFD and Modbus information
and post it to the wiki so others won't need to go through the same
problems.

>From above "... however I don't have more than one device to test
against.", I wonder how hard it would be for someone to access my VFD's
with VNC? I am getting my components sorted out, but in general, being
able to use remote devices for development (through the wiki?) might be
a good thing.
-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to