AnsweredAssumed Answered

4194A VB6 program

Question asked by LJG on Jun 24, 2009
Latest reply on Jul 14, 2009 by tsilchia
I currently have a VB6 program that dumps the data from registers A and B off of the 4396A (Shown Below) into an excel spreadsheet. I would like to keep a similiar format but I have not been able to find equivalet commands for SA?   POIN?   OUTPDTRCP?   and OUTPSWPRMP?.  If anyone has any suggestions on how I can write a code for the 4194A that would dump the data from registers A and B into an excel spreadsheet using VB6 or Macros it would be greatly appreciated.
LJG

   Dim intCount As Integer
  
   lblInfo.Caption = "Downloading....."
   frmMain.Refresh
   frmMain.MousePointer = vbHourglass
  
   int4396A = Init(gintAddr4396A)
   ibclr int4396A
  
   Call SendSCPI(int4396A, "POIN?")
   gintNOP = Val(GetSCPI(int4396A))
   ReDim gaDumpData(gintNOP)
  
    Call SendSCPI(int4396A, "SA?")
    If Val(GetSCPI(int4396A)) Then
        gaDumpData(0) = "Frequency (Hz),Data Trace A"
    Else
        gaDumpData(0) = "Frequency (Hz),Data Trace A, Data Trace B"
    End If
      
    Call SendSCPI(int4396A, "FORM4")
  
    For intCount = 1 To gintNOP
        Call SendSCPI(int4396A, "OUTPSWPRMP? " & intCount)
        gaDumpData(intCount) = GetSCPI(int4396A)
        Call SendSCPI(int4396A, "OUTPDTRCP? " & intCount)
        gaDumpData(intCount) = gaDumpData(intCount) & "," & GetSCPI(int4396A)
   
    Next intCount
     
   'Pass Control back to the 4396A
   ibpct int4396A
   'Clear the 4396A
   ibclr int4396A
   'Clear the NI488 Board
   ibclr 0
  
   Call SaveFile
  
   lblInfo.Caption = ""
   frmMain.Refresh
   frmMain.MousePointer = vbDefault

Outcomes