08-17-2005 08:33 AM
08-29-2005 04:02 AM
08-30-2005 10:32 AM
09-08-2005 11:57 AM
Hi Xavier,
If your still interested I found some old source code I wrote a while ago for an hp3561a.
It's written in C++ but you should be able to make some sense of it.
Let me know if you need any help
//BEGIN CODE
short tracedata[401];
char buffer[1028];
short wordval = 0;
if ( m_nDev > 0 )
{
ibwrt(m_nDev, "DSTB;\n", 6); //dump binary trace data
ibwait(m_nDev, CMPL);
ibrd(m_nDev, (void**) buffer, len);
//add null terminator, ibcntl is a ni gpib value
buffer[ibcntl] = '\0';
if(ibsta & ERR){
err = "Unable to read from device!";
*(strError->pbstrVal) = err;
AtlTrace( "GetData: ibrd error ibsta = %ld ERR = %ld\n",ibsta, ERR);
*ReturnVal = FALSE;return S_OK;}
//convert values to word(short int)
j=0;
//Xavier
//At this point you need to do a byte swap
//the HP3561A uses an old Motorola processor
//Remember big endian and little endian stuff!!!
//any way do some thing like this
//the actual trace data starts at byte 5
//before that is header information
for(i=4;i<=805;i++)
{
byte1 = buffer[i];
byte2 = buffer[i+1];
wordval = ((byte1 *256) + byte2); // -65536;
tracedata[j] = wordval ;
j++;
i++;
}
09-08-2005 12:02 PM
Hi Xavier,
One more thing...
Multiplying each value in the tracedata array by .005 will give you the value in dBV that you see on the front
of the analyzer display screen
Curt
11-09-2005 02:11 AM
Hello with all
I thank you for your messages.
After some research, here the method which I found to obtain measurements of analyzer HP3561A.
to see the file joint
Perhaps that is not very academic, but that functions.
Thank you has all.
Cordially
Xavier