Jump to content

GPIB string to Graph


acperrella

Recommended Posts

Hello,

This is stumping me and I'm sure it is becuase I don't really have a grasp on what the different formats are.

Basically I have a string of Data coming in from a GPIB device. The comma seperated data can be of arbitrary length and is of the form:

x1,y1,x2,y2,........

which I can read just fine.

I'd like to make that into a cluster so I can plot it on an XY graph.

What I tried to do is use "spreadsheet string to array" to make a 2D array, then index array to pull out row 0 and row 1, then use the bundle command to create an xy cluster.

Any ideas? Is it possible that some of the data in the form 1.000e-4 or similar is causing a problem?

Thanks,

Andrew

Link to comment
Hello,

This is stumping me and I'm sure it is becuase I don't really have a grasp on what the different formats are.

Basically I have a string of Data coming in from a GPIB device. The comma seperated data can be of arbitrary length and is of the form:

x1,y1,x2,y2,........

which I can read just fine.

I'd like to make that into a cluster so I can plot it on an XY graph.

What I tried to do is use "spreadsheet string to array" to make a 2D array, then index array to pull out row 0 and row 1, then use the bundle command to create an xy cluster.

Any ideas? Is it possible that some of the data in the form 1.000e-4 or similar is causing a problem?

Thanks,

Andrew

OK, "spreadsheet string to array" can't be used since there is no EOL in the data. Another approach is needed.

I'm going to try and brute force this with a for loop, but there seems like there should be an easier way.

-Andrew

Link to comment
OK, "spreadsheet string to array" can't be used since there is no EOL in the data. Another approach is needed.

I'm going to try and brute force this with a for loop, but there seems like there should be an easier way.

-Andrew

You can indeed use spreadsheet string to array. Wire a 1D array to the array type input and a comma as delimiter.

Link to comment
You can indeed use spreadsheet string to array. Wire a 1D array to the array type input and a comma as delimiter.

Hi jpdrolet,

That did work. I have a 1D string array with all of the original info. I'm still not sure how to split this single string into a cluster, but at least I've moved forward.

Thanks,

Andrew

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.