EmbeddedRelated.com
Forums
Memfault State of IoT Report

waveform display in browser

Started by John Larkin July 23, 2015

I'm designing a tachometer box and it will have a web page interface
as one way to talk to it. I thought it would be cool to include an ADC
so we could display waveforms, too. My software guys here are mostly
embedded types so we don't know a lot about Javascript and such. I did
a little searching and mostly found things for displaying audio
envelope cartoons; I want a real oscilloscope-looking thing, so users
can see what happens as they change gains and filtering and trigger
level settings. Dual trace would be nice, the analog waveform and
corresponding comparator outputs.

Has anybody done this? We'd consider getting outside help, either
advice or actual coding.

I assume our box will, through some port, deliver HTML, Javascript,
and maybe some zipped JS libraries to the browser. And the company
logo of course. The browser will send us text strings to parse if the
user wants to change parameters or such. We would also deliver blocks
of waveform data on request. That's my PHB perspective on things; I'm
just the hardware designer.


-- 

John Larkin         Highland Technology, Inc
picosecond timing   precision measurement 

jlarkin att highlandtechnology dott com
http://www.highlandtechnology.com

On 2015-07-23 11:18 AM, John Larkin wrote:
> > > I'm designing a tachometer box and it will have a web page interface > as one way to talk to it. I thought it would be cool to include an ADC > so we could display waveforms, too. My software guys here are mostly > embedded types so we don't know a lot about Javascript and such. I did > a little searching and mostly found things for displaying audio > envelope cartoons; I want a real oscilloscope-looking thing, so users > can see what happens as they change gains and filtering and trigger > level settings. Dual trace would be nice, the analog waveform and > corresponding comparator outputs. > > Has anybody done this? We'd consider getting outside help, either > advice or actual coding. > > I assume our box will, through some port, deliver HTML, Javascript, > and maybe some zipped JS libraries to the browser. And the company > logo of course. The browser will send us text strings to parse if the > user wants to change parameters or such. We would also deliver blocks > of waveform data on request. That's my PHB perspective on things; I'm > just the hardware designer. >
An easy method for non-programmer types is this: http://azeotech.com/j/index.php Comes in various flavors from free to full bore. A "Shazam!" reaction at a client happened when they found their company logo integrated into the control screen which was no more effort than copy-paste. -- Regards, Joerg http://www.analogconsultants.com/
On 7/23/2015 2:18 PM, John Larkin wrote:
> > > I'm designing a tachometer box and it will have a web page interface > as one way to talk to it. I thought it would be cool to include an ADC > so we could display waveforms, too. My software guys here are mostly > embedded types so we don't know a lot about Javascript and such. I did > a little searching and mostly found things for displaying audio > envelope cartoons; I want a real oscilloscope-looking thing, so users > can see what happens as they change gains and filtering and trigger > level settings. Dual trace would be nice, the analog waveform and > corresponding comparator outputs. > > Has anybody done this? We'd consider getting outside help, either > advice or actual coding. > > I assume our box will, through some port, deliver HTML, Javascript, > and maybe some zipped JS libraries to the browser. And the company > logo of course. The browser will send us text strings to parse if the > user wants to change parameters or such. We would also deliver blocks > of waveform data on request. That's my PHB perspective on things; I'm > just the hardware designer. > >
One approach is a CGI script that runs gnuplot under the covers. IIRC quite a few folks do that. (I'm a static HTML guy myself.) Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
On 7/23/2015 4:34 PM, Phil Hobbs wrote:
> On 7/23/2015 2:18 PM, John Larkin wrote: >> >> >> I'm designing a tachometer box and it will have a web page interface >> as one way to talk to it. I thought it would be cool to include an ADC >> so we could display waveforms, too. My software guys here are mostly >> embedded types so we don't know a lot about Javascript and such. I did >> a little searching and mostly found things for displaying audio >> envelope cartoons; I want a real oscilloscope-looking thing, so users >> can see what happens as they change gains and filtering and trigger >> level settings. Dual trace would be nice, the analog waveform and >> corresponding comparator outputs. >> >> Has anybody done this? We'd consider getting outside help, either >> advice or actual coding. >> >> I assume our box will, through some port, deliver HTML, Javascript, >> and maybe some zipped JS libraries to the browser. And the company >> logo of course. The browser will send us text strings to parse if the >> user wants to change parameters or such. We would also deliver blocks >> of waveform data on request. That's my PHB perspective on things; I'm >> just the hardware designer. >> >> > One approach is a CGI script that runs gnuplot under the covers. IIRC > quite a few folks do that. (I'm a static HTML guy myself.)
Isn't there an actual oscilloscope display package under Linux? It should be fairly straightforward to drive that from an internet connection. I guess requiring the customer to installing such a package is not preferred. -- Rick
On 23.7.2015 г. 23:49, rickman wrote:
> On 7/23/2015 4:34 PM, Phil Hobbs wrote: >> On 7/23/2015 2:18 PM, John Larkin wrote: >>> >>> >>> I'm designing a tachometer box and it will have a web page interface >>> as one way to talk to it. I thought it would be cool to include an ADC >>> so we could display waveforms, too. My software guys here are mostly >>> embedded types so we don't know a lot about Javascript and such. I did >>> a little searching and mostly found things for displaying audio >>> envelope cartoons; I want a real oscilloscope-looking thing, so users >>> can see what happens as they change gains and filtering and trigger >>> level settings. Dual trace would be nice, the analog waveform and >>> corresponding comparator outputs. >>> >>> Has anybody done this? We'd consider getting outside help, either >>> advice or actual coding. >>> >>> I assume our box will, through some port, deliver HTML, Javascript, >>> and maybe some zipped JS libraries to the browser. And the company >>> logo of course. The browser will send us text strings to parse if the >>> user wants to change parameters or such. We would also deliver blocks >>> of waveform data on request. That's my PHB perspective on things; I'm >>> just the hardware designer. >>> >>> >> One approach is a CGI script that runs gnuplot under the covers. IIRC >> quite a few folks do that. (I'm a static HTML guy myself.) > > Isn't there an actual oscilloscope display package under Linux? It > should be fairly straightforward to drive that from an internet > connection. I guess requiring the customer to installing such a package > is not preferred. >
He is after a browser plugin - something like VNC, the way I do it on our spectrometers (I do not use a plugin but I could if I wanted to). However this implies a fullblown RFB connection to a stand alone system having its display and GUI locally (within his oscilloscope thing) which is far from being trivial. Dimiter ------------------------------------------------------ Dimiter Popoff, TGI http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/
On 7/23/2015 5:13 PM, Dimiter_Popoff wrote:
> On 23.7.2015 г. 23:49, rickman wrote: >> On 7/23/2015 4:34 PM, Phil Hobbs wrote: >>> On 7/23/2015 2:18 PM, John Larkin wrote: >>>> >>>> >>>> I'm designing a tachometer box and it will have a web page interface >>>> as one way to talk to it. I thought it would be cool to include an ADC >>>> so we could display waveforms, too. My software guys here are mostly >>>> embedded types so we don't know a lot about Javascript and such. I did >>>> a little searching and mostly found things for displaying audio >>>> envelope cartoons; I want a real oscilloscope-looking thing, so users >>>> can see what happens as they change gains and filtering and trigger >>>> level settings. Dual trace would be nice, the analog waveform and >>>> corresponding comparator outputs. >>>> >>>> Has anybody done this? We'd consider getting outside help, either >>>> advice or actual coding. >>>> >>>> I assume our box will, through some port, deliver HTML, Javascript, >>>> and maybe some zipped JS libraries to the browser. And the company >>>> logo of course. The browser will send us text strings to parse if the >>>> user wants to change parameters or such. We would also deliver blocks >>>> of waveform data on request. That's my PHB perspective on things; I'm >>>> just the hardware designer. >>>> >>>> >>> One approach is a CGI script that runs gnuplot under the covers. IIRC >>> quite a few folks do that. (I'm a static HTML guy myself.) >> >> Isn't there an actual oscilloscope display package under Linux? It >> should be fairly straightforward to drive that from an internet >> connection. I guess requiring the customer to installing such a package >> is not preferred. >> > > He is after a browser plugin - something like VNC, the way I do it > on our spectrometers (I do not use a plugin but I could if I wanted to). > > However this implies a fullblown RFB connection to a stand alone > system having its display and GUI locally (within his oscilloscope > thing) which is far from being trivial.
Yeah, I get what he is after, but there is more than one way to skin a cat. Another would be to allow a remote desktop connection. Then no software of any kind is needed for the client other than the RDP app. Still more work on the client end but installing a canned app isn't that hard. Browser based apps can be work to get running on multiple browsers and keep running with browser updates. A friend is in that line of work and there is *soooooo* much work keeping all the different versions working. -- Rick
On Fri, 24 Jul 2015 00:13:19 +0300, Dimiter_Popoff <dp@tgi-sci.com>
wrote:

>On 23.7.2015 ?. 23:49, rickman wrote: >> On 7/23/2015 4:34 PM, Phil Hobbs wrote: >>> On 7/23/2015 2:18 PM, John Larkin wrote: >>>> >>>> >>>> I'm designing a tachometer box and it will have a web page interface >>>> as one way to talk to it. I thought it would be cool to include an ADC >>>> so we could display waveforms, too. My software guys here are mostly >>>> embedded types so we don't know a lot about Javascript and such. I did >>>> a little searching and mostly found things for displaying audio >>>> envelope cartoons; I want a real oscilloscope-looking thing, so users >>>> can see what happens as they change gains and filtering and trigger >>>> level settings. Dual trace would be nice, the analog waveform and >>>> corresponding comparator outputs. >>>> >>>> Has anybody done this? We'd consider getting outside help, either >>>> advice or actual coding. >>>> >>>> I assume our box will, through some port, deliver HTML, Javascript, >>>> and maybe some zipped JS libraries to the browser. And the company >>>> logo of course. The browser will send us text strings to parse if the >>>> user wants to change parameters or such. We would also deliver blocks >>>> of waveform data on request. That's my PHB perspective on things; I'm >>>> just the hardware designer. >>>> >>>> >>> One approach is a CGI script that runs gnuplot under the covers. IIRC >>> quite a few folks do that. (I'm a static HTML guy myself.) >> >> Isn't there an actual oscilloscope display package under Linux? It >> should be fairly straightforward to drive that from an internet >> connection. I guess requiring the customer to installing such a package >> is not preferred. >> > >He is after a browser plugin - something like VNC, the way I do it >on our spectrometers (I do not use a plugin but I could if I wanted to).
Actually, I don't want a plugin, just a way for the browser to display a waveform, using some javascript. We can store any reasonable zipped javascript libraries in our gadget and deliver them to the browser.
> >However this implies a fullblown RFB connection to a stand alone >system having its display and GUI locally (within his oscilloscope >thing) which is far from being trivial.
The tach box will have no display or GUI, and in fact no official OS. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On 24.7.2015 &#1075;. 00:50, John Larkin wrote:
> On Fri, 24 Jul 2015 00:13:19 +0300, Dimiter_Popoff <dp@tgi-sci.com> > wrote: > >> On 23.7.2015 ?. 23:49, rickman wrote: >>> On 7/23/2015 4:34 PM, Phil Hobbs wrote: >>>> On 7/23/2015 2:18 PM, John Larkin wrote: >>>>> >>>>> >>>>> I'm designing a tachometer box and it will have a web page interface >>>>> as one way to talk to it. I thought it would be cool to include an ADC >>>>> so we could display waveforms, too. My software guys here are mostly >>>>> embedded types so we don't know a lot about Javascript and such. I did >>>>> a little searching and mostly found things for displaying audio >>>>> envelope cartoons; I want a real oscilloscope-looking thing, so users >>>>> can see what happens as they change gains and filtering and trigger >>>>> level settings. Dual trace would be nice, the analog waveform and >>>>> corresponding comparator outputs. >>>>> >>>>> Has anybody done this? We'd consider getting outside help, either >>>>> advice or actual coding. >>>>> >>>>> I assume our box will, through some port, deliver HTML, Javascript, >>>>> and maybe some zipped JS libraries to the browser. And the company >>>>> logo of course. The browser will send us text strings to parse if the >>>>> user wants to change parameters or such. We would also deliver blocks >>>>> of waveform data on request. That's my PHB perspective on things; I'm >>>>> just the hardware designer. >>>>> >>>>> >>>> One approach is a CGI script that runs gnuplot under the covers. IIRC >>>> quite a few folks do that. (I'm a static HTML guy myself.) >>> >>> Isn't there an actual oscilloscope display package under Linux? It >>> should be fairly straightforward to drive that from an internet >>> connection. I guess requiring the customer to installing such a package >>> is not preferred. >>> >> >> He is after a browser plugin - something like VNC, the way I do it >> on our spectrometers (I do not use a plugin but I could if I wanted to). > > Actually, I don't want a plugin, just a way for the browser to display > a waveform, using some javascript. We can store any reasonable zipped > javascript libraries in our gadget and deliver them to the browser.
I am not sure I have seen that done for live graphics - then scaling, perhaps autoranging etc., even if doable it would be a massive pain to support with all browsers as they keep on evolving. Your best bet might be to produce locally a .gif (or .png or whatever) bitmap, maintain it live and persuade the browser to refresh it regularly. Don't know how the latter is to be done though.
>> >> However this implies a fullblown RFB connection to a stand alone >> system having its display and GUI locally (within his oscilloscope >> thing) which is far from being trivial. > > The tach box will have no display or GUI, and in fact no official OS. >
Not having a display is not a problem, some of our spectrometers do not have one, they just maintain the display bitmap in system memory - which is viewed via RFB (VNC)(RDP which Rick suggested is very similar, same thing really but over a non-public protocol). Not having an OS - nor a VNC server nor the image to be displayed - obviously makes this impractical in your case. Dimiter ------------------------------------------------------ Dimiter Popoff, TGI http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/
On Fri, 24 Jul 2015 01:19:09 +0300, Dimiter_Popoff <dp@tgi-sci.com>
wrote:

>On 24.7.2015 ?. 00:50, John Larkin wrote: >> On Fri, 24 Jul 2015 00:13:19 +0300, Dimiter_Popoff <dp@tgi-sci.com> >> wrote: >> >>> On 23.7.2015 ?. 23:49, rickman wrote: >>>> On 7/23/2015 4:34 PM, Phil Hobbs wrote: >>>>> On 7/23/2015 2:18 PM, John Larkin wrote: >>>>>> >>>>>> >>>>>> I'm designing a tachometer box and it will have a web page interface >>>>>> as one way to talk to it. I thought it would be cool to include an ADC >>>>>> so we could display waveforms, too. My software guys here are mostly >>>>>> embedded types so we don't know a lot about Javascript and such. I did >>>>>> a little searching and mostly found things for displaying audio >>>>>> envelope cartoons; I want a real oscilloscope-looking thing, so users >>>>>> can see what happens as they change gains and filtering and trigger >>>>>> level settings. Dual trace would be nice, the analog waveform and >>>>>> corresponding comparator outputs. >>>>>> >>>>>> Has anybody done this? We'd consider getting outside help, either >>>>>> advice or actual coding. >>>>>> >>>>>> I assume our box will, through some port, deliver HTML, Javascript, >>>>>> and maybe some zipped JS libraries to the browser. And the company >>>>>> logo of course. The browser will send us text strings to parse if the >>>>>> user wants to change parameters or such. We would also deliver blocks >>>>>> of waveform data on request. That's my PHB perspective on things; I'm >>>>>> just the hardware designer. >>>>>> >>>>>> >>>>> One approach is a CGI script that runs gnuplot under the covers. IIRC >>>>> quite a few folks do that. (I'm a static HTML guy myself.) >>>> >>>> Isn't there an actual oscilloscope display package under Linux? It >>>> should be fairly straightforward to drive that from an internet >>>> connection. I guess requiring the customer to installing such a package >>>> is not preferred. >>>> >>> >>> He is after a browser plugin - something like VNC, the way I do it >>> on our spectrometers (I do not use a plugin but I could if I wanted to). >> >> Actually, I don't want a plugin, just a way for the browser to display >> a waveform, using some javascript. We can store any reasonable zipped >> javascript libraries in our gadget and deliver them to the browser. > >I am not sure I have seen that done for live graphics - then scaling, >perhaps autoranging etc., even if doable it would be a massive pain >to support with all browsers as they keep on evolving. >Your best bet might be to produce locally a .gif (or .png or >whatever) bitmap, maintain it live and persuade the browser to refresh >it regularly. Don't know how the latter is to be done though.
We could do that in the FPGA! If nobody murders me for suggesting it. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On 23 Jul 2015 21:37:49 GMT, Jasen Betts <jasen@xnet.co.nz> wrote:

>On 2015-07-23, John Larkin <jlarkin@highlandtechnology.com> wrote: >> >> >> I'm designing a tachometer box and it will have a web page interface >> as one way to talk to it. I thought it would be cool to include an ADC >> so we could display waveforms, too. My software guys here are mostly >> embedded types so we don't know a lot about Javascript and such. I did >> a little searching and mostly found things for displaying audio >> envelope cartoons; I want a real oscilloscope-looking thing, so users >> can see what happens as they change gains and filtering and trigger >> level settings. Dual trace would be nice, the analog waveform and >> corresponding comparator outputs. >> >> Has anybody done this? > >I've used a JS graphing package called "flot" that could probably be >modified to display scrolling or static waveforms. I think it's based >on HTML5 canvas and/or SVG DOM. I made some small tweaks and found it >to be well written.
Lasse also suggested flot. That looks promising. Wanna help? -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

Memfault State of IoT Report