7 import java.util.ArrayList;
18 public static void main(String[] args) {
20 System.out.println(
"Java gclib Test");
22 System.out.println(
"Done");
51 System.out.println(
"Connecting");
59 System.out.println(
"Downloading program");
63 System.out.println(
"Program now on hardware\n********************");
66 System.out.println(
"\n********************");
74 System.out.println(
"Executing program");
77 System.out.println(
"Reading for a message");
80 System.out.println(
"Downloading array data");
81 List<Double> doubleList =
new ArrayList();
82 for (
double i = 0; i < 10.0; ++i)
91 System.out.println(
"Uploading array data");
94 for (Double d : arrayUpload)
96 System.out.println(d.toString());
119 catch (GclibJavaException
e)
121 System.out.println(Integer.toString(
e.getErrorCode()) +
" " +
e.getMessage());
string GProgramUpload()
Allows uploading of a DMC program to a string.
string GVersion()
Used to get the gclib version.
void GOpen(string address)
Used to open a connection to Galil hardware.
string GCommand(string Command, bool Trim=true)
Used for command-and-response transactions.
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.
string GInfo()
Provides a useful connection string.
void GProgramDownload(string program, string preprocessor="")
Allows downloading of a DMC program from a string buffer.
string GMessage()
Provides access to unsolicited messages.
List< double > GArrayUpload(string array_name, Int16 first=-1, Int16 last=-1)
Uploads array data from the controller's array table.
void GClose()
Used to close a connection to Galil hardware.
Provides a class that binds to gclib's unmanaged dll. Wraps each call and provides a more user-friend...
static void main(String[] args)
void e(GReturn rc)
A trivial, C++ style return code check used in Galil's examples and demos.