AnsweredAssumed Answered

Visual C++ programming for E8257D Signal Generator

Question asked by ErSanjeev on Apr 7, 2014
Latest reply on Apr 10, 2014 by tabbott
I am writing a VC++ program to change the frequency of Signal Generator from 0.5 GHz to 18 GHz in the step of 500 MHz. I want to use the for loop in the program. The code is as below:


void CTryDlg::OnOK() 
     ViSession defaultRM, vi;
     viOpen(defaultRM, "GPIB0::09::INSTR",VI_NULL,VI_NULL, &vi); 

     viPrintf(vi, "*RST\n");

     float i= 0.5;
     for (; i = < 36; i=i+0.5)
          viPrintf(vi, "FREQ ", i ,"GHZ\n");

The above code gives error because I am trying to concatenate the char and number, but I do not know how to do this.
Please help in this regard.

I will be thankful for your reply.