SourceForge.net Logo

ScopeGrab32 - A screenshot tool for the Fluke ScopeMeter series


Program info
ScopeGrab32 allows you to download screenshots from your ScopeMeter, and save them to the clipboard or a bitmap or postscript file. It runs on Windows platforms starting from Win95. It has been tested in WinME and WinXP, so it should work also in 95/98 and 2k/2k3/FX. The linux release has been tested on SuSE 9.3.

A similar program exists for unix too, i.e. S. Merrifields ScopeGrab. From this tool I got the idea to port it into ScopeGrab32, though in the end I created a completely new program and nothing in ScopeGrab32 is based on the unix tool ;-)

To download screenshots, you'll need an optical<->RS232 link cable for your ScopeMeter. Fluke sells the PM9080, but building your own is very easy (cf my own cable instructions for RS232 and USB, or Robert Lacostes scopelink, and via Google probably other cables can be found, too..)

Supported scopes: ScopeMeter 190 series (190C series in greyscale), ScopeMeter 123 and 124, ScopeMeter 91/92/96, ScopeMeter 97/99, and CombiScope PM33xxB series (external HPGL file viewer required)
Downloads
Version 1.0 RC1 :
This version supports the 190 and 190C series, monochrome screenshots.
ScopeGrab32_src.zip   complete mingw C++ source code (Dev-C++ project)
ScopeGrab32_exe_1.0a.zip   the compiled .exe, no setup required

Version 2.2.0 RTM :
This version supports the 190(C), 120 and 90 series, monochrome screenshots and 90 series waveform downloads.
ScopeGrab32_v22_src.zip   complete mingw C++ source code (Dev-C++ project)
  and HTML Help Workshop files
ScopeGrab32_v22_win32.zip   the compiled .exe together with help files, no setup required
 
ScopeGrab32-v220CombiScope-exe.zip   "patch": new .exe with Fluke CombiScope PM33xxB support

Version 2.2.5 Linux beta/RC1 :
same features as in 2.2.0, but with some cosmetic GUI changes.
sg32_v225_linuxBeta_src.zip   source code and makefile (needs wxGTK to compile)
  and HTML help files
sg32_v225_linuxBeta.zip   precompiled binary (i386, GTK), no wxGTK required
  sorry no RPM, and help files missing (see source code zip)

Current development version (post-v2.2.0):
Here you can get potentially unstable alpha-releases, or go to viewcvs or get from CVS. Things for the next release: Scopemeter setup download/restore, SM190(C) waveform data decoding. CVS branches: MAIN and v220_linux
SF project filelist   old or recent alphareleases
CVS files   The current devel source (viewCvs)
  Alternatively you may CVS checkout the module 'scopegrab32' from
  :pserver:anonymous@scopegrab32.cvs.sourceforge.net:/cvsroot/scopegrab32

Other infos, files and a bugtrack/forum are on the SF scopegrab32 project page

A list of commands sniffed from ScopeMeter 97 and 99 and other ScopeMeters can be found in commands_reverse_eng.txt. The SM90 series respond in Epson ESC code graphics. Full serial traces contributed by others are found in the CVS. Now (09/2006) there are also official, full remote command reference documents (txt, pdf) for the SM90 series, Fluke 105 and Fluke 860, found in the CVS under techref, so feel free to extend ScopeGrab32 for your own Fluke or write your own program! :-)

Version 1.0 pre-RC1 screenshots
This is how a downloaded screenshot looks like. The screenshot size is 480x480 pixels on (probably) all ScopeMeters.



The serial port console, for sending various commands to the scope.


An example program output, copied to the clipboard and then saved as a GIF file in photoshop.
Could've saved directly to a BMP file, too...


Crash course
You should first connect the optical cable (the commercial or a DIY version) between your PC/laptop and the Fluke. Next, start the ScopeMeter. Finally, run ScopeGrab32. The program will immediately check COM1 at the default ScopeMeter baudrate of 1200 baud. Of course, you can connect the scope later, too, or change the port settings if required. After a new port/baud selection, the prog immediately tries to find the Fluke, no pressing of 'Apply' or 'Connect' buttons needed.

When the prog shows the name of the detected ScopeMeter below the serial port comboboxes, you can proceed with clicking those self-explanatory command buttons to first download the screen, then copy&paste it or save it to a file. Note: ScopeMeter sends a postscript file which is buggy (the image crops). You'll have to edit the .ps file before printing or editing/viewing in ghostview etc.
Compiling, and other infos
This is covered at the start of the source code file 'main.cpp'. This is a copy:

/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
	
// ************************************************************************
// ***                                                                  ***
// ***  ScopeGrab32 - A tool for the Fluke ScopeMeter series            ***
// ***  (C) 2004 Jan Wagner                                             ***
// ***                                                                  ***
// ***  Version: 2.0.1 alpha                                            ***
// ***                                                                  ***
// ***  Licence: GNU GPL                                                ***
// ***                                                                  ***
// ***  PROGRAM DESCRIPTION                                             ***
// ***  This program was inspipired by Steven J. Merrifields similarly  ***
// ***  named ScopeGrab "Fluke ScopeMeter Screen Capture" tool          ***
// ***  for unix/linux. You can find the source for his program at      ***
// ***    http://users.on.net/~merrifield/fluke/scopegrab.html          ***
// ***                                                                  ***
// ***  ScopeGrab32 runs under Windows 95/98/.../FX.                    ***
// ***                                                                  ***
// ***  The program requires an optical cable for the Fluke             ***
// ***  ScopeMeter. Fluke is selling a good quality cable kit, but      ***
// ***  it has its (high) price, too. It is possible to build your      ***
// ***  own cable. For schematics and infos, see e.g. my page at        ***
// ***    http://www.hut.fi/~jwagner/fluke/                             ***
// ***                                                                  ***
// ***  For now, the program supports monochrome screenshots from both  ***
// ***  190 and 190C series. Color screenshots of the 190C are PNG      ***
// ***  format, which is not yet handled by this program (hey, now you  ***
// ***  have the source code, add it yourself!:)                        ***
// ***                                                                  ***
// ***  The current 2.0.1 alpha version should have working support     ***
// ***  for ScopeMeters 123,124, 91,92,96 and 97,99.                    ***
// ***                                                                  ***
// ***                                                                  ***
// ***  USING THE PROGRAM                                               ***
// ***  Plug in the serial port cable into the PC serial port and       ***
// ***  the Fluke optical port, switch on the Fluke, and start          ***
// ***  ScopeGrab32. It will automatically check COM1 for the           ***
// ***  presence of a ScopeMeter. You may also select a different       ***
// ***  serial port or baud rate (1200 baud is the default for Fluke).  ***
// ***                                                                  ***
// ***  When a ScopeMeter is detected, the name is displayed below      ***
// ***  the serial port combo boxes, for example "FLUKE 196".           ***
// ***                                                                  ***
// ***  To make a screenshot of the current screen visible on your      ***
// ***  Fluke, click the Get Screen button. The image builds up while   ***
// ***  it is being downloaded.                                         ***
// ***                                                                  ***
// ***  Once downloaded, "To Clipboard" button can be clicked to copy   ***
// ***  the picture to the clipboard. After this you can for example    ***
// ***  paste it into your project report document, etc.                ***
// ***                                                                  ***
// ***  "Save Image" allows saving the picture to a Windows Bitmap      ***
// ***  *.bmp file.                                                     ***
// ***                                                                  ***
// ***  I also added a "Save Postscript" button, though I don't really  ***
// ***  know why! ;-) This will save the original postscript data       ***
// ***  that the ScopeMeter transmitted. However, at least with my      ***
// ***  Fluke 196 and firmware 4.08, the postscript is faulty and the   ***
// ***  left side of the image is not visible. The image may be garbled ***
// ***  a bit, too. Maybe in Fluke 190C series this is already fixed(?) ***
// ***                                                                  ***
// ***                                                                  ***
// ***  COMPILING                                                       ***
// ***  The program compiles only for Windows systems, as it calls      ***
// ***  the Win32 API serial port functions. Porting to linux should    ***
// ***  work, if you rewrite the CSerial class.                         ***
// ***                                                                  ***
// ***  This source was developed and compiled using:                   ***
// ***                                                                  ***
// ***   a) Dev-C++ 5.0 beta 9                                          ***
// **       http://www.bloodshed.net/dev/devcpp.html                    ***
// ***                                                                  ***
// ***   b) wxWindows (wxWidgets) 2.4.2, DevPak for Dev-C++             ***
// ***        http://michel.weinachter.free.fr/                         ***
// ***        or www.google.com "wxwindows 2.4.2 devpak"                ***
// ***      (note: a newer wxWindows DevPak may already be included     ***
// ***       with the DevC++ setup program)                             ***
// ***                                                                  ***
// ***   The source may compile also with a newer wxWindows DevPak.     ***
// ***   If not, use the DevC++ Tools=>Packet Manager to remove the     ***
// ***   new DevPak and then install the 2.4.2 one.                     ***
// ***                                                                  ***
// ************************************************************************
    

Console commands
For the ScopeGrab32 serial console you can use the Fluke Remote Control and Programming Reference (PDF, 142kb) to look up the commands that the ScopeMeter supports. Here's a list:
** Overview of commands for the ScopeMeter **

                      COMMAND HEADER   PAGE
COMMAND NAME          HEADER           NUMBER
-------------------------------------------------------
AUTO SETUP              AS             3.5
ARM TRIGGER             AT             3.7
CLEAR MEMORY            CM             3.9
CPL VERSION QUERY       CV             3.11
DEFAULT SETUP           DS             3.13
GET DOWN                GD             3.15
GO TO LOCAL             GL             3.17
GO TO REMOTE            GR             3.20
HOLD                    HO             3.21
IDENTIFICATION          ID             3.23
INSTRUMENT STATUS       IS             3.25
PROGRAM COMMUNICATION   PC             3.28
PROGRAM SETUP           PS             3.30
QUERY MEASUREMENT       QM             3.34
QUERY PRINT             QP             3.38
QUERY SETUP             QS             3.42
QUERY WAVEFORM          QW             3.43
READ DATE               RD             3.59
RESET INSTRUMENT        RI             3.61
REPLAY                  RP             3.63
RECALL SETUP            RS             3.65
READ TIME               RT             3.68
SWITCH ON               SO             3.70
SAVE SETUP              SS             3.71
STATUS QUERY            ST             3.72
TRIGGER ACQUISITION     TA             3.75
WRITE DATE              WD             3.77
WRITE TIME              WT             3.79
  


(C) 2005 Jan Wagner - rengawj[át]cc.tuh.if (reverse the strings)
Homepage: http://scopegrab32.sourceforge.net/