AnsweredAssumed Answered

Program with reading frequecy of E5071B

Question asked by myevin on Mar 3, 2010
Latest reply on Mar 4, 2010 by odanzy
Hello,
I'm trying to set and read frequency of E5071B by Visual C++. I can set frequency well (300Khz~8.5GHz), but problem comes when i read the frequency. If the frequency is higher than 2140MHz, i can't read the correct value. Here is my code, could you help me?

Setting frequency:

:SENS1:FREQ:STAR 3000000000
:SENS1:FREQ:STOP 6000000000

Setting frequency works great.
Reading:

:SENS1:FREQ:STAR?
:SENS1:FREQ:STOP?

When the frequency is lower than 2150MHz, it can return correct value.
At first, i use this command to read:

iscanf(id,"%d",&dTemp);

but not working and return 1, then i tried with long int:

iscanf(id,"%ld",&dTemp);

still not working and return 1, then i tried with char:

iscanf(id,"%*s",&strTemp);

still not working.
Thanks.  

Outcomes