gclib  386
Communications API for Galil controllers and PLCs
 All Data Structures Files Functions Variables Typedefs Macros Pages
Apple OS X

Tested versions

See the installation page for supported versions.

Installation

On OS X, gclib is distributed in a dmg image. The following steps can be performed to install gclib.

Download the gclib dmg

Download Download from the release notes page

  • Open the dmg file and drag the gclib directory to the Applications alias or another installation location.


Create Environment Variable (Optional)

  • To provide maximum functionality, e.g. usage of the Python wrapper, add to the DYLD_LIBRARY_PATH by typing the following at a Terminal prompt.
$ echo "export DYLD_LIBRARY_PATH=/Applications/gclib/dylib/:\$DYLD_LIBRARY_PATH" >> ~/.profile
  • Log Out and back in to set the environment variable.

Make links for usb devices

If using the DMC4103 or another Galil USB product, symbolic links may be created so GAddresses() can list the controllers.

Make a link from the Terminal.

user-mac:~ user$ #plug in DMC4103 usb cable
user-mac:~ user$ ls /dev/tty.usb*
/dev/tty.usbserial-A402L6KG
user-mac:~ user$ #make a symbolic link so gclib can list it
user-mac:~ user$ sudo ln -s /dev/tty.usbserial-A402L6KG /dev/tty.usbserial0
user-mac:~ user$ #gclib searches start at 0
user-mac:~ user$ #GAddresses() will now list this device

Demonstrating with Python.

user-mac:~ user$ python
Python 2.7.10 (default, Jul 14 2015, 19:46:27) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gclib
>>> g = gclib.py()
>>> g.GAddresses()
{'/dev/tty.usbserial0': ''} 
>>> g.GOpen("/dev/tty.usbserial0 -d")
>>> print(g.GInfo())
/dev/tty.usbserial0, DMC4143 Rev 1.2b, 9998
>>> g.GClose()
>>> exit()
user-mac:~ user$ 

Installed files

  • The gclib shared object files
    • /Applications/gclib/dylib/gclib.0.dylib
    • /Applications/gclib/dylib/gclibo.0.dylib
  • The gclib header files
    • /Applications/gclib/include/gclib_errors.h
    • /Applications/gclib/include/gclibo.h
    • /Applications/gclib/include/gclib.h
    • /Applications/gclib/include/gclib_record.h
  • gclib documentation tarball
    • /Applications/gclib/doc/gclib_doc.tar.gz
  • Example source tarball
    • /Applications/gclib/examples/gclib_examples.tar.gz
  • Source files to modify/rebuild libgclibo.so
    • /Applications/gclib/source/gclibo_229_src.tar.gz
  • GalilTools Communication Library (gcl) wrapper
    • /Applications/gclib/source/gclib_gcl.tar.gz

Documentation

The documentation is left as a tarball to minimize disk usage. The latest release version of the user manual is available at the following link.

Offline pdf

The following allows viewing of the pdf docs from the installation.

  • Browse in the Finder to Applications/gclib/doc.
  • Double-click the tar.gz file to extact it.
  • Open the resultant directory.
  • Open the pdf.

Offline html

The following allows viewing of the html docs from the installation.

  • Browse in the Finder to Applications/gclib/doc.
  • Double-click the tar.gz file to extact it.
  • Open the resultant directory.
  • Open the html directory.
  • Double-click index.html to open the help.