![]() |
gclib 2.0.10
Galil Communications Library
|
A core feature of gclib is the ability to connect to a controller over ethernet, serial, or PCI, using a single connection API.
Use GAddresses()
to see the different addresses that are available.
If using an ethernet controller that doesn't have an IP address yet, it will show up in GIpRequests()
. Use GAssign()
to give the controller an IP. If successful, the controller will begin showing up in GAddresses()
under the new address.
Use gclib.py.GAddresses()
to see the different addresses that are available.
If using an ethernet controller that doesn't have an IP address yet, it will show up in gclib.py.GIpRequests()
. Use gclib.py.GAssign()
to give the controller an IP. If successful, the controller will begin showing up in gclib.py.GAddresses()
under the new address.
Use gclibjava.GclibJava.GAddresses()
to see the different addresses that are available.
If using an ethernet controller that doesn't have an IP address yet, it will show up in gclibjava.GclibJava.GIpRequests()
. Use gclibjava.GclibJava.GAssign()
to give the controller an IP. If successful, the controller will begin showing up in gclibjava.GclibJava.GAddresses()
under the new address.
Use gclib.GAddresses() to see the different addresses that are available.
If using an ethernet controller that doesn't have an IP address yet, it will show up in gclib.GIpRequests(). Use gclib.GAssign() to give the controller an IP. If successful, the controller will begin showing up in gclib.GAddresses() under the new address.
Use Gclib.GAddresses() to see the different addresses that are available.
If using an ethernet controller that doesn't have an IP address yet, it will show up in Gclib.GIpRequests(). Use Gclib.GAssign() to give the controller an IP. If successful, the controller will begin showing up in Gclib.GAddresses() under the new address.
Use G Addresses
to see the different addresses that are available.
If using an ethernet controller that doesn't have an IP address yet, it will show up in G Ip Requests
. Use G Assign
to give the controller an IP. If successful, the controller will begin showing up in G Addresses
under the new address.
To use a controller with gclib, first pass the address to GOpen()
to receive a handle to the connection. This handle will be used in future library calls such as GInfo()
, which we use to display some information about the open connection. After you are done, close the connection with GClose()
.
> .\connection.exe 192.168.0.40 192.168.0.40, DMC4040 Rev 1.3i, 10601
GClose()
, the controller may be left in an inconsistent state.gclib.py()
object, then pass an address to gclib.py.GOpen()
. gclib.py.GInfo()
to show basic info about the open connection. gclib.py.GClose()
. gclib.py.GClose()
, the controller may be left in an inconsistent state. To use a controller with gclib, first create a gclibjava.GclibJava()
object, then pass an address to gclibjava.GclibJava.GOpen()
. After you are done, close the connection with gclibjava.GclibJava.GClose()
.
> java Connection 192.168.0.40 192.168.0.40, DMC4040 Rev 1.3i, 10601
GClose()
, the controller may be left in an inconsistent state. To use a controller with gclib, first create a gclib()
object, then pass an address to gclib.GOpen(). After you are done, close the connection with gclib.GClose().
To use a controller with gclib, first create a Gclib()
object, then pass an address to Gclib.GOpen(). After you are done, close the connection with Gclib.GClose().
To use a controller with gclib, first pass the address to G Open
to receive a handle to the connection. This handle will be used in future library calls such as G Info
, which we use to display some information about the open connection. After you are done, close the connection with G Close
.
G Close
, the controller may be left in an inconsistent state. To issue commands, use GCommand()
with an open connection. The following example uses GCommand()
to implement a basic terminal.
GCommand()
with an open connection. To issue commands, use gclibjava.GclibJava.GCommand()
with an open connection. The following example uses gclibjava.GclibJava.GCommand()
to implement a basic terminal.
To issue commands, use gclib.GCommand() with an open connection. The following example uses gclib.GCommand() to implement a basic terminal.
To issue commands, use Gclib.GCommand() with an open connection. The following example uses Gclib.GCommand() to implement a basic terminal.
To issue commands, use G Command
with an open connection.
GReturn
value to indicate the error, with G_NO_ERROR
(0) indicating that the function was successful. Pass a GReturn
value to GError()
to get a string description of the error. See gclib_errors.h
for a full list of error codes. gclib.GclibError
will be thrown with a description of the error. gclibjava.GclibJavaException()
will be thrown with the error code and description. gclib_errors.h
for a full list of error codes. Use GProgramUpload()
to get the controller's program, and use GProgramDownload()
to set it. See the gclib Program Preprocessor for advanced usage.
Use GArrayUpload()
to get an array from the controller, and use GArrayDownload()
to set it.
first
and last
arguments to transfer only part of the array.G_CR
or G_COMMA
for carriage return or comma delimiting, respectively. Use gclib.py.GProgramUpload()
to get the controller's program, and use gclib.py.GProgramDownload()
to set it.
Use gclib.py.GArrayUpload()
and gclib.py.GArrayDownload()
similarly for arrays. Use the first
and last
arguments to transfer only part of the array.
Use gclibjava.GclibJava.GProgramUpload()
to get the controller's program, and use gclibjava.GclibJava.GProgramDownload()
to set it. See the gclib Program Preprocessor for advanced usage.
Use gclibjava.GclibJava.GArrayUpload()
to get an array from the controller, and use gclibjava.GclibJava.GArrayDownload()
to set it.
Use gclib.GProgramUpload() to get the controller's program, and use gclib.GProgramDownload() to set it. See the gclib Program Preprocessor for advanced usage.
Use gclib.GArrayUpload() to get an array from the controller, and use gclib.GArrayDownload() to set it.
Use Gclib.GProgramUpload() to get the controller's program, and use Gclib.GProgramDownload() to set it. See the gclib Program Preprocessor for advanced usage.
Use Gclib.GArrayUpload() to get an array from the controller, and use Gclib.GArrayDownload() to set it.
Use G Program Upload
to get the controller's program, and use G Program Download
to set it. See the gclib Program Preprocessor for advanced usage.
Use G Array Upload
to get an array from the controller, and use G Array Download
to set it.
first
and last
inputs to transfer only part of the array.To listen for unsolicited data, add --subscribe ALL
to your connection string. See GOpen()
documentation for details.
Use GMessage()
to get unsolicited messages from the controller, GInterrupt()
to get event interrupts, and GRecord()
to get data records. If there is no data available, these methods will block up to five seconds before timing out.
Use gclib.py.GMessage()
to get unsolicited messages from the controller, and gclib.py.GInterrupt()
to get event interrupts. If there is no data available, these methods will block up to five seconds before timing out.
Use gclibjava.GclibJava.GMessage()
to get unsolicited messages from the controller, gclibjava.GclibJava.GInterrupt()
to get event interrupts, and gclibjava.GclibJava.GRecord()
to get data records. If there is no data available, these methods will block up to five seconds before timing out.
Use gclib.GMessage() to get unsolicited messages from the controller, gclib.GInterrupt() to get event interrupts, and gclib.GRecord() to get data records. If there is no data available, these methods will block up to five seconds before timing out.
Use Gclib.GMessage() to get unsolicited messages from the controller, Gclib.GInterrupt() to get event interrupts, and Gclib.GRecord() to get data records. If there is no data available, these methods will block up to five seconds before timing out.
Use G Message
to get unsolicited messages from the controller, G Interrupt
to get event interrupts, and G Record
to get data records. If there is no data available, these methods will block up to five seconds before timing out.
For G Record
, note that memory must be allocated using the 'Initialize Array' node to store the data record packet. This memory space is filled with the information in the data record packet and then parsed using the 'Index Array' and 'Join Numbers' nodes.
Galil Connect allows gclib to issue commands through a remote gcaps server. This makes debugging closed or distant systems much easier.
On the device hosting the remote gcaps server (in this example a Raspberry Pi), use GPublishServer()
.
On the client, use GListServers()
to view all available gcaps servers. Pass a server name to GSetServer()
for future gclib calls to be routed through that gcaps server. When done, pass the special string "Local" to GSetServer()
to disconnect from the remote gcaps server.
On the device hosting the remote gcaps server (in this example a Raspberry Pi), use gclib.py.GPublishServer()
.
On the client, use gclib.py.GListServers()
to view all available gcaps servers. Pass a server name to gclib.py.GSetServer()
for future gclib calls to be routed through that gcaps server. When done, pass the special string "Local" to gclib.py.GSetServer()
to disconnect from the remote gcaps server.
On the device hosting the remote gcaps server (in this example a Raspberry Pi), use gclibjava.GclibJava.GPublishServer()
.
On the client, use gclibjava.GclibJava.GListServers()
to view all available gcaps servers. Pass a server name to gclibjava.GclibJava.GSetServer()
for future gclib calls to be routed through that gcaps server. When done, pass the special string "Local" to gclibjava.GclibJava.GSetServer()
to disconnect from the remote gcaps server.
On the device hosting the remote gcaps server (in this example a Raspberry Pi), use gclib.GPublishServer().
On the client, use gclib.GListServers() to view all available gcaps servers. Pass a server name to gclib.GSetServer() for future gclib calls to be routed through that gcaps server.
On the device hosting the remote gcaps server (in this example a Raspberry Pi), use Gclib.GPublishServer().
On the client, use Gclib.GListServers() to view all available gcaps servers. Pass a server name to Gclib.GSetServer() for future gclib calls to be routed through that gcaps server.
On the device hosting the remote gcaps server (in this example a Raspberry Pi), use G Publish Server
.
On the client, use G List Servers
to view all available gcaps servers. Pass a server name to G Set Server
for future gclib calls to be routed through that gcaps server. When done, pass the special string "Local" to G Set Server
to disconnect from the remote gcaps server.
This project contains two example programs.
The 'Record' example uses RA in continuous mode along with GArrayUpload()
to allow recording movement for an arbitrary amount of time. It produces a file with the recorded positions of all axes.
The 'Replay' example uses the file produced by 'Record' along with CM to accurately reproduce the recorded movement.
The 'Record' example uses RA in continuous mode along with gclib.py.GProgramUpload()
to allow recording movement for an arbitrary amount of time. It produces a file with the recorded positions of all axes.
The 'Replay' example uses the file produced by 'Record' along with CM to accurately reproduce the recorded movement.
The 'Record' example uses RA in continuous mode along with gclibjava.GclibJava.GProgramUpload()
to allow recording movement for an arbitrary amount of time. It produces a file with the recorded positions of all axes.
The 'Replay' example uses the file produced by 'Record' along with CM to accurately reproduce the recorded movement.
The 'Record' example uses RA in continuous mode along with Gclib.GProgramUpload() to allow recording movement for an arbitrary amount of time. It produces a file with the recorded positions of all axes.
The 'Replay' example uses the file produced by 'Record' along with CM to accurately reproduce the recorded movement.
The 'Record' example uses RA in continuous mode along with Gclib.GProgramUpload() to allow recording movement for an arbitrary amount of time. It produces a file with the recorded positions of all axes.
The 'Replay' example uses the file produced by 'Record' along with CM to accurately reproduce the recorded movement.