Hi all,

i'm here for asking some opinion about:

I would see a value that change in time in a oscilloscope window.
If i do this in scope for example in VB with using a 2D array (X,Y) of points it work very slow, just for graphic and calculation reasons (VB).

Could it be a good idea make this little Scope control in asm ?
I could do that it update every X msac automatically.

The problem is that an application should be able to pass the channel Y-value to my asm-scope. Is it possible ? Could it work fine or is better use one of the already done VB objects :( ?


tanks :) B7
Posted on 2002-01-17 00:55:52 by Bit7
You lost me with your last thought..

But if your sugesting a "Digital Scope" for applications only? I say it would be an interesting project. Expecially if you can keep the control as simple as Vkim had done with his Debug.inc window. However, with alot of applications, values dont change all to linearly or even in a "patternistic" sorta way, so you might just end up with alot of static ~ dicretized points within a DWORD.

If your thinking of electronics, then its also a good project to do, but there is hardware issues to consider first. Mainly the bandwidth of the Analog->Digital converter needed to discretize measurements. Good one can cost a significant chunk of money. But this is only one stage. As well, if your making a windows app, your "data" will not smoothly get into windows' memory thu a port without a home grown driver (not a very fun). You could however use the AsmIo or what ever its called, and provide some cheap memory systems to buffer in external hardware data while waiting for window's attention again (needs only to be long enough to compensate for the OS lag time). But, if you get this far your laughing, as you will now have it inside the magical windows world to play with :)

Never looked into TWAIN either, but perhaps there is a generic driver in this package to alow such control? I know when i scan stuff, the entire OS "stops" while data is being retrieved.

Ah well, my few thoughts...
NaN
Posted on 2002-01-17 01:20:53 by NaN
Hi Bit 7

Are you talking about a storage or real time scope. In the dos days I did design and build a 4 channel storage scope with 4Mb memory and 5 MHz sample reate. The 4 channels were 90 degrees out of phase so the scope could be wired to 1 channel 20 MHz sample rate. The software to controle it was in tasm. With todays fast machines a storage scope controled by VB should be fast enough. With real time scope you would still have limitted sample rate i guess, and you need to redraw the entire trace.

KetilO
Posted on 2002-01-17 01:34:13 by KetilO
thanks for your toughts !

What i was thinking, that's what i need now, was just a Virtual Scope, just to display an array of stored points as in a Oscilloscope, just shifting them left or right every X msec.

Just something more cool that a simple graphic.

More that a oscilloscope, maybe what i need is to represent a value that change in time, but not very fast (example a Tempearture changing in some minutes), something like a pen that write in a moving sheet.

Than, with an A/D board like CVI or other less cheap, i could always pass the values, but i know that all these board have their scope objects.

I would like to try, just for fun.

Will be my next ASM32 project !

Many tHanks !
Posted on 2002-01-17 01:42:45 by Bit7

In the dos days I did design and build a 4 channel storage scope with 4Mb memory and 5 MHz sample reate. The 4 channels were 90 degrees out of phase so the scope could be wired to 1 channel 20 MHz sample rate.


Hi,
BTW: do you know of any *cheap* PCI board with 1 channel 8 bit 5MHz ADC/DAC and some FIFO buffering, for video-like (not video though) signals?

Thanks,
Maverick
Posted on 2002-01-17 07:25:50 by Maverick
I don't know about fifo, but your specs are surpassed by every audio board on the market. They are the cheapest sampling devices on the market...

'Bye, Kefren
Posted on 2002-01-17 09:44:42 by kefren
I Bet some day you going to have a project that will be used in REAL life for future Out of Space Exploreing.

DEEP
Posted on 2002-01-17 10:29:08 by cmax
Hi-

Well, Dunna if you'd used Microcontrollers, but uptoday there are a lot of powerfull on the market. Cost about $2 to $4, they has an ADC, and can be attach to your PC via Ports.

You can use microcontrollers, to capture you Anolog signals, convert into digital and send these data to your PC using your COMx Port or LPTx. These Microcontrollers Includes an UART (Universal Asyncronous Recibe and Transmit). Then, you can interpreting in your ASM program in Scope Mimic!.

If these data will changing fast, the better is to direct draw in the monitor. You can control with very nice Imaginery

For Slow Data changes, may be will be easiest to do it by Progress Bar... -

any way....
Posted on 2002-01-17 11:25:54 by Caraveiro
Bit7- What i was thinking, that's what i need now, was just a Virtual Scope, just to display an array of stored points as in a Oscilloscope, just shifting them left or right every X msec.

This isn't too hard, there are two ways, the easy but slower way is to have an array of POINTS which is just a 2 dword struct containing x and y coords.

Each frame you render this with the polyline GDI function, then you have a loop which moves all the structs down one, ie starts at offset 8 into the array and moves that to 0. Finally you add in a new coord at the end.

The harder but faster method is to have an array of Y values only and write your own drawing function to draw each point. You should also use a variable to store a starting location into the array, this is where the drawing function would start. Upon reaching the end of the array it would wrap around to the start.

Every frame after drawing you add a new Y value at the pointer and increment the pointer, also wrapping this around to the start of the array upon reaching the end.
Posted on 2002-01-17 11:33:55 by Eóin

I don't know about fifo, but your specs are surpassed by every audio board on the market. They are the cheapest sampling devices on the market...

'Bye, Kefren



5MHz? :grin:
Posted on 2002-01-17 16:14:11 by Maverick
Check out National Instruments or Computerboards (now somw other name), add the traditional dot com to get websites.

Both are keen in 'virtual measurments,' using extra boards on the PC to take measurements.

All a digital scope is is a fast A to D, some scaling electronics, and memory and display. The PC can take care of the last two functions by itself.
Posted on 2002-01-17 23:31:03 by Ernie
hi,

i thought you could find my sine wave program useful. it displays a wave that moves. you can change the wave length, the amplitude and some other stuff of the wave. it uses PolyLine to connect the points in calculates with a line. you can download the program from my homepage: http://noperator.de.vu

Enjoy it!

Bye,
NOP
Posted on 2002-01-18 02:20:51 by NOP-erator
nop-erator, thanks for the example, i would do something like that.

Eoin, i will follow your array/poliline concept.
What i would like to do is something like an Asm Scope Object. But the difficult thing (couse i don't know ;() will be to pass the point of the array every X msec from an app. for example a VB app to the AsmScope Object.

There should be a way to share some variable, make them visible and writable from a VB app ......
Posted on 2002-01-18 14:17:31 by Bit7
If you're planning on true data acquisition, the quality and usefullness of your program will be dictated by the quality and usefulness of your data acquisition hardware.

To get the fastest data you will most likely have to go with an internal board, which is expensive (for a quality board) and is further limited by the quality of the drivers supplied with the board, unless of course, you write your own. I've never done this, but I've seen enough of the documentation to surmise that it would be a pain in the most unpleasant of places.

The other route would be an external solution in which you could purchase microcontrollers (www.microchip.com) with on-board A/D converters. These are limited to 10 bit resolution (I believe) and further compounded by the fact that you will need to build your own hardware and firmware. Also, without on-board memory for your microcontoller, these are useless for fast data collection as you will be limited to the bandwidth of your connection with the device (most commonly RS232 comport or parallel lpt port). You can also purchase a separate A/D converter chip (check AnalogDevices) for increased resolution and acquisition speed, but you will still be limited to the communication speed of your selected interface (RS232 or parallel). USB may be a viable alternative, but I am sorry to say I know little of it at the moment.

My company is in the business of data acquisition, and we have done a lot of what you're trying to do. Most of it was done in VB (I know, I know, save it for the Crusades :), though the driver for the internal board did not co-operate with VB in a very nice way, so we used a C++ DLL that behaved nicely to interface to their driver. We've used both internal, purchased DAQ boards and made our own external ones. I'm new to assembly myself (except for MPASM, which is directed at Microchips line of microcontrollers), so I probably couldn't help there, but if I can assist elsewhere, please let me know. I'd be greatly interested in learning about this with you.
Posted on 2002-01-20 10:59:52 by Cygnal