3 The following instructions were performed with x86 Minimalist GNU for Windows (MinGW) installed from http://mingw-w64.sourceforge.net/download.php#mingw-builds
5 For brevity, these instructions assume the default installation location of "C:\Program Files (x86)\Galil\gclib".
8 Copy "gclib\examples\mingw" to a convenient, writable location, e.g. "C:\temp". Run `C:\temp\mingw\copy_source.bat` to copy all files.
12 ### Edit GOpen() call as necessary
13 In a text editor, open *x_simple.c*. Find the GOpen() call and update the address to match the desired hardware. See the documentation for GOpen() for address formatting options.
17 * Launch the MinGW terminal, e.g. *Start -> All Programs -> MinGW-W64 project -> i686-4.9.1-posix-dwarf-rt_v3-rev3 -> Run Terminal*.
18 * Navigate to the directory with the files above.
22 C:\temp\mingw>gcc x_simple.c -L. -lgclibo -lgclib -o simple.exe
26 C:\temp\mingw>simple.exe
31 info: 10.1.3.17, DMC4020 Rev 1.2b, 291
33 response: 1584328.0000
39 ### Review and Modify source
40 * In a text editor, open *x_examples.cpp*. Find the GOpen() call and update the address to match the desired hardware. See the documentation for GOpen() for address formatting options.
41 * Find the `#if 0` preprocessor block enclosing the example calls. Change to `#if 1` to run the examples. Comment out the function calls to be avoided. Note some calls attempt to move motors and not all functions are compatible with all Galil products.
45 * Launch the MinGW terminal, e.g. *Start -> All Programs -> MinGW-W64 project -> i686-4.9.1-posix-dwarf-rt_v3-rev3 -> Run Terminal*.
46 * Navigate to the directory with the files above.
50 C:\temp\mingw>g++ *.cpp -L. -lgclibo -lgclib -o examples.exe
55 C:\temp\mingw>examples.exe
56 Library version: 41.35.34
58 192.168.0.43, DMC4020 Rev 1.2b, 291
61 ************************************************************************
62 Example GRead() and GWrite() usage
63 ************************************************************************
67 ************************************************************************
68 Example GCommand() usage
69 ************************************************************************
90 QD correctly trapped, not allowed, try GArrayDownload()
91 DL correctly trapped, not allowed, try GProgramDownload()
96 ************************************************************************
97 Example GProgramDownload() and GProgramUpload() usage
98 ************************************************************************
99 GProgramDownload() correctly errored. Can't fit with level 3 compression
100 Program Downloaded with compression level 4
102 #A;i=0;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i
103 i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;i=i+1;EN
105 Program executed as expected
106 ************************************************************************
107 Example GArrayDownload() and GArrayUpload() usage
108 ************************************************************************
109 2.0000, 4.0000, 6.0000, 8.0000, 10.0000, 12.0000, 14.0000, 16.0000, 18.000
112 2.0000, 1.0000, 3.0000, 5.0000, 10.0000, 12.0000, 14.0000, 16.0000, 18.000
115 3.0000, 5.0000, 10.0000
117 ************************************************************************
118 Example GRecord() usage
119 ************************************************************************
138 QR-based data record with offsets
142 ************************************************************************
143 Example GMessage() usage
144 ************************************************************************
156 ************************************************************************
157 Example GInterrupt() usage
158 ************************************************************************
161 ************************************************************************
162 Example GMotionComplete() usage
163 ************************************************************************
166 Beginning independent motion... Motion Complete on A
170 Beginning vector motion... Motion Complete on vector plane S
174 examples.cpp executed OK
175 main() is finished. Press Enter to exit: