Jump to content

Splitting array data


Recommended Posts

Hello

I’m new to LabVIEW and was hoping someone could help. I am sorry in advance if I ask basic questions but please keep in mind I am new however am willing to learn.

I am trying to send data from serial port and trying to plot the data, however the data comes as an array of three values at a time. I want to learn how to split the array of three to each individual values. The reason being, I would like to plot each value on a graph that plots the incoming values against time. The data would be fed continuously with different values each second.

Hope it made sense

Edited by AndrewRae
Link to comment

Or is there a way to assign the variable from the serial to the graph for example if the data is:
A=23
B=24
C=25

Is there a way to plot a graph that will only plot the data that comes with the name A against time and as every second new data is received A will be automatically plotted within a graph with only A data.

I would like to have three graphs A, B and C.

 

Hope that made sense

Edited by AndrewRae
Link to comment

Hi Andrew,

 

With reference to your first post, you can use the index array function to get the individual elements out of the array.

 

post-25191-0-77297500-1398424943.png

 

Are you able to control the format of the data from the serial port?

 

Could you provide the a sample of the exact data the is read from the serial port? That would help in working out how to split it into the three graphs.

 

Greg

Edited by GregPayne
Link to comment

Hello

I’m new to LabVIEW and was hoping someone could help. I am sorry in advance if I ask basic questions but please keep in mind I am new however am willing to learn.

I am trying to send data from serial port and trying to plot the data, however the data comes as an array of three values at a time. I want to learn how to split the array of three to each individual values. The reason being, I would like to plot each value on a graph that plots the incoming values against time. The data would be fed continuously with different values each second.

Hope it made sense

 

I guess you are using a WfmChart and try to plot the array values in the chart as they arrive?

 

A 1D-array fed into a WfmChart will update one plot with three new values.

But, if you just add a build array on the 1D array, data will be plotted in three individual traces.

 

post-5958-0-73270900-1398423684_thumb.pn

 

/J

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.