LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read GPIB card serial number from Labwindows/CVI?

Hi, I need to read the GPIB card type and the GPIB card serial number. I have read the previous answer in this forum but the result didn't works on my computer.
 
I use the following codes:
 
 {
 int board;
 
 board = ibfind ("gpib0");
 k=ibdiag (board, buf, 500);
 }
 
There have total 256 chars returned and filled into the string buf[]. But I didn't find the interested strings such as GPIB card model, GPIB card part number, GPIB card serial number in the string. Anything I did is wrong? Anyone can give me some indication? Thank you.
0 Kudos
Message 1 of 4
(3,523 Views)
Anyone can help me? Thanks so much!
0 Kudos
Message 2 of 4
(3,500 Views)
Hi Hellopete,

Ibdiag is not supported anymore - after 1.7 gpib driver version.
Give a try to the ibask function. It is used here - inside some LabVIEW code.

The parameter for ibask corresponds to the different pieces of information that the interface board can be queried for. Hexadecimal 23 corresponds to the serial number. It will be returned as a numeric value and can be viewed as it appears in Measurement and Automation Explorer by formatting the indicator for Hexadecimal display
Hope it will help you.
Regards.
0 Kudos
Message 3 of 4
(3,485 Views)

Hi, Mathieu,

Thank you so much for the indication. It works very well. The code is:

 board = ibfind ("gpib1");
 i = ibask (board, 35, &returnedValu);

After view returnedValu in Hex, It matchs the GPIB card serial number exactly.

Thank you again!



Message Edited by helloPete on 04-03-2008 09:03 AM
0 Kudos
Message 4 of 4
(3,471 Views)