plot an analog signal waveform-VBForums

# Thread: plot an analog signal waveform

1. ## plot an analog signal waveform

Hello guys !!
i would like to know how to plot a signal waveform of 5 variables (5 sensors data aquisition )
i'm using serialport to read data and display them in textboxs
plot xy signal (variation of each sensor data in function of time )

2. ## Re: plot an analog signal waveform

This isn't really a math question. This forum is meant for solving mathematical problems, not for implementing things in code. I suggest you re-post your question in a more appropriate forum for the language you are coding in.

Also, when you do post again, I strongly suggest you add a LOT more detail in the description of your problem: what graphing utility you are using, maybe a sketch of what you want the output to look like, a better description of what the input looks like, etc.

Good luck

3. ## Re: plot an analog signal waveform

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim x As Integer
Dim y As Integer
Dim blackPen As New Pen(Color.Black, 3)
Dim g As Graphics

g = PictureBox1.CreateGraphics

For r As Double = 0 To 400
y = cdbl(textbox1.text)
x = r

g.DrawLine(blackPen, CType(x, Single), CType(y, Single), CType(x, Single) + 1, CType(y, Single))

Next r
End Sub

i got an error says invalid conversion from string to double
how to do ?

4. ## Re: plot an analog signal waveform

? no answer seems to be a bit strange !!

5. ## Re: plot an analog signal waveform

Lenggries already gave you a response: your question is too vague and this is not the right forum to post it in anyway. Post #3 suffers from the same issues. Lenggries' response was remarkably polite, but it doesn't seem to have gotten through since you've completely ignored it, so I'll drop the politeness.

Everything you have done in this thread shows you to be ignorant, needy, and incompetent. Your code in post #3 is remarkably terrible considering its length: there are at least half a dozen mistakes in it. You need to improve your basic coding and question asking skills before anyone will be interested in helping you.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

Featured