| gclib 2.4.1 Galil Communications Library

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gclib.py Class Reference

Represents a single Python connection to a Galil Controller or PLC. More...

## Public Member Functions
| __init__ (self)
| Constructor for the Connection class.
| __del__ (self)
| Destructor for the Connection class.
| GOpen (self, address)
| Opens a connection a galil controller.
| GClose (self)
| Closes a connection to a Galil Controller.
| GCommand (self, command)
| Performs a command-and-response transaction on the connection.
| GSleep (self, val)
| Provides a blocking sleep call which can be useful for timing-based chores.
| GVersion (self)
| Provides the gclib version number.
| GServerStatus (self)
| Provides the local server name and whether it is published to the local network.
| GSetServer (self, server_name)
| Set the new active server.
| GListServers (self)
| Provide a list of all available gcaps servers on the local network.
| GPublishServer (self, server_name, publish, save)
| Publish local gcaps server to the network.
| GRemoteConnections (self)
| Shows all remote addresses that are connected to the local server.
| GInfo (self)
| Provides a useful connection string.
| GIpRequests (self)
| Provides a dictionary of all Galil controllers requesting IP addresses via BOOT-P or DHCP.
| GAssign (self, ip, mac)
| Assigns IP address over the Ethernet to a controller at a given MAC address.
| GAddresses (self)
| Provides a dictionary of all available connection addresses.
| GProgramDownload (self, program, preprocessor="")
| Downloads a program to the controller's program buffer.
| GProgramUpload (self)
| Uploads a program from the controller's program buffer.
| GProgramDownloadFile (self, file_path, preprocessor="")
| Program download from file.
| GProgramUploadFile (self, file_path)
| Program upload to file.
| GArrayDownload (self, name, first, last, array_data)
| Downloads array data to a pre-dimensioned array in the controller's array table.
| GArrayUploadFile (self, file_path, names=[])
| Uploads the entire controller array table or a subset and saves the data as a csv file specified by file_path.
| GArrayDownloadFile (self, file_path)
| Downloads a csv file containing array data at file_path.
| GArrayUpload (self, name, first, last)
| Uploads array data from the controller's array table.
| GTimeout (self, timeout)
| Set the library timeout.
| timeout (self)
| Convenience property read access to timeout value.
| timeout (self, timeout)
| Convenience property write access to timeout value.
| GFirmwareDownload (self, file_path)
| Upgrade firmware.
| GMessage (self)
| Provides access to unsolicited messages from the controller.
| GMotionComplete (self, axes)
| Blocking call that returns once all axes specified have completed their motion.
| GInterrupt (self)
| Provides access to PCI and UDP interrupts from the controller.
| GSetupDownloadFile (self, file_path, options)
| Downloads specified sectors from a Galil compressed backup (gcb) file to a controller.

## Protected Member Functions
| _cc (self)
| Checks if connection is established, throws error if not.

## Protected Attributes
| _gcon = _GCon(0)
| _buf = create_string_buffer(_buf_size)
int | _timeout = 5000

## Detailed Description

Represents a single Python connection to a Galil Controller or PLC.

Definition at line 113 of file gclib.py.

## Constructor & Destructor Documentation

## ◆ __init__()

gclib.py.__init__ | ( |  | self | ) |

Constructor for the Connection class.

Initializes gclib's handle and read buffer.

Definition at line 118 of file gclib.py.

## ◆ __del__()

gclib.py.__del__ | ( |  | self | ) |

Destructor for the Connection class.

Ensures close gets called to release Galil resource (Sockets, Kernel Driver, Com Port, etc).

Definition at line 125 of file gclib.py.

## Member Function Documentation

## ◆ _cc()

gclib.py._cc | ( |  | self | ) |
| protected

Checks if connection is established, throws error if not.

Definition at line 130 of file gclib.py.

## Member Data Documentation

## ◆ _gcon

gclib.py._gcon = _GCon(0)
| protected

Definition at line 120 of file gclib.py.

## ◆ _buf

gclib.py._buf = create_string_buffer(_buf_size)
| protected

Definition at line 121 of file gclib.py.

## ◆ _timeout

int gclib.py._timeout = 5000
| protected

Definition at line 122 of file gclib.py.

The documentation for this class was generated from the following file:

- gclib.py