An oscilloscope in VB

 

In automation problems one of the most important requirement is the signal and states representation. For the analog signals the oscilloscope (analog or digital) is the preferred solution.
How to show our A/D acquisitions on the screen of a PC?
The screen refresh is the problem.
With the Windows API <GDI32> and the <BitBlt> method is simple store and shift the video memory realizing the oscilloscope traces update.
The applied solution is:

 

This kind of solution is valid for slow signals (max 500Hz).

 

Bibliography Use Windows BitBlt Function in Visual Basic Application

MSKB

Download oscilloscope.zip Source code VB 5KByte