shmb Posted August 20, 2012 Report Share Posted August 20, 2012 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. Quote Link to comment
hooovahh Posted August 20, 2012 Report Share Posted August 20, 2012 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.