gclib  1.33.4
Communications API for Galil controllers and PLCs
LabVIEW

This document provides step-by-step instructions on how to access the Galil Communication Library (gclib) in LabVIEW on Windows 10. The Galil Communication Library (gclib) is the current generation communication library for Galil Motion Controllers and PLCs. By combining the versatility of gclib with the simplicity of programming in LabVIEW, a professional looking graphical user interface can be created for a wide range of motion control applications.

Installation

To install the LabVIEW language support, run the latest version of the gclib installer and select the "LabVIEW Integration" option.

Accessing gclib with LabVIEW

In LabVIEW, create a new VI and right click on the Block Diagram. At the bottom of the Functions palette, Galil palette set will be available. Functions are sorted in to three categories: Configuration, Data, and Utility.

Examples for gclib with LabVIEW

Full Examples

Full Examples will be installed to C:\Program Files (x86)\National Instruments\LabVIEW 2020\vi.lib\Galil\examples\full_examples.

  1. Analog_IO_Example.vi – This example will display and store the value of a single analog input. The most current analog input value will be displayed on the Front Panel of the VI. All analog input values will be stored in a .txt file in a location specified by the user.
  2. Digital_IO_Example.vi – This example allows the user to set digital outputs using the ‘OP’ command and read digital inputs using the ‘TI’ command. It will also pol the state of Digital Output 1. The most current digital I/O information will be displayed on the Front Panel of the VI in the form of a bit mask.
  3. Data_Record_Example.vi – This example uses GRecord() to capture data record packets and then parses those packets into valuable information such as sample time (TIME), reference position (RP), and actual encoder position (TP). The most current values of each will be displayed on the Front Panel of the VI. Note, this example was written for the DMC-4000.

VI Examples

Individual VI Examples will be installed to C:\Program Files (x86)\National Instruments\LabVIEW 2020\vi.lib\Galil\examples\vi_examples.

  1. example_GArrayDownload().vi
    • This example uses GArrayDownload() to download array elements to a Galil controller. The VI Front Panel gives users access to which array elements are downloaded to the controller.
  2. example_GArrayUpload().vi
    • This example uses GArrayUpload() to upload array elements from a Galil controller. The VI Front Panel will display all array elements uploaded from the controller.
  3. example_GCommand().vi
    • This example uses GCommand() to send 'MG TIME' to query the value of the internal free running, real time clock. Users can send other DMC commands by altering the Front Panel of the example VI.
  4. example_GInterrupt().vi
    • This example uses GInterrupt() to pause code execution until a specified event has occurred. In this case, GInterrupt() pauses code execution until profiled motion is complete on Axis A. The user can define which event interrupts will hold up code execution using the EI/UI commands.
  5. example_GMessage().vi
    • This example shows users how to access unsolicited messages from a Galil controller using the GMessage() function. Unsolicited messages are messages that are generated by a DMC program running on the controller.
  6. example_GProgramDownload().vi
    • This example uses GProgramDownload() to download a DMC program to a Galil controller. The VI Front Panel gives allows users to define the DMC program before downloading it to the controller.
  7. example_GProgramUpload().vi
    • This example uses GProgramUpload() to upload a DMC program from a Galil controller. The VI Front Panel will display the DMC program uploaded from the controller.
  8. example_GRecord().vi
    • This example shows users how to access the data record from a Galil controller using the GRecord() function. This example gathers data record packets and then divides the packet into valuable information. For more information on the format of the data record packets from your controller, please check the controller's user manual.
  9. example_GArrayDownloadFile().vi
    • This example uses GArrayDownloadFile() to download array elements from a file to a Galil controller. The users should specify the path to the file in the VI Front Panel.
  10. example_GArrayUploadFile().vi
    • This example uses GArrayUploadFile() to upload array elements to a file from a Galil controller. The users should specify the path to the file in the VI Front Panel.
  11. example_GMotionComplete().vi
    • This example uses GMotionComplete to block program execution until motion is complete on the A axis. Once code execution resumes, another command is sent to the controller to confirm that the sequence has been completed.
  12. example_GProgramDownloadFile().vi
    • This example uses GProgramDownloadFile() to download a DMC program from a file location to a Galil controller. The VI Front Panel allows users to define the file path to the DMC program before before downloading to the controller.
  13. example_GProgramUploadFile().vi
    • This example uses GProgramUploadFile() to upload a DMC program from a Galil controller. The VI Front Panel allows users to define the file path to the DMC program before uploading from the controller.
  14. example_GRecordRate().vi
    • This example uses GRecordRate() to set the asynchronous data record rate (in milliseconds) for the DR method of gathering data records. Once that is accomplished, this example gathers data record packets and then divides the packet into valuable information. For more information on the format of the data record packets from your controller, please check the controller's user manual.
  15. example_GTimeout().vi
    • This example uses GTimeout() to set the timeout for for GInterrupt(). Once that is accomplished, This example uses GInterrupt() to pause code execution until profiled motion is complete on Axis A. The user can define which event interrupts will hold up code execution using the EI/UI commands.

gclib/LabVIEW Support

If there questions or requests, please contact Galil Support at suppo.nosp@m.rt@g.nosp@m.alil..nosp@m.com or call 916-626-0101 to speak with an Applications Engineer.