Provides a class that binds to gclib's unmanaged dll. Wraps each call and provides a more user-friendly interface for use in C#. More...
Public Member Functions | |
| gclib () | |
| Constructor of the gclib wrapper class. | |
| string[] | GAddresses () |
| Return a string array of available connection addresses. | |
| void | GArrayDownload (string array_name, ref List< double > data, Int16 first=-1, Int16 last=-1) |
| Downloads array data to a pre-dimensioned array in the controller's array table. | |
| void | GArrayDownloadFile (string Path) |
| Allows downloading of a program array file to the controller. | |
| List< double > | GArrayUpload (string array_name, Int16 first=-1, Int16 last=-1) |
| Uploads array data from the controller's array table. | |
| void | GArrayUploadFile (string Path, string Names) |
| Allows uploading of a program array file from the controller to an array CSV file. | |
| void | GAssign (string ip, string mac) |
| Assigns IP address over the Ethernet to a controller at a given MAC address. | |
| void | GClose () |
| Used to close a connection to Galil hardware. | |
| string | GCommand (string Command, bool Trim=true) |
| Used for command-and-response transactions. | |
| Int16 | GCmdI (string Command) |
| Used for command-and-response transactions. | |
| double | GCmdD (string Command) |
| Used for command-and-response transactions. | |
| void | GFirmwareDownload (string filepath) |
| Upgrade firmware. | |
| string | GInfo () |
| Provides a useful connection string. | |
| byte | GInterrupt () |
| Provides access to PCI and UDP interrupts from the controller. | |
| string[] | GIpRequests () |
| Provides a list of all Galil controllers requesting IP addresses via BOOT-P or DHCP. | |
| string | GMessage () |
| Provides access to unsolicited messages. | |
| void | GMotionComplete (string axes) |
| Blocking call that returns once all axes specified have completed their motion. | |
| void | GOpen (string address) |
| Used to open a connection to Galil hardware. | |
| void | GProgramDownload (string program, string preprocessor="") |
| Allows downloading of a DMC program from a string buffer. | |
| void | GProgramDownloadFile (string file_path, string preprocessor="") |
| Allows downloading of a DMC program from file. | |
| string | GProgramUpload () |
| Allows uploading of a DMC program to a string. | |
| void | GProgramUploadFile (string file_path) |
| Allows uploading of a DMC program to a file. | |
| byte[] | GRead () |
| Performs a read on the connection. | |
| T | GRecord< T > (bool async) |
| Used for retrieving data records from the controller. | |
| void | GRecordRate (double period_ms) |
| Sets the asynchronous data record to a user-specified period via DR. | |
| void | GTimeout (Int16 timeout_ms) |
| Set the timeout of communication transactions. Use -1 to set the original timeout from GOpen(). | |
| string | GVersion () |
| Used to get the gclib version. | |
| void | GWrite (string buffer) |
| Performs a write on the connection. | |
| string[] | GSetupDownloadFile (string path, Int32 options) |
| Allows downloading of a Galil compressed backup (gcb) file to the controller. | |
| void | GSetServer (string server_name) |
| Connects gclib to a new gcaps server. | |
| string | GServerStatus () |
| Retrieves the name of your local gcaps server and whether or not it is currently published. | |
| string[] | GListServers () |
| Retrieves a list of gcaps servers that are advertising themselves on the local network. | |
| void | GPublishServer (string server_name, bool publish, bool save) |
| Publishes or removes local gcaps server from the network. | |
| string[] | GRemoteConnections () |
| Returns a list of IP Addresses that currently have an open connection to your hardware. | |
Data Fields | |
| argtypes | |
| restype | |
Protected Attributes | |
| str | _gclib_path = r'C:\Program Files (x86)\Galil\gclib\dll\x64\gclib.dll' |
| str | _gclibo_path = r'C:\Program Files (x86)\Galil\gclib\dll\x64\gclibo.dll' |
| _gclib = WinDLL(_gclib_path) | |
| _gclibo = WinDLL(_gclibo_path) | |
| _GReturn = c_int | |
| _GCon = c_void_p | |
| _GCon_ptr = POINTER(_GCon) | |
| _GSize = c_ulong | |
| _GSize_ptr = POINTER(_GSize) | |
| _GCStringIn = c_char_p | |
| _GCStringOut = c_char_p | |
| _GOption = c_int | |
| _GStatus = c_ubyte | |
| _GStatus_ptr = POINTER(_GStatus) | |
| str | _enc = "ASCII" |
| int | _buf_size = 500000 |
| _error_buf = create_string_buffer(128) | |
Provides a class that binds to gclib's unmanaged dll. Wraps each call and provides a more user-friendly interface for use in C#.
The Gclib class assumes the default installation of gclib, "C:\Program Files (x86)\Galil\gclib\". If the dlls are elsewhere, change the path strings GclibDllPath_, and GcliboDllPath_.