> Date: Sun, 7 Dec 2008 18:18:18 -0500
> From: [EMAIL PROTECTED]
> To: emc-developers@lists.sourceforge.net
> Subject: Re: [Emc-developers] Classicladder 7.124 opinions
>
> Chris Morley wrote:
>
> >
> > >
> > > Question about MODBUS: I haven't looked at the CL modbus code, but
> > > would it make sense to put the modbus stuff into a separate driver (at
> > > least for master mode, where CL is getting info from slaves), and
> > > connect it via HAL?
> >
> > Yes and no :)
> >
> > having a PLC that communicates via MODBUS is not a stretch by any means.
> > I would think that most people that want to get info from a MODBUS slave
> > would also want to condition the info in ladder- that makes this way,
> > more direct.
> > CL has a nice (familar?) GUI to set up and monitor MODBUS.
> > I would also think that any one who is going to use a slave device
> > probably
> > already uses CL.
>
> Maybe, maybe not. There are devices like the Homann Designs ModIO card,
> which have encoder inputs (that could be useful connected directly to
> halui). Also, buttons on a simple I/O card like that wouldn't really
> need CL, they may be more directly usable with halui.
>
> There were some discussions at Fest about how to make a modbus system
> that's flexible enough to be useful for a wide range of devices, and
> it's not too easy to do.
I totally agree. What makes MODBUS so flexible also makes it hard to program
an easy interface for.
> I'm imagining something a little like pyvcp,
> where there's a file that describes the interfaces, unit ID numbers, and
> register/coil addresses, and lets you assign HAL names to them.
>
That would be fine for advanced users but it's a killer for newbies and
Windows people used to point and click. Just follow CNCZONE , try and
help out on some problems and see how difficult it is for new people to
be successful. They never read the manual because the rest of the world
is point and click.
> > The biggest reason of all was because the code was already there-it
> > was deleted
> > in EMC's CL version 7.100- I have tried to add more features and make
> > it more
> > flexible to use.
>
> Sure, keeping whatever is there makes sense - fewer changes means a
> patchset is easier to maintain.
>
> > If you don't want ladder then yes a separate component would be great.
> > But that means for the used-to-windows crowd you need to make a GUI
> > and could possible have hundreds of HAL pins.
>
> Well, what is the GUI like for MODBUS related setup in CL? I know
> there's a graphical ladder editor, but I haven't looked at the CL/MODBUS
> UI at all.
The GUI is quite basic I'm sure it needs help. But the best thing is you
can watch the vars window to see if the info is being sent/received
And you don't have to connect HAL pins to do it. I don't know about you
guys to I HATE connecting 20 pins just to test something. I use HAL
alone more then with EMC so ya have to type in a million lines all the same
except for a pin number.
Pyvcp is great but again I hate having to type a million lines just to
visually test something. I am spoiled with CL :)
>
> > I see CL as a general way to communicate to MODBUS slaves.
> > The other MODBUS component just check in by Seb (right?)
> > is a more specific, thought now it is easier to make different
> > components.
>
> Yes, the GS2 driver is a reasonably good starting point for other
> device-specific drivers. The library is LGPL2 (in this version anyway),
> and it's pretty easy to use.
> I'll take a look at how the MODBUS stuff fits into CL - it's got to be a
> separate userspace component since RT code can't access Linux devices
> (unless there's a serial port driver that goes direct to the chip). It
> may be that the CL MODBUS driver is where to start, maybe just by adding
> the option to export some values to HAL with user-specified names.
>
Ya don't beat me up too bad when you look at the code :)
It's a blend of Marc's and I, and I have only been programming
part time a couple of years - CL is my first programming in C.
I find GUI programming difficult...
Yes the Modbus is a userspace program that is why the GUI
must be running for MODBUS to work. Actually there is a
RT serial driver available for RTAI but it is old - and wouldn't
compile - I don't have the knowledge or the time to spend
to get it to compile.
Are the routines your own or are they from somewhere else?
there is a modbus library avaiable though the author was not
very helpful...
Chris Morley
_________________________________________________________________
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers