Jump to content

Please guide me to acquire data from multi-serial ports


Recommended Posts

Hi,

 

I have a project to get the sensor data from 4-5 serial ports in order to plot the data to waveform graph as real-time as possible.

 

Right now, I have already got the data from one serial port and plot them on waveform graph and it works well,  but I have no idea to get the data from more than one port.

 

Any suggestion please help.

Thank you in advance.

 

PS. Sorry for my bad English.   :P

Link to comment

I'm not exactly sure where you're having the trouble. There are a lot of ways to do this.

 

I'd say you should first take a look at how to use Multiple Plot graphs and charts (in the detailed help of the Chart control). There are example VIs with these.

 

Now you should be able to use the code that you already have to read from 1 serial port in a For Loop (each iteration of the for loop will read from a different serial port) to acquire all of your data.

 

Now you just need to put the two together.

  • Like 1
Link to comment

I'm not exactly sure where you're having the trouble. There are a lot of ways to do this.

 

I'd say you should first take a look at how to use Multiple Plot graphs and charts (in the detailed help of the Chart control). There are example VIs with these.

 

Now you should be able to use the code that you already have to read from 1 serial port in a For Loop (each iteration of the for loop will read from a different serial port) to acquire all of your data.

 

Now you just need to put the two together.

 

Thank you for your replied, QueueYueue.

Well, I have just no idea about how to get the data from more serial ports.

 

So refer to your reply,  I just change the COM port# to get data from another port in the loop accordingly right?

 

Shall I have to close the previous port before get to another port in the row?

 

Thank you again.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.