AnsweredAssumed Answered

download IQ to MXG

Question asked by overtheocean36 on Apr 11, 2011
Latest reply on Apr 17, 2015 by r.t
Hi,

l'm trying to download an IQ signal in an MXG. the IQ signal is form a text file. Below if the code to download the I part of the signal, l get an error "ViTable::lookup - session 4390912 is out of range"


unsigned char* ibuffer = new unsigned char[I.count()*2];
    for(int index=0; index<I.count(); index++)
    {
        int ivalue=(short) (8192* (I.at(index)/ max_value + 1));
        ibuffer&#91;index*2&#93;   = ivalue / 256;; // high byte of i
        ibuffer&#91;index*2+1&#93; = ivalue - 256 * ibuffer&#91;index*2&#93;;        // low byte of i
    }
    viWrite(vi,(ViBuf) ibuffer,I.count(),NULL);


it was working well with SICL command "iwrite(vi, ibuffer,I.count(),NULL);" but since l moved to VISa with viWrite...not working anymore.

anyone has an example how to download IQ file to MXG ?

regards,

Michael  

Outcomes