[Home]ModIO

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Showing revision 9

Homann Modio

This is a serial Modbus peripheral (RTU, RS232 or RS485) similar to a Modbus MPG pendant or VFD, which can be configured for various applications, from simple digital I/O, to an MPG pendant. EMC2 can talk to the Modio in userspace, so real-time functions are not supported.

One possible application, Tool changer controller

upload:modio_tc-1a.png


There are two drivers or components. One talks to the application registers and provides halpins for use with EMC2. The other uses pyVCP in a standalone application to set the configuration registers.

upload:axis-modio-1a.png
The Modio features shown on the right of the AXIS screen just show evidence of the Modio signals. Usually, the signals would be connected to functions that may or may not show up on the screen.

upload:modio-config-1a.png
The configuration screen runs separately from EMC2 and is used only to change the features shown above. pyVCP is very limited in flexibility, so there were many compromises to the layout, but it does serve the purpose. GladeVCP? might be better, but it was not available at the time. The LED's show the current status of the registers in the Modio. The radio buttons setup the data that will be sent to the Modio registers with clicking the Write button. The LED's update after the write is complete. Some of the radio buttons are inverted and LED colors change for features that are FALSE the the factory default settings.

The drivers are C files and can not be installed with comp. Each driver's files should be copied to their own directory, cd to a directory, then run "make && sudo make install" More documentation needs to be done.

EMC2 Driver
In ~/emc2/homann/modio
upload:homann_modio.c
upload:Makefile
In ~/emc2/configs/my_modio_config
upload:modio_pyvcp.hal
upload:modio_stepper.xml
upload:stepper_inch.ini
upload:modio_config.xml
upload:core_stepper.hal

Configuration Driver
In ~/emc2/homann/modio_config
upload:h_modio_config.c
upload:Makefile_config <--- change name to Makefile after download so 'make' will find it, or use 'make -f Makefile_config'
upload:h_modio_config.hal
upload:h_modio_config.xml
To run use
cd ~/emc2/homann/modio_config
halrun -I h_modio_config.hal  #(plus settings if needed)
Both Driver Directories Need
modbus.c
modbus.h
findbindir
find-libdir
find-modinc

Available from the vfs11_vfd directory in (someone's) GIT here, http://git.mah.priv.at/gitweb/vfs11-vfd.git/tree/master . I used a PC with Ubnuntu 8.04, EMC2 2.4.6, emc-dev installed, and the configuration from EMC2 from source, http://wiki.linuxcnc.org/emcinfo.pl?Installing_EMC2#On_Ubuntu_10_04_or_8_04_from_source . I have no idea if the drivers will compile and install with any other configuration -- time will tell.


Carriage Return Loop Problem

kwallace@emc2-5:~$ cd emc2/homann/modio_config
kwallace@emc2-5:~/emc2/homann/modio_config$ halrun h_modio_config.hal
h_modio_config: device='/dev/ttyS0', baud=57600, bits=8, parity='none', stopbits=1, address=6, verbose=0

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1406, in __call__
    return self.func(*args)
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 501, in callit
    func(*args)
  File "debian/tmp/usr/lib/python2.5/site-packages/vcpparse.py", line 154, in updater
  File "debian/tmp/usr/lib/python2.5/site-packages/pyvcp_widgets.py", line 1084, in update
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 2246, in itemconfigure
    return self._configure(('itemconfigure', tagOrId), cnf, kw)
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1191, in _configure
    self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
KeyboardInterrupt
kwallace@emc2-5:~/emc2/homann/modio_config$ 

After this, invoking halrun again starts the loop and freezes the PC.


(Draft 2011/03/05 Kirk Wallace)

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions | View current revision
Edited March 12, 2011 8:39 pm by Kirk Wallace (diff)
Search:
Published under a Creative Commons License