LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hardcopy from Tektronix TDS 220 via GPIB

Using LabVIEW 6i, GPIB and a Tektronix TDS 220 digital oscilloscope. I'm
trying to capture the display from the scope as an EPSF- or BMP-file.
According to the Tektronix manual this is to be done with some
non-standard GPIB commands, spesifically the HARDCOPY command.

The driver contains an example how to configure for hardcopy, but I'm
having trouble reading it via the GPIB bus. The data I receive doesn't
make sense to me, and no graphics application can read the resulting
EPSF or BMP files generated.

Has anybody tried this with any luck?

--erik

--
nope-->fysel.ntnu
0 Kudos
Message 1 of 12
(11,808 Views)
[posted and mailed]

erik.wessel-berg@nope.no (Erik Wessel-Berg) wrote in
E83837.23065424102000@news.ntnu.no>:

>Using LabVIEW 6i, GPIB and a Tektronix TDS 220 digital oscilloscope. I'm
>trying to capture the display from the scope as an EPSF- or BMP-file.
>According to the Tektronix manual this is to be done with some
>non-standard GPIB commands, spesifically the HARDCOPY command.
>
>The driver contains an example how to configure for hardcopy, but I'm
>having trouble reading it via the GPIB bus. The data I receive doesn't
>make sense to me, and no graphics application can read the resulting
>EPSF or BMP files generated.
>
>Has anybody tried this with any luck?

I did some stuff years ago with a tek scope where the byte ordering was
reversed from
what is expected. Check that the format of the response
matches the documentation. Small chance that this might be your problem.

cheers, Alex

--

Alexander C. Le Dain, PhD
ICON Technologies Pty Ltd
http://www.icon-tech.com.au

******************************************************************
* The LabVIEW FAQ http://www.icon-tech.com.au/thelabviewfaq.html *
******************************************************************
0 Kudos
Message 2 of 12
(11,808 Views)
I had trouble with the Tek capture, also. I finally did get the kinks
worked out, and here is the resulting library.
Let me know if this is helpful,
Mark

Mark Eckdahl
Software Engineer
SLO Consulting
National Instruments Alliance Member



"Alex" wrote in message
news:8FED77D5Faledainupnawaycom@203.59.24.168...
[posted and mailed]

erik.wessel-berg@nope.no (Erik Wessel-Berg) wrote in
E83837.23065424102000@news.ntnu.no>:

>Using LabVIEW 6i, GPIB and a Tektronix TDS 220 digital oscilloscope. I'm
>trying to capture the display from the scope as an EPSF- or BMP-file.
>According to the Tektronix manual this is to be done with some
>non-standard GPIB commands, spesifically the HARDCOPY command.
>
>The driver contains an exa
mple how to configure for hardcopy, but I'm
>having trouble reading it via the GPIB bus. The data I receive doesn't
>make sense to me, and no graphics application can read the resulting
>EPSF or BMP files generated.
>
>Has anybody tried this with any luck?

I did some stuff years ago with a tek scope where the byte ordering was
reversed from what is expected. Check that the format of the response
matches the documentation. Small chance that this might be your problem.

cheers, Alex

--

Alexander C. Le Dain, PhD
ICON Technologies Pty Ltd
http://www.icon-tech.com.au

******************************************************************
* The LabVIEW FAQ http://www.icon-tech.com.au/thelabviewfaq.html *
******************************************************************




[Attachment Tek Scope Capture.zip, see below]
===========================
Mark Eckdahl - Software Manager at Blue Max Systems

LabVIEW developer for 20 years

0 Kudos
Message 3 of 12
(11,808 Views)
I was a Tek AE in a fromer life...

The byte order issue is related to reading binary waveform data -- an
array of numbers representing voltage versus time.

The HARDCOPY produces a PICTURE of the scope's display.

Reading a HARDCOPY image is actually pretty straight forward. First
setup the scope, via front panel or GPIB commands, for the kind of image
you want, e.g. BMP, TIFF, etc., landscape or portrait, etc. Then SEND
the HARDCOPY command. The scope will send the exact data, byte for
byte, as it would write to its own floppy to save the image file.

So I recommend using IBRDF, which reads the GPIB response from the scope
and writes it directly to a specified file, on your harddrive.

Then you can open the file in WORD or whatever graphic file
viewer/editor you like.

Mike



Mark Eckdahl wrote:
>
> I had trouble with the Tek capture, also. I finally did get the kinks
> worked out, and here is the resulting library.
> Let me know if this is helpful,
> Mark
>
> Mark Eckdahl
> Software Engineer
> SLO Consulting
> National Instruments Alliance Member
>
> "Alex" wrote in message
> news:8FED77D5Faledainupnawaycom@203.59.24.168...
> [posted and mailed]
>
> erik.wessel-berg@nope.no (Erik Wessel-Berg) wrote in
> E83837.23065424102000@news.ntnu.no>:
>
> >Using LabVIEW 6i, GPIB and a Tektronix TDS 220 digital oscilloscope. I'm
> >trying to capture the display from the scope as an EPSF- or BMP-file.
> >According to the Tektronix manual this is to be done with some
> >non-standard GPIB commands, spesifically the HARDCOPY command.
> >
> >The driver contains an example how to configure for hardcopy, but I'm
> >having trouble reading it via the GPIB bus. The data I receive doesn't
> >make sense to me, and no graphics application can read the resulting
> >EPSF or BMP files generated.
> >
> >Has anybody tried this with any luck?
>
> I did some stuff years ago with a tek scope where the byte ordering was
> reversed from what is expected. Check that the format of the response
> matches the documentation. Small chance that this might be your problem.
>
> cheers, Alex
>
> --
>
> Alexander C. Le Dain, PhD
> ICON Technologies Pty Ltd
> http://www.icon-tech.com.au
>
> ******************************************************************
> * The LabVIEW FAQ http://www.icon-tech.com.au/thelabviewfaq.html *
> ******************************************************************
>
> Name: Tek Scope Capture.zip
> Tek Scope Capture.zip Type: Zip Compressed Data (application/x-zip-compressed)
> Encoding: x-uuencode

--
Mike T
0 Kudos
Message 4 of 12
(11,808 Views)
Hello I have the exact same question. But this time my scope is TDS 744a. After configuring the hardcopy port, format, etc, I don't know how to use the idrdf command to receive the file on GPIB and store it in the hard drive. Can you please help me or give me a sample VI.

Mike: Its exactly your answer but the thing is I don't know how to use the idrdf command after the hardcopy configuration.


Thanks in advance,
Koolnaal
0 Kudos
Message 5 of 12
(11,364 Views)
It's ibrdf, which is one of the GPIB commands that you can run from the interactive control in MAX or use in a text based language. You can probably do the same thing with the VISA Read to File function.
Message 6 of 12
(11,359 Views)
hi, could you post the IBRDF vi which is able to send the file to PC via GPIB. im using LabVIEW 8.0 with TDS694C scope. really appreciate it. thank you
0 Kudos
Message 7 of 12
(10,986 Views)
There is no ibrdf VI. If you want to use the low level BPIB, do a GPIB Read and write the data returned to a file. Or, use the VISA Write to File as I mentioned.
Message 8 of 12
(10,971 Views)

Here is an example of how to do a screen shot transfer of a Tektronix TDS 3000 Series in Visual Basic 6:

 

Function capture_trace(gpib_address As String, file_path As String)
On Error GoTo ProcError

Dim sBuffer As String
Dim data_array As Variant
Dim xvalue As Variant
Dim yvalue As Variant
Dim i As Integer
Dim byteData() As Byte
Dim fn As Integer


    'check for missing arguments
    If gpib_address = "" Then
        Err.Raise (448)
    End If

    Dim ioMgr As VisaComLib.ResourceManager
    Dim Equip As VisaComLib.FormattedIO488
    Set ioMgr = New VisaComLib.ResourceManager
    Set Equip = New VisaComLib.FormattedIO488
    
    'set mouse to hourglass when making measurement
    Screen.MousePointer = vbHourglass
       
    Set Equip.IO = ioMgr.Open("GPIB0::" & gpib_address & "::INSTR")
    
    'set timeout
    Equip.IO.Timeout = 10000 '100 seconds
    
    'configure hardcopy
    Equip.WriteString "HARDCOPY:FORMAT PNG"
    Equip.WriteString "HARDCOPY:INKSAVER ON"
    Equip.WriteString "HARDCOPY:LANDSCAPE"
    Equip.WriteString "HARDCOPY:PORT GPIB"
    
    'perform hardcopy
    Equip.WriteString "HARDCOPY START"
    
    'write file
    fn = FreeFile()
    Open file_path For Binary Lock Read Write As #fn
    byteData = Equip.IO.Read(100000)
    Put #fn, , byteData
    Close #fn
            
    'close equipment
    Equip.IO.Close
    
    'set mouse back to default
    Screen.MousePointer = vbDefault
    
    Exit Function
    
ProcError:
    MsgBox "The following error occured in ATELIB.DLL TDS module: " & Err.Description
    
End Function
0 Kudos
Message 9 of 12
(7,700 Views)

@bhenard wrote:

Here is an example of how to do a screen shot transfer of a Tektronix TDS 3000 Series in Visual Basic 6:


<sarcasm>

Wow, thanks bhenard.  We have had this problem for 15 years, with no activity at all in this thread for 7 years.  And having VB code in a LabVIEW board is so useful.

</sarcasm>

 

And in case you still care, here's how to do it in LabVIEW: Screen capture of Tektronix MSO4104B using LabVIEW


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 10 of 12
(7,689 Views)