1 # Borland C++ {#borland}
3 The following instructions were performed on:
5 Embarcadero C++ 7.10 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc.
7 For brevity, these instructions assume the default installation location of "C:\Program Files (x86)\Galil\gclib".
10 Copy "gclib\examples\borland" to a convenient, writable location, e.g. "C:\temp". Run `C:\temp\borland\copy_source.bat` to copy all files.
14 C:\temp\borland>copy_source.bat
15 \Program Files (x86)\Galil\gclib\examples\cpp\x_arrays.cpp
16 \Program Files (x86)\Galil\gclib\examples\cpp\x_examples.cpp
17 \Program Files (x86)\Galil\gclib\examples\cpp\x_examples.h
18 \Program Files (x86)\Galil\gclib\examples\cpp\x_gcommand.cpp
19 \Program Files (x86)\Galil\gclib\examples\cpp\x_ginterrupt.cpp
20 \Program Files (x86)\Galil\gclib\examples\cpp\x_gmessage.cpp
21 \Program Files (x86)\Galil\gclib\examples\cpp\x_gmotioncomplete.cpp
22 \Program Files (x86)\Galil\gclib\examples\cpp\x_gread_gwrite.cpp
23 \Program Files (x86)\Galil\gclib\examples\cpp\x_grecord.cpp
24 \Program Files (x86)\Galil\gclib\examples\cpp\x_nonblocking.cpp
25 \Program Files (x86)\Galil\gclib\examples\cpp\x_programs.cpp
26 \Program Files (x86)\Galil\gclib\examples\cpp\x_simple.c
28 \Program Files (x86)\Galil\gclib\include\gclib.h
29 \Program Files (x86)\Galil\gclib\include\gclibo.h
30 \Program Files (x86)\Galil\gclib\include\gclib_errors.h
31 \Program Files (x86)\Galil\gclib\include\gclib_record.h
33 \Program Files (x86)\Galil\gclib\lib\dynamic\x86\gclib.lib
34 \Program Files (x86)\Galil\gclib\lib\dynamic\x86\gclibo.lib
36 \Program Files (x86)\Galil\gclib\dll\x86\gclib.dll
37 \Program Files (x86)\Galil\gclib\dll\x86\gclibo.dll
45 * Add Borland's compiler to the `PATH` variable.
48 C:\temp\borland>set PATH=c:\Program Files (x86)\Embarcadero\Studio\17.0\bin;%PATH%
52 C:\temp\borland>move gclib.lib _gclib.lib
55 C:\temp\borland>move gclibo.lib _gclibo.lib
58 C:\temp\borland>coff2omf.exe _gclib.lib gclib.lib
59 COFF to OMF Converter Version 1.2.0 Copyright (c) 1999-2009 Embarcadero Technologies, Inc.
62 C:\temp\borland>coff2omf.exe _gclibo.lib gclibo.lib
63 COFF to OMF Converter Version 1.2.0 Copyright (c) 1999-2009 Embarcadero Technologies, Inc.
68 ### Edit GOpen() call as necessary
69 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.
73 C:\temp\borland>bcc32 gclib.lib gclibo.lib x_simple.c
74 Embarcadero C++ 7.10 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc.
76 Turbo Incremental Link 6.72 Copyright (c) 1997-2015 Embarcadero Technologies, Inc.
81 C:\temp\borland>x_simple.exe
83 info: 192.168.0.43, DMC4143 Rev 1.2b, 9998
89 ### Review and Modify source
90 * 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.
91 * 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.
96 C:\temp\borland>bcc32 -c *.cpp
100 C:\temp\borland>bcc32 -o examples.exe *.obj gclib.lib gclibo.lib
105 C:\temp\borland>examples.exe
106 Library version: 130.115.279
108 192.168.0.43, DMC4020 Rev 1.2b, 291
111 ************************************************************************
112 Example GRead() and GWrite() usage
113 ************************************************************************
117 ************************************************************************
118 Example GCommand() usage
119 ************************************************************************
120 Revision report, ^R^V
136 Receiving Binary Data
140 QD correctly trapped, not allowed, try GArrayDownload()
141 DL correctly trapped, not allowed, try GProgramDownload()
146 ************************************************************************
147 Example GProgramDownload() and GProgramUpload() usage
148 ************************************************************************
149 GProgramDownload() correctly errored. Can't fit with level 3 compression
150 Program Downloaded with compression level 4
152 #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
153 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
155 Program executed as expected
156 ************************************************************************
157 Example GArrayDownload() and GArrayUpload() usage
158 ************************************************************************
159 2.0000, 4.0000, 6.0000, 8.0000, 10.0000, 12.0000, 14.0000, 16.0000, 18.000
162 2.0000, 1.0000, 3.0000, 5.0000, 10.0000, 12.0000, 14.0000, 16.0000, 18.000
165 3.0000, 5.0000, 10.0000
167 ************************************************************************
168 Example GRecord() usage
169 ************************************************************************
188 QR-based data record with offsets
192 ************************************************************************
193 Example GMessage() usage
194 ************************************************************************
206 ************************************************************************
207 Example GInterrupt() usage
208 ************************************************************************
211 ************************************************************************
212 Example GMotionComplete() usage
213 ************************************************************************
216 Beginning independent motion... Motion Complete on A
220 Beginning vector motion... Motion Complete on vector plane S
224 examples.cpp executed OK
225 main() is finished. Press Enter to exit: