From owner-freebsd-current@FreeBSD.ORG Sun Mar 25 16:42:47 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BEF1516A403 for ; Sun, 25 Mar 2007 16:42:47 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 80E3A13C489 for ; Sun, 25 Mar 2007 16:42:47 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id EE79D17382; Sun, 25 Mar 2007 16:42:45 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.8/8.13.8) with ESMTP id l2PGgi4u001231; Sun, 25 Mar 2007 16:42:45 GMT (envelope-from phk@critter.freebsd.dk) To: "SUNGBAK KIM" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 25 Mar 2007 17:34:48 +0900." Date: Sun, 25 Mar 2007 16:42:44 +0000 Message-ID: <1230.1174840964@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: freebsd-current@freebsd.org Subject: Re: NI PCI-GPIB tnt4882 test failed on FreeBSD Current 7.0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2007 16:42:47 -0000 In message , "SUNGBAK KIM" writes: >GPIB control with FreeBSD 7.0 Current because of supporting NI PCI-GPIB >interface card. >4. Basic Code Testing > >I compiled *IDN? Qurey C code as shown below archive but no response from >instrument (AFG3102, etc and linux-gpib returned good results ). > >http://lists.freebsd.org/mailman/htdig/freebsd-hackers/2005-February/010164.html > >and modyfied Code returned dmm = 0 > >/*** PRINT DMM ****/ >dmm = ibdev(0, 11, 0, T1s, 1, 0); >printf(" dmm = %d\n", dmm); >if (dmm < 0) > errx(1, "ibdev = %d\n", dmm); > ibwrt(dmm, "*IDN?\r\n", 7); > >I think dmm should be dmm > 0, if properly configured. right ? zero is a valid handle, so that is OK. Off the top of my head I cannot see what should be wrong, but our GPIB code is not very mature, or for that matter, well tested. I have used it mostly with my various HP equipment and have only ever tried it with one non-HP piece of equipment: my Tex scope. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.