-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
123 lines (81 loc) · 3.61 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
-=-=-=-=-=-=-=-=-
Description
-=-=-=-=-=-=-=-=-
Package ni488 wraps National Instruments NI488.2 General Purpose Interface Bus
(GPIB) driver. The driver allows a client application to communicate with a GPIB
enabled piece of test equipment remotely and/or programmatically. NI-488.2 is an
industry standard for GPIB communications.
Common test equipment with GPIB interfaces:
Digital Multimeter
Power Supplies
Universal Radio Communications Testers
Signal Generators
Spectrum Analyzers
Thermal Chambers
Network Analyzers
Oscilloscopes
Lots of miscellaneous NI-488.2 information:
http://sine.ni.com/psp/app/doc/p/id/psp-356
GPIB Driver Versions for Microsoft Windows and DOS:
http://zone.ni.com/devzone/cda/tut/p/id/5326#toc0
GPIB Driver Versions for non-Microsoft Operating Systems:
http://zone.ni.com/devzone/cda/tut/p/id/5458
Direct download:
http://download.ni.com/support/softlib/gpib/
Drivers:
- Windows On 32-bit platforms, the DLL's (gpib-32.dll or ni4882.dll)
are compiled against ni488.h and 64-bit platforms against ni4882.h.
- OSX 32-bit library only and compiled against ni488.h.
- Linux Nothing on Linux yet. :-(
-=-=-=-=-=-=-=-=-
Caveats
-=-=-=-=-=-=-=-=-
Only tested against the 32-bit driver so far.
-=-=-=-=-=-=-=-=-
Usage
-=-=-=-=-=-=-=-=-
See ni488_example.go
-=-=-=-=-=-=-=-=-
Compiling
-=-=-=-=-=-=-=-=-
You'll need the Go compiler installed:
For installation on FreeBSD, Linux, and OSX:
http://golang.org/doc/install.html
For Windows:
Grab the prebuilt binaries here:
http://code.google.com/p/gomingw/downloads/list
To compile the goNI488 library you'll need MinGW and MSYS.
https://bitbucket.org/jpoirier/go_mingw/downloads
Set the cgo LDFLAGS for your environment: top of ni488.go/ni.386.go/ni.amd64.go
Note that cgo doesn't currently handle Windows paths so you'll need to copy
the NI DLL (gpib-32.dll or ni4882.dll) into the package's build directory, then
set "-L./" in LDFLAGS. See the CL here http://codereview.appspot.com/5154042/
National Instruments has only released a 32-bit driver. The Go wrapper,
and/or test program, need to be compiled in 32-bit mode. You can set
GOHOSTARCH=386 and GOARCH=386 to build the required Go compiler and
the goNI488 package.
To build the package: $ go get github.com/jpoirier/goNI488
To build and run the example: $ go run ni488_example.go
-=-=-=-=-=-=-=-=-
Testing
-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-
My Misc Notes
-=-=-=-=-=-=-=-=-
9-30-2011:
Windows: when compiling on 32-bit platforms AllSpoll is undefined.
--- OSX info ---
Method 1: Startup key combination (for current startup only)
If your Mac uses the 32-bit kernel by default, but supports the 64-bit kernel, you
can start up using the 64-bit kernel by holding the 6 and 4 keys during startup.
If your Mac uses the 64-bit kernel by default, you can start up with the 32-bit
kernel by holding the 3 and 2 keys during startup. Your Mac will revert to the
default kernel the next time you reboot it.
Method 2: On-disk setting (persistent)
To select the 64-bit kernel for the current startup disk, use the following command in Terminal:
sudo systemsetup -setkernelbootarchitecture x86_64
To select the 32-bit kernel for the current startup disk, use the following command in Terminal:
sudo systemsetup -setkernelbootarchitecture i386
Note: This setting is stored in the /Library/Preferences/SystemConfiguration/com.apple.Boot.plist
file and will take effect every time you start up from this disk. If you start up from a different
disk, the setting on that disk, or the hardware default, will take effect.