Jump to content

real-time data acquisition through serial port using labview


shmb

Recommended Posts

hello everybody,

I am trying to connect my device through serial port and then get the waveform real-time. I have written a program but the problem is that the graph is an straight line with zero amplitude that sometimes show up which is not desired one.Could you please somebody help me and check the attached vi. I really need your help. Thanks in advance.

post-27619-0-19489700-1345469034_thumb.p

Link to comment

hello everybody,

I am trying to connect my device through serial port and then get the waveform real-time. I have written a program but the problem is that the graph is an straight line with zero amplitude that sometimes show up which is not desired one.Could you please somebody help me and check the attached vi. I really need your help. Thanks in advance.

Couple things. First there's no reason to re-init and close the serial port every time the loop runs. Init the serial port before the while loop, then close it when the loop has finished executing (you pressed the stop button).

The reason you are getting zero data, is because you are updating the waveform chart, outside the case structure. This means even when there is no data on the serial port it will add data to the chart. Move the chart to inside the True case, where you are reading, then the chart won't be updated if there is no data to read.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.