Products > Test Equipment
GPIB library ni4882.dll function ibexpert?
alan.bain:
The function ibexpert is defined in the header <ni4882.h> as
PORT unsigned int NI488CC ibexpert (int ud, int option, const void * Input, void * Output);
I cannot however seem to find any documentation for it, but I know that on using VISA viOpen it gets called with ud=-1, option=0xe and Input = Output = some memory buffer.
Does anyone know any more (or have a link) or is this a case for IDA ?
(It looks on very cursory inspection as if it ends up fairly quickly in a giant switch statement on "option").
Alan
alan.bain:
Having found out a little more about the function I'd be very interested to see the results of ibexpert for options 10 and 11 on a real NI interface working with ni4882.dll. These return general info and controller into into the buffer Output. So e.g.
char buf1[2048];
char buf2[2048];
ibexpert(0, 10, NULL, buf1); // Returns the "configured interfaces"
DWORD boardId =0; // Valid number of a GPIB NI board
ibexpert(0, 11, &boardId , buf2);
If anyone had a working setup and could try the calls I'd be interested in what was in the buffers afterwards. To the best of my knowledge they are read only calls.
alan.bain:
For ibexpert call with option 10 turns out this returns an array of size 100 (decimal) DWORDs containing 1 if the ith interface is present and 0 if not. Option 1 is harder to work out since it seems to involve a virtual function call and that needs a NI interface to actually do anything other than return an error. So for those normal folk with one GPIB interface id 0 this returns 1 in first element of output and rest of bytes 0.
Tony_G:
I've never used the native API to talk to my adapter (I use the VISA.NET framework) but here is what I got from running:
--- Code: --- char buf1[2048];
char buf2[2048];
ibexpert(0, 10, NULL, buf1); // Returns the "configured interfaces"
unsigned long boardId = 0; // Valid number of a GPIB NI board
ibexpert(0, 11, &boardId, buf2);
--- End code ---
buf1 returns exactly what you said and buf 2 returns:
--- Code: ---+ buf2 0x00000075557be9d0 "NI GPIB-ENET/1000" char[2048]
--- End code ---
Which is the NI device I use to connect to my devices from my PC.
TonyG
alan.bain:
Thank you very much. This is indeed most helpful. I've now been able to get my library to talk under VISA to a prologix interface. Next steps require locating more GPIB cables !
char buf1[256];
int ret = ibexpert(0, 1, NULL, buf1);
This seems to return a DWORD of 0x5b but I'm not totally sure what it means.
char buf2[256];
ret = ibexpert(0, 6, NULL, buf2);
Genuinely curious...
Alan
Navigation
[0] Message Index
[#] Next page
Go to full version