1 # clang (OS X) {#clang}
3 The following instructions were performed on
7 ProductVersion: 10.10.5
10 Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
11 Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
12 Target: x86_64-apple-darwin14.5.0
20 $ tar -xzf /Applications/gclib/examples/gclib_examples.tar.gz
21 $ cp /Applications/gclib/include/* .
22 $ cp /Applications/gclib/dylib/* .
24 gclib.0.dylib x_arrays.cpp x_gmotioncomplete.cpp
25 gclib.h x_examples.cpp x_gread_gwrite.cpp
26 gclib_errors.h x_examples.h x_grecord.cpp
27 gclib_record.h x_gcommand.cpp x_nonblocking.cpp
28 gclibo.0.dylib x_ginterrupt.cpp x_programs.cpp
29 gclibo.h x_gmessage.cpp x_simple.c
35 * 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.
39 $ gcc -Wall -Werror x_simple.c gclib.0.dylib gclibo.0.dylib -o simple
48 info: 10.1.3.142, DMC4020 Rev 1.2a-BH, 291
54 * 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. Don't forget `-s ALL` if data records, interrupts, and messages are to be tested.
55 * 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.
59 $ g++ x_*.cpp gclib.0.dylib gclibo.0.dylib -o example
64 Library version: 126.108.229
66 10.1.3.142, DMC4020 Rev 1.2a-BH, 291
68 ************************************************************************
69 Example GRead() and GWrite() usage
70 ************************************************************************
76 ************************************************************************
77 Example GCommand() usage
78 ************************************************************************
99 QD correctly trapped, not allowed, try GArrayDownload()
100 DL correctly trapped, not allowed, try GProgramDownload()
105 ************************************************************************
106 Example GProgramDownload() and GProgramUpload() usage
107 ************************************************************************
108 GProgramDownload() correctly errored. Can't fit with level 3 compression
109 Program Downloaded with compression level 4
111 #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=i+1
112 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
114 Program executed as expected
115 ************************************************************************
116 Example GArrayDownload(), GArrayUploadFile()
117 GArrayDownloadFile(), and GArrayUpload usage
118 ************************************************************************
119 2.0000, 4.0000, 6.0000, 8.0000, 10.0000, 12.0000, 14.0000, 16.0000, 18.0000, 20.0000
121 2.0000, 1.0000, 3.0000, 5.0000, 10.0000, 12.0000, 14.0000, 16.0000, 18.0000, 20.0000
123 3.0000, 5.0000, 10.0000
124 2.0000, 1.0000, 3.0000, 5.0000, 10.0000, 12.0000, 14.0000, 16.0000, 18.0000, 20.0000
127 ************************************************************************
128 Example GRecord() usage
129 ************************************************************************
148 QR-based data record with offsets
152 ************************************************************************
153 Example GMessage() usage
154 ************************************************************************
166 ************************************************************************
167 Example GInterrupt() usage
168 ************************************************************************
171 ************************************************************************
172 Example GMotionComplete() usage
173 ************************************************************************
176 Beginning independent motion... Motion Complete on A
180 Beginning vector motion... Motion Complete on vector plane S
183 ************************************************************************
184 Example GMessage non-blocking usage
185 ************************************************************************
189 ************************************************************************
190 Example GInterrupt non-blocking usage
191 ************************************************************************
194 ************************************************************************
195 Example GRecord non-blocking usage
196 ************************************************************************
200 examples.cpp executed OK
201 main() is finished. Press Enter to exit: