AnsweredAssumed Answered

Get SDD11/SDD21 trace data from N5230A

Question asked by tim.le on Jun 25, 2009
Latest reply on Jul 22, 2009 by odanzy
Dear expert,

I need your helps,  I need to get SDD11/SDD21 trace data from N5230A besed on VB6 , VISA. my idea is ,
1). Connect to N5230A
2). Recall setting from N5230A PC.
3). Send commanda to get SDD11/SDD21 trace data. ( But program error, I can't get trace data from N5230A ??? ).

Following is my program, could you please help to check it ? Thanks.

'Connect to N5230a
   status = viOpenDefaultRM(defrm) 
   status = viOpen(defrm, "GPIB0::7::INSTR", 0, 0, vi)
   status = viVPrintf(vi, "*IDN?" & vbLf, 0)    
   status = viVScanf(vi, "%t", strRes)
   
   'Recall settings from N5230A
   Status= viVPrintf(vi, "%t" & vbLf, "mmemory:cdirectory 'D:\123.cst)
  
  'Acquisition data from PNA
 
   buf = "SENSe1:SWEep:POIN?"
   status= viVPrintf(vi, "%s" & vbLf, buf)
   status= viVScanf(vi, "%s", spoints)
  
  'Turn continuous sweep off
    status = viVPrintf(vi, "%s" + Chr$(10), "INITiate:CONTinuous OFF")
    status = viVPrintf(vi, "%s" + Chr$(10), "INITiate:IMMediate;*wai")
 
  'Ask for the Data
   status = viVPrintf(vi, "%s" & vbLf, "format:data ascii")              ' Set ASCII format (just in case it got changed)
   'Read the Data
   status = viVPrintf(vi, "%s" + Chr(10), "CALCulate:DATA FDATA,")
   status = viVScanf(vi, "%t" & vbLf, sTraceData)
   status = viVPrintf(vi, "%s" + Chr$(10), "INITiate:CONT on")  

Outcomes