Menu

#10 IBOPENDEV ioctl failed

open
nobody
None
5
2007-01-31
2007-01-31
kinson peng
No

my program is very simple, test.c :

#include "gpib/ib.h"
main(){
int dvm; /* The Unit descriptor of the device */
char cmd[80]; /* A buffer for the string*/
/* get device from configuration */
if( (dvm=ibfind("voltmeter")) & ERR ){
printf("Can not find voltmeter! dvm=%d\n",dvm);
// exit(1);
}
if( (dvm=ibfind("ni_gpib")) & ERR ){
printf("Can not find board! dvm=%d\n",dvm);
// exit(1);
}
if ( (dvm=ibdev(0,1,0,T3s,0,0x0a)) & ERR) {
printf("can not find board... dvm=%d\n",dvm);
// exit(1);
}
if ( (dvm=ibdev(0,3,0,T3s,0,0xa)) & ERR) {
printf("can not find dvm... dvm=%d\n",dvm);
exit(1);
}
}

output;
[qzpeng@beauty gpib]$ ./test
libgpib: IBOPENDEV ioctl failed
libgpib: error in is_cic()!
libgpib: ibfind failed to get descriptor
Can not find voltmeter! dvm=-1
libgpib: IBOPENDEV ioctl failed
libgpib: ibfind failed to get descriptor
Can not find board! dvm=-1
libgpib: IBOPENDEV ioctl failed
libgpib: error in is_cic()!
can not find board... dvm=-1
libgpib: IBOPENDEV ioctl failed
libgpib: error in is_cic()!
can not find dvm... dvm=-1

----------------------------------

thanks for any kind of help or hint.

Best,
kinson

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.