I'm currently coding in "C" and using VISA.h. I wrote a program that will talk to a spectrum analyzer, determine certian spurious frequencies, and record those frequencies to a plain text file, which is all performed over a GPIB bus. I'm now trying to clean up some of the code and am having a problem with putting sections of the code into function calls. I was wondering if someone can show me what a simple funtion prototype would look like in C using the visa.h style of coding. In other words, what parameters do I need to pass to a function that would allow me to talk to the GPIB connected device while inside that function? For example, if I had spectrum analyzer connected via GPIB, and I wanted to make a function call
in my code that would set the center frequency to 3 MHz, other then the 3 MHz, what additional parameters do I need to pass to the function to allow it to send the command ":SENS:FREQ:CENT 3 MHz" over the GPIB bus. This function would return VOID.
Thanks for any help with this
Mike