AnsweredAssumed Answered

USB communication Via SICL

Question asked by terrytham on Feb 23, 2012
Latest reply on Feb 23, 2012 by hognala
Hello Master

I have a unit of U2722A.
i have installed all the necessary software (IO Libraries suite, and Measurement Manager) under Windows XP platform.
I am using Visual Studio 6 to develop the sample test program, which required to communicate with the unit.
Through to the user's guide, I can somehow open unit usb as following:
     
INST id;
id = iopen("usb0[0x0957::0x4118::MY51190012::0]");
itimeout(id, 5000);

and id returned 1.
Next i did was trying to write a command as following:

int z
unsigned long actual;
z= iwrite(id, "MEAS:VOLT? (@1)\n", 23, 1, &actual);

z returned as 0.
Next, was trying to read result

char abc[256]={0};
z = iread(id, abc, 20, NULL, &actual);

z returned timeout error 15,
and the char array returned empty.

Where did i missed ?
Or i've sent a wrong command ? cause i saw the USB LED blinked while sending command during debug mode.

Please enlighten me
Thank You Very Much
Terry  

Outcomes