Searching simple waveform viewer

For some testing, I created a simple data logger that outputs lines like this on the serial port:

sample#,ch1,ch2,ch3,ch4

All numbers in decimal integers.

The logger can be triggered so the sample# will contain holes. (Just sending all samples is not an option at 10kHz sample rate and 115k2 communication) I can capture the data on my PC and load it directly into excel and create a graph (X/Y, using sample# as X). So far so good, but zooming and moving the waveform is not easely done in excel. So I am looking for a better alternative.

I've already found Gtkwave, but it uses a rather complex datafile and I would need some converter program.

Then I tried gwave, but there are no windows executables (I need to run it on my W-only laptop as well). Compiling it under cygwin has failed.

Anyone know af any other waveform viewers, preferably with windows binaries for download? If need be, I can change the dataformat or write a simpe converter.

--
Stef    (remove caps, dashes and .invalid from e-mail address to reply by mail)
Reply to
Stef
Loading thread data ...

Traditional solutions include 'gnuplot' (compiles on Cygwin) and tek4014 emulation in any number of terminal emulators (suggest that your target outputs the 4014 control and data sequences directly).

Regards,

Michael

Reply to
msg

I think your own search failed because you used an overly restrictive keyword. The kind of program you're looking for is a plotting program. "Waveforms" are just one type of plottable data file.

'gnuplot' and any of its competitors can plot your file just fine.

set datafile separator ',' plot "log" using 1:2 with linespoints

Reply to
Hans-Bernhard Bröker

I got the impression, possibly faulty, that the OP is looking for a realtime viewer that accepts data from the serial port and scrolls the display in realtime.

Does gnuplot do that?

Jon

Reply to
Jonathan Kirwan

Well, maybe on closer reading of the OP's comments, I'm no longer sure what is being sought.

Jon

Reply to
Jonathan Kirwan

No, I am not looking for realtime display (would be nice later on maybe), but I search an 'interactive' off-line viewer. Load the file and have the ability to zoom and scroll through the graph. The timebase of the graph will be fairly long and I need to be able to zoom in to some details.

I can view what I want in MS Excel, but the zooming and scrolling needs to be done by repeatedly changing the X-axis scale, a bit cumbersome.

Same applies to gnuplot, need to generate a new plot for each change in the axis.

I imagine there must be something for analog signals that behaves like the waveform viewer that comes with Mentor Modelsim. Real easy and fast to go through your data in that one. Just found out that it can in fact display a VHDL vector as an analog signal. If I could somehow load my data, but what's the fileformat? I could translate my data to a VHDL testbench source and than simulate that, but there must be an easier option to just view a bit of data. ;-)

--
Stef    (remove caps, dashes and .invalid from e-mail address to reply by mail)
Reply to
Stef

Not really. See "help mouse".

Reply to
Hans-Bernhard Bröker

Hey! You _can_ zoom with the mouse, never knew that, thanks. Got gnuplot to run Terminal type set to 'unknown'

While linux finds an X11 terminal and works great. Zoom in with the mouse (right click!) and back with 'p' or 'u'.

But why bother with the cygwin version if you can download de W32 version from the gnuplot homepage? ;-) That also works great so I'm happy for now.

--
Stef    (remove caps, dashes and .invalid from e-mail address to reply by mail)
Reply to
Stef

I wrote a program that reads analog data (of 60 Hz current) at 2400 samples per second through a serial port at 57.6 kbps. It displays the relative value on a bar graph, and actual RMS current during operation, and it displays up to 5 pulses of current with various on and off times. After the test sequence, the waveform can be displayed, expanded and contracted, and there are two cursors which can be placed at any two points in time, and the true RMS value of the signal between them is displayed. The waveform can be saved in a file with a fairly simple format of a short header, and integer values for the remaining data. It can be adapted to your sampling rate.

It is also possible to read these saved waveform files into the program, and play them back in simulated real time, and use the waveform viewer to zoom in and analyze the waveform.

It is available for free download at

formatting link
and the zipfile has a detailed help file that describes the waveform file. I also have an old MSDOS utility that can convert the proprietary waveform file (.owf) to a standard RIFF format (.wav) that can be played on media player or tweaked with audio tools like GoldWave. However, my bursts of 60 Hz are rather boring and annoying to listen to.

If this program might be of some use, I could send you some of the source files (in Borland Delphi) if you need to modify it for your purposes.

Paul

Reply to
Paul E. Schoen

[...]

Sounds like very nice software, also nice waveform pic in the manual. But it looks like it's highly specific to the original task it was created for. So adapting it might be a big job and my Delphi skills are non existant. I have used Borland C++ builder and did some Pascal way back. Thanks for the offer, but at the moment gnuplot looks looks like my best option.

--
Stef    (remove caps, dashes and .invalid from e-mail address to reply by mail)
Reply to
Stef

To the O.P.:

Even though I originally suggested 'gnuplot' I would be remiss to not mention using the vt100 graphics character set of a display terminal (or emulation) to display waveform data. I run an 'ascii oscilloscope' which provides the basic features of waveform display including scale factor, position controls, reticule, sweep rate, triggering, etc. and the displayed waveform has good fidelity on a 24 X 80 character screen and adequate refresh rates at serial port speeds above

9600 baud.

I reiterate also the additional solution of using the tek4014 graphics primitives if your terminal emulator supports them.

All this presumes the need for realtime display; if your requirement is only for data reduction and offline display than 'gnuplot' should suffice.

Regards,

Michael

Reply to
msg

... snip ...

_- and | can implement a 48 x 80 display on a 24 x 80 field. = and

  • may also be useful.
--
 Chuck F (cbfalconer at maineline dot net)
   Available for consulting/temporary embedded and systems.
Reply to
CBFalconer

Here a very simple piece of C code which I use to display ADC data read from an Atmel Tiny45 by a two wire interface using the parallel port. You can download Visual C++ from Microsoft.

#define _CRT_SECURE_NO_DEPRECATE 1 #define debug 1 #ifdef debug #include #include #include #include #endif

#include #include #include #include

#define pi 3.1415927 #define size 10000 /**************************************************************************/ HDC globalhdc; HWND windowhandle; HPEN greenpen,bluepen,redpen,blackpen,black5pen,whitepen,oldpen; HFONT newfont,oldfont; int xpos=100,ypos=100,xsize=1000,ysize=750,xold,yold,ldown,rdown,nmax=10; int start=0, zoom=1; zoom0=3; zoom1[7]={-10,-5,-2,1,2,5,10}; int loop=0; double a[110]={0.0, 1.0}, b[110]={0.0, 0.5}, r[805]; int adc0[size+10],adc1[size+10],adc2[size+10],adc3[size+10]; FILE *save; char fname[7]={'s','a','v','e','.','a',0}; /**************************************************************************/

#ifdef debug void init_stdout() {int hCrt; FILE *hf;

AllocConsole(); hCrt = _open_osfhandle((long)GetStdHandle(STD_OUTPUT_HANDLE),_O_TEXT); hf = _fdopen( hCrt, "w" ); *stdout = *hf; setvbuf( stdout, NULL, _IONBF, 0 ); printf("stdout is working!!!\n");

hCrt = _open_osfhandle((long)GetStdHandle(STD_INPUT_HANDLE),_O_TEXT); hf = _fdopen( hCrt, "r" ); *stdin = *hf; setvbuf( stdin, NULL, _IONBF, 0 );

printf("print a character followed by a to test stdin: "); /* printf("\nYou typed: %c\n",getchar()); */ } #endif

void read_dat(int max) {int i,j,n,clock=0,data[5];

Rectangle(globalhdc,0,0,1000,750); SelectObject(globalhdc,redpen); MoveToEx(globalhdc,0,240,NULL);

_outp(0x378,clock); /* reset clock */ if (max>10000) max=10000; for (n=0; n

Reply to
Herbert Kleebauer

Thanks for that, saved it as an example for whenever I need to do some graphics using VC++. But for the current application, I will stay with gnuplot. It really worked well on my first day of real use. I prepared a little command file for it, so creating the graphs is a matter of seconds now.

--
Stef    (remove caps, dashes and .invalid from e-mail address to reply by mail)
Reply to
Stef

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.