| Stephen already laid out the various options. My question would be - assuming there are several modbus devices on a a single port driven by a single component: are the attached devices identical or not? if yes, it might make sense to permit multiple target id's on the component command line, designating each modbus device (which must be told to listen only on its target ID). In that case, one could create one HAL pin instance per modbus target, like 'speed-switch-x1-3' where '3' indicates the modbus target. Internally, you'd loop through all target numbers, querying and setting them in turn, see the 'slave' parameter to the modbus functions. If not, separate components probably are a better idea; the device's 'register' and 'coil' structure and meaning is highly slave-dependent. I had looked into extending the GS2 driver to make that 'generic' in the sense it could support different VFD's. I quickly dumped that idea after reading the manual. Another aspect is reponsiveness, which a bit also depends on the cleverness of the attached device. Some modbus slaves allow only a single register read/write command per iteration; some might permit reading multiple registers which is a lot faster. If you have half a dozen modbus devices hanging off a bus driving user interface components like reading buttons, and they are queried each in turn, reaction to a button press might take a looooong time. Note there's a nice Modbus library binding for Python, so C is'nt your only option. I havent tried it but it looked promising. -Michael Am 10.03.2011 um 20:36 schrieb Kirk Wallace: I need to start thinking about adding a muti-modio feature to my component, and was wondering if the vfs11 and gs2 authors have done anything on that front. I can get something done by hacking existing code, but this would require me to create something new. Although, I guess there are other multi-instance components to study. -- Kirk Wallace http://www.wallacecompany.com/machine_shop/ http://www.wallacecompany.com/E45/index.html California, USA ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers |
------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d
_______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
