gpib.n 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. '\" Copyright 1990 Regents of the University of California
  2. '\" Permission to use, copy, modify, and distribute this
  3. '\" documentation for any purpose and without fee is hereby
  4. '\" granted, provided that this notice appears in all copies.
  5. '\" The University of California makes no representations about
  6. '\" the suitability of this material for any purpose. It is
  7. '\" provided "as is" without express or implied warranty.
  8. '\"
  9. '\" $Header$ SPRITE (Berkeley)
  10. '/"
  11. .\" The definitions below are for supplemental macros used in Sprite
  12. .\" manual entries.
  13. .\"
  14. .\" .HS name section [date [version]]
  15. .\" Replacement for .TH in other man pages. See below for valid
  16. .\" section names.
  17. .\"
  18. .\" .AP type name in/out [indent]
  19. .\" Start paragraph describing an argument to a library procedure.
  20. .\" type is type of argument (int, etc.), in/out is either "in", "out",
  21. .\" or "in/out" to describe whether procedure reads or modifies arg,
  22. .\" and indent is equivalent to second arg of .IP (shouldn't ever be
  23. .\" needed; use .AS below instead)
  24. .\"
  25. .\" .AS [type [name]]
  26. .\" Give maximum sizes of arguments for setting tab stops. Type and
  27. .\" name are examples of largest possible arguments that will be passed
  28. .\" to .AP later. If args are omitted, default tab stops are used.
  29. .\"
  30. .\" .BS
  31. .\" Start box enclosure. From here until next .BE, everything will be
  32. .\" enclosed in one large box.
  33. .\"
  34. .\" .BE
  35. .\" End of box enclosure.
  36. .\"
  37. .\" .VS
  38. .\" Begin vertical sidebar, for use in marking newly-changed parts
  39. .\" of man pages.
  40. .\"
  41. .\" .VE
  42. .\" End of vertical sidebar.
  43. .\"
  44. .\" .DS
  45. .\" Begin an indented unfilled display.
  46. .\"
  47. .\" .DE
  48. .\" End of indented unfilled display.
  49. .\"
  50. ' # Heading for Sprite man pages
  51. .de HS
  52. .if '\\$2'cmds' .TH \\$1 1 \\$3 \\$4
  53. .if '\\$2'lib' .TH \\$1 3 \\$3 \\$4
  54. .if '\\$2'tcl' .TH \\$1 3 \\$3 \\$4
  55. .if '\\$2'tk' .TH \\$1 3 \\$3 \\$4
  56. .if t .wh -1.3i ^B
  57. .nr ^l \\n(.l
  58. .ad b
  59. ..
  60. ' # Start an argument description
  61. .de AP
  62. .ie !"\\$4"" .TP \\$4
  63. .el \{\
  64. . ie !"\\$2"" .TP \\n()Cu
  65. . el .TP 15
  66. .\}
  67. .ie !"\\$3"" \{\
  68. .ta \\n()Au \\n()Bu
  69. \&\\$1 \\fI\\$2\\fP (\\$3)
  70. .\".b
  71. .\}
  72. .el \{\
  73. .br
  74. .ie !"\\$2"" \{\
  75. \&\\$1 \\fI\\$2\\fP
  76. .\}
  77. .el \{\
  78. \&\\fI\\$1\\fP
  79. .\}
  80. .\}
  81. ..
  82. ' # define tabbing values for .AP
  83. .de AS
  84. .nr )A 10n
  85. .if !"\\$1"" .nr )A \\w'\\$1'u+3n
  86. .nr )B \\n()Au+15n
  87. .\"
  88. .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  89. .nr )C \\n()Bu+\\w'(in/out)'u+2n
  90. ..
  91. ' # BS - start boxed text
  92. ' # ^y = starting y location
  93. ' # ^b = 1
  94. .de BS
  95. .br
  96. .mk ^y
  97. .nr ^b 1u
  98. .if n .nf
  99. .if n .ti 0
  100. .if n \l'\\n(.lu\(ul'
  101. .if n .fi
  102. ..
  103. ' # BE - end boxed text (draw box now)
  104. .de BE
  105. .nf
  106. .ti 0
  107. .mk ^t
  108. .ie n \l'\\n(^lu\(ul'
  109. .el \{\
  110. .\" Draw four-sided box normally, but don't draw top of
  111. .\" box if the box started on an earlier page.
  112. .ie !\\n(^b-1 \{\
  113. \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  114. .\}
  115. .el \}\
  116. \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  117. .\}
  118. .\}
  119. .fi
  120. .br
  121. .nr ^b 0
  122. ..
  123. ' # VS - start vertical sidebar
  124. ' # ^Y = starting y location
  125. ' # ^v = 1 (for troff; for nroff this doesn't matter)
  126. .de VS
  127. .mk ^Y
  128. .ie n 'mc \s12\(br\s0
  129. .el .nr ^v 1u
  130. ..
  131. ' # VE - end of vertical sidebar
  132. .de VE
  133. .ie n 'mc
  134. .el \{\
  135. .ev 2
  136. .nf
  137. .ti 0
  138. .mk ^t
  139. \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  140. .sp -1
  141. .fi
  142. .ev
  143. .\}
  144. .nr ^v 0
  145. ..
  146. ' # Special macro to handle page bottom: finish off current
  147. ' # box/sidebar if in box/sidebar mode, then invoked standard
  148. ' # page bottom macro.
  149. .de ^B
  150. .ev 2
  151. 'ti 0
  152. 'nf
  153. .mk ^t
  154. .if \\n(^b \{\
  155. .\" Draw three-sided box if this is the box's first page,
  156. .\" draw two sides but no top otherwise.
  157. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  158. .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  159. .\}
  160. .if \\n(^v \{\
  161. .nr ^x \\n(^tu+1v-\\n(^Yu
  162. \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  163. .\}
  164. .bp
  165. 'fi
  166. .ev
  167. .if \\n(^b \{\
  168. .mk ^y
  169. .nr ^b 2
  170. .\}
  171. .if \\n(^v \{\
  172. .mk ^Y
  173. .\}
  174. ..
  175. ' # DS - begin display
  176. .de DS
  177. .RS
  178. .nf
  179. .sp
  180. ..
  181. ' # DE - end display
  182. .de DE
  183. .fi
  184. .RE
  185. .sp .5
  186. ..
  187. .HS gpib cmds
  188. .BS
  189. '\" Note: do not modify the .SH NAME line immediately below!
  190. .SH NAME
  191. gpib \- Command Interface to GPIB Command Library
  192. .SH SYNOPSIS
  193. \fBgpib\fI \fIcommand \fR[\fIparameter\fR]
  194. .SH "COMMANDS"
  195. .LP
  196. .nf
  197. .ta 4c 8c 12c
  198. \fBfind\fR \fBread\fR \fBwrite\fR
  199. \fBclose\fR \fBclear\fR \fBren\fR
  200. \fBsic\fR \fBcmd\fR \fBwait\fR
  201. .fi
  202. .LP
  203. .BE
  204. .SH "INTRODUCTON"
  205. .ta 4c
  206. .IP
  207. The GPIB Extension provides some essential commands from the
  208. GPIB Library to TCL/Tk. With this TCL commands you can initialize
  209. your GPIB Interface, send strings and commands to devices and get
  210. their measurement results.
  211. .LP
  212. .SH "DESCRIPTION"
  213. .ta 4c
  214. .LP
  215. .nf
  216. \fBfind\fR \fImnemonic\fR
  217. .fi
  218. .IP
  219. Returns a device descriptor for the device with name \fImnemonic\fR
  220. and initializes the device. The device must have been configured in
  221. /etc/gpib.conf with correct mnemonic name and GPIB adress.
  222. .LP
  223. .nf
  224. \fBread\fR \fIdevice\fR \fInum-bytes\fR
  225. .fi
  226. .IP
  227. Reads \fInum-bytes\fR from \fIdevice\fR.
  228. .LP
  229. .nf
  230. \fBwrite\fR \fIdevice\fR \fIstring\fR
  231. .fi
  232. .IP
  233. Sends \fIstring\fR to the device.
  234. .LP
  235. .nf
  236. \fBcmd\fR \fIdevice\fR \fIstring\fR
  237. .fi
  238. .IP
  239. Sends \fIstring\fR as GPIB Command to device.
  240. .LP
  241. .nf
  242. \fBren\fR \fIdevice\fR \fIflag\fR
  243. .fi
  244. .IP
  245. If \fIflag\fR is 1 the device is set to Remote Enable (REM) state,
  246. if 0 local mode is selected.
  247. .LP
  248. .nf
  249. \fBsic\fR \fIdevice\fR
  250. .fi
  251. .IP
  252. Performs the 'Send Interface Clear' command for 100us
  253. .LP
  254. .nf
  255. \fBwait\fR \fIdevice\fR \fImasks\fR
  256. .fi
  257. .IP
  258. Waits for a event. Valid values for \fImasks\fR are:
  259. .PP
  260. \fBsrq\fR SRQ line is asserted.
  261. .PP
  262. \fBtimo\fR A timeout occured.
  263. .LP
  264. .nf
  265. \fBclose\fR \fIdevice\fR
  266. .fi
  267. .IP
  268. Disconnects the desired device Descriptor from device and closes
  269. the device driver's file handler.
  270. .LP
  271. .SH KEYWORDS
  272. gpib, ieee488
  273. .SH BUGS
  274. .PP
  275. The Buffer size for read/write and command operations is limited to
  276. 512 bytes at this time.
  277. This could cause problems if you have more data to read/write.