3 The following instructions were performed on
6 Linux localhost.localdomain 3.17.4-301.fc21.x86_64 #1 SMP Thu Nov 27 19:09:10 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
8 g++ (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
14 $ tar -xzf /usr/share/doc/gclib/src/gclib_examples.tar.gz
16 x_arrays.cpp x_gcommand.cpp x_gmotioncomplete.cpp x_programs.cpp
17 x_examples.cpp x_ginterrupt.cpp x_gread_gwrite.cpp x_simple.c
18 x_examples.h x_gmessage.cpp x_grecord.cpp
22 * 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.
26 $ gcc -Wall -Werror x_simple.c -lgclib -lgclibo -o simple
35 info: 10.1.3.17, DMC4020 Rev 1.2b, 291
37 response: 179340166.0000
41 * 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.
42 * 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.
46 $ g++ x_*.cpp -lgclib -lgclibo -o example
50 Library version: 85.60.131
53 10.1.3.17, DMC4020 Rev 1.2b, 291
55 ************************************************************************
56 Example GRead() and GWrite() usage
57 ************************************************************************
61 ************************************************************************
62 Example GCommand() usage
63 ************************************************************************
84 QD correctly trapped, not allowed, try GArrayDownload()
85 DL correctly trapped, not allowed, try GProgramDownload()
90 ************************************************************************
91 Example GProgramDownload() and GProgramUpload() usage
92 ************************************************************************
93 GProgramDownload() correctly errored. Can't fit with level 3 compression
94 Program Downloaded with compression level 4
96 #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
97 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
99 Program executed as expected
100 ************************************************************************
101 Example GArrayDownload(), GArrayUploadFile()
102 GArrayDownloadFile(), and GArrayUpload usage
103 ************************************************************************
104 2.0000, 4.0000, 6.0000, 8.0000, 10.0000, 12.0000, 14.0000, 16.0000, 18.0000, 20.0000
106 2.0000, 1.0000, 3.0000, 5.0000, 10.0000, 12.0000, 14.0000, 16.0000, 18.0000, 20.0000
108 3.0000, 5.0000, 10.0000
109 2.0000, 1.0000, 3.0000, 5.0000, 10.0000, 12.0000, 14.0000, 16.0000, 18.0000, 20.0000
112 ************************************************************************
113 Example GRecord() usage
114 ************************************************************************
133 QR-based data record with offsets
137 ************************************************************************
138 Example GMessage() usage
139 ************************************************************************
151 ************************************************************************
152 Example GInterrupt() usage
153 ************************************************************************
156 ************************************************************************
157 Example GMotionComplete() usage
158 ************************************************************************
161 Beginning independent motion... Motion Complete on A
165 Beginning vector motion... Motion Complete on vector plane S
169 examples.cpp executed OK
170 main() is finished. Press Enter to exit: