LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

N3300A driver related question...

Hi,

I am using Agilent N3300A (Electronic Load) driver (IVI-C) in a LabWindows/CVI 6.0 (Windows XP) environment.

I am using an old code that instrument "channel" is defined as an integer variable. As in the follwoing function call of the instrument IVI-c driver:

 

      agn330xa_ConfigureResistanceMode (agn3300aid, "CHAN1", AGN330XA_VAL_RESISTANCE_MODE_FIX);

 

"CHAN1" (argument 2) is a string.

 

How can I use the current "channel" (integer variable) in the above function call to replace the argument "CHAN1" (string) without getting any error? 

 

Thanks for your help.

 

-LVLV

0 Kudos
Message 1 of 2
(2,916 Views)

Hi lvlv,

 

I got confused about your "using an old code" statement. Is this code a compiled library, just a function in another C file or a whole program?

If this old code accepts the channel number as an integer and uses the agn3300 driver, it should already be converting the integer to a string using a simple call like


sprintf (chanStr, "CHAN%i", chanInt);

 

If you can modify the old code just change its parameter types or add the line above into the code to do the conversion.

 

Maybe I'm guessing to much, in which case you should explain the situation better for other people to help you better.

Hope this helps, 

 

S. Eren BALCI
IMESTEK
0 Kudos
Message 2 of 2
(2,909 Views)