LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read data trace from hp4194a into numeric array??

wonder if anyone has a simple example for reading trace data(gain/phase) from hp4194a into labview 6.x numeric array, using gpib interface. thnx in advance
0 Kudos
Message 1 of 11
(4,144 Views)
Intereseted still?
0 Kudos
Message 2 of 11
(4,139 Views)

I have all the vi's created to do this, first you tell the anal. to dump it's

plot data into an Xls. file .Then you take the string and and chop it up into

4  arrays of strings of known length containing the numerics. Then it

converts the  strings to numerics. Now if I could just figure out how to plot

the numerics in Labview 7.1. Then I would have soft copies of the plots.  

0 Kudos
Message 3 of 11
(4,012 Views)

I have a simlar requirement.  Have your example VI's been posted somewhere?

Rich

0 Kudos
Message 4 of 11
(3,866 Views)
Have you looked at the drivers available for it?

Message Edited by Dennis Knutson on 03-15-2007 06:54 PM

0 Kudos
Message 5 of 11
(3,859 Views)
Yes I have, but the challenge is that the old GPIB plotter is wearing out and all the client wants, is to be able to dump a plot to a new non-GPIB plotter.  There must be a simple way (i.e. no or low cost) to read the HP-GL stream comming from the HP4194 and redirect it to a new HP-GL enabled printer.
 
The LabVIEW instrument driver library appears to have all the hooks for developing a LabVIEW application to recreate the plot displayed on the HP4194's screen.  And printing the resulting graph would be relatively simple, but probably not within the clients budget.
 
0 Kudos
Message 6 of 11
(3,851 Views)
What are they willing to spend?  It would be pretty easy to read the A and B register data after a sweep, and write it to Excel.  I have done this for impedance sweeps, but not gain-phase.  There is no x-axis data in the registers, so you must know the settings to match up the register data points(y-axis) with  x-axis points, which you need to generate.  If you run the entire process from Labview, it isn't that bad.  I tried the drivers, but didn't like them for some reason.  I don't think they were flexible enough for what I wanted to do.  I either ran a stored ASP program from Labview and got the register data out after it was done, or sent individual commands.
0 Kudos
Message 7 of 11
(3,832 Views)

I am looking for a simple macro program that once a command button is clicked it will dump the data from the registers of the HP4194a into an excel spreadsheet. This way I am able to create graphs and such from the data. Thanks for any help!

 

BR,

LJG

0 Kudos
Message 8 of 11
(3,208 Views)
Have you tried using the driver? Exactly where are you having problems with your program?
0 Kudos
Message 9 of 11
(3,204 Views)

We have a VB6 program for an HP4396A (shown below). I would like to try and keep the same format for a program for the 4194A but I am struggling trying to find equivalent commands for the SA, POIN, OUTPDTRC, and OUTPSWPRM. Is there such commands for the 4194A?

 

 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

 

Any help would be greatly appreciated,

LJG

0 Kudos
Message 10 of 11
(3,195 Views)