gpib函数

更新时间:2023-05-25 02:08:30 阅读: 评论:0

5. GPIB protocol
5.1. GPIB command bytes
The meaning and values of the possible GPIB command bytes are as follows:
Table 12. GPIB command bytes
byte value (hexadecimal)
name
description
0x1
GTL
Go to local
0x4
SDC
Selected device clear
0x5
PPConfig (also 'PPC' on non-powerpc architectures)
Parallel poll configure
0x8
GET
Group execute trigger
0x9
TCT
Take control
0x11
LLO
Local lockout
0x14
DCL
Device clear
0x15
PPU
Parallel poll unconfigure
0x18
SPE
Serial poll enable
0x19
SPD
Serial poll disable
0x20 to 0x3e
MLA0 to MLA30
My (primary) listen address 0 to 30
0x3f
UNL
Unlisten
0x40 to 0x5e
MTA0 to MTA30
送知己
My (primary) talk address 0 to 30
0x5f
UNT
Untalk
0x60 to 0x6f
MSA0 to MSA15, also PPE
When following a talk or listen address, this is 'my condary address' 0 to 15. When following a parallel poll configure, this is 'parallel poll enable'. For parallel poll enable, the least significant 3 bits of the command byte specify which DIO line the device should u to nd its parallel poll respon. The fourth least significant bit (0x8) indicates the 'n' or polarity the device should u when responding.
0x70 to 0x7d
MSA16 to MSA29, also PPD
When following a talk or listen address, this is 'my condary address' 16 to 29. When following a parallel poll configure, this is 'parallel poll disable'.
0x7e
MSA30
My condary address 30
5.2. GPIB bus lines
Physically, the GPIB bus consists of 8 data lines, 3 handshaking lines, and 5 control lines (and 8 ground lines). Brief descriptions of how they are ud follow:
Table 13. GPIB bus lines
迪玛希个人资料简介有关数学的故事
bus line
宁济
description
pin number
DIO1 through DIO8
Data input/output bits. The 8 lines are ud to read and write the 8 bits of a data or command byte that is being nt over the bus.
DIO1 to DIO4 u pins 1 to 4, DIO5 to DIO8 u pins 13 to 16
EOI
End-or-identify. This line is asrted with the last byte of data during a write, to indicate the end of the message. It can also be asrted along with the ATN line to conduct a parallel poll.
5
DAV
Data valid. This is a handshaking line, ud to signal that the value being nt with DIO1-DIO8 is valid. During transfers the DIO1-DIO8 lines are t, then the DAV line is asrted after a delay called the 'T1 delay'. The T1 delay lets the data lines ttle to stable values before they are read.
6
NRFD
Not ready for data. NRFD is a handshaking line asrted by listeners to indicate they are not ready to receive a new data byte.
7
男士护肤品排行榜
NDAC
Not data accepted. NDAC is a handshaking line asrted by listeners to indicate they have not yet read the byte contained on the DIO lines.白内障的主要症状是什么
8
IFC
Interface clear. The system controller can asrt this line (it should be asrted for at least 100 microconds) to ret the bus and make itlf controller-in-charge.
9
SRQ
Service request. Devices on the bus can asrt this line to request rvice from the controller-in-charge. The controller can then poll the devices until it finds the device requesting rvice, and perform whatever action is necessary.
10
ATN
Attention. ATN is asrted to indicate that the DIO lines contain a command byte (as oppod to a data byte). Also, it is asrted with EOI when conducting parallel polls.
11
REN
Remote enable. Asrted by the system controller, it enables devices to enter remote mode. When REN is asrted, a device will enter remote mode when it is addresd by the controller. When REN is fal, all devices will immediately return to local mode.
17
食用油十大品牌>电话话术
ibwrt
Name
ibwrt -- write data bytes (board or device)
Synopsis
class=FUNCSYNOPSISINFO
#include <gpib/ib.h>
int ibwrt(int ud, const void *data, long num_bytes);
Description
ibwrt() is ud to write data bytes to a device or board. The argument ud can be either a device or board descriptor. num_bytes specifies how many bytes are written from the ur-supplied array data. EOI may be asrted with the last byte nt or when the end-of-string character is nt (e ibeos() and ibeot()). The write operation may be interrupted by a timeout (e ibtmo()), the board receiving a device clear command, or receiving an interface clear.
If ud is a device descriptor, then the library automatically handles addressing the device as listener and the interface board as talker, before nding the data bytes onto the bus.
If ud is a board descriptor, the board simply writes the data onto the bus. The controller-in-charge must address the board as talker.
After the ibwrt() call, ibcnt and ibcntl are t to the number of bytes written.
Return value
The value of ibsta is returned.
ibdev
Name
ibdev -- open a device (device)
Synopsis
class=FUNCSYNOPSISINFO#include <gp
ib/ib.h>
int ibdev(int board_index, int pad, int sad, int timeout, int nd_eoi, int eos);
Description
ibdev() is ud to obtain a device descriptor, which can then be ud by other functions in
the library. The argument board_index specifies which GPIB interface board the device is connected to. The pad and sad arguments specify the GPIB address of the device to be opened (e ibpad() and ibsad()). The timeout for io operations is specified by timeout (e ibtmo()). If nd_eoi is nonzero, then the EOI line will be asrted with the last byte nt during writes (e ibeot()). Finally, the eos argument specifies the end-of-string character and whether or not its reception should terminate reads (e ibeos()).

本文发布于:2023-05-25 02:08:30,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/927520.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

上一篇:APX809_APX810
标签:电话   品牌   男士   有关   简介   白内障
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图