LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help! How to read CSV file and use as input?

Solved!
Go to solution

Hello,

I want to read CSV file and plot it using Python.

How can I read CSV file and use it as Python node input?

like this csv file

wzh0053auburnedu_0-1686255165460.png

How can I read it and use X, Y values as input to Python node?

Thanks

 

0 Kudos
Message 1 of 9
(1,756 Views)

wzh0053@auburn.edu wrote:

Hello,

I want to read CSV file and plot it using Python.

How can I read CSV file and use it as Python node input?

like this csv file

wzh0053auburnedu_0-1686255165460.png

How can I read it and use X, Y values as input to Python node?

Thanks

 


That's 3 pythons in 1 request. Why not just use python? pandas.read_csv()

 

https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html

 

then use the plot() method

 

https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html

 

Wow, look at that, no Labview involved. 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 2 of 9
(1,748 Views)

Hello,

Yeah I know how to do it with Python.

I am just trying to learn how to use LabView and integrate with python..

wzh0053auburnedu_0-1686256251083.png

 

0 Kudos
Message 3 of 9
(1,743 Views)

wzh0053@auburn.edu wrote:

Hello,

Yeah I know how to do it with Python.

I am just trying to learn how to use LabView and integrate with python..

wzh0053auburnedu_0-1686256251083.png

 


ok I see, you need to use a python node, have you tried that? 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 4 of 9
(1,740 Views)

Yes I am trying to use the python node. 

As far as I know, I can read the csv file using this Read Delimited. However, I don't know how I can use its output to use as input to Python node. Sorry, I am a very newbie to Labview..

wzh0053auburnedu_0-1686256442111.png

 

0 Kudos
Message 5 of 9
(1,734 Views)
Solution
Accepted by topic author wzh0053@auburn.edu

wzh0053@auburn.edu wrote:

Yes I am trying to use the python node. 

As far as I know, I can read the csv file using this Read Delimited. However, I don't know how I can use its output to use as input to Python node. Sorry, I am a very newbie to Labview..

wzh0053auburnedu_0-1686256442111.png

 


Try something like this, you will need to add some things to this, like your paths, to make it work but its a starting point

 

snip.png

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
Message 6 of 9
(1,719 Views)

Thank you so much!

I was trying to find this symbol, but I couldn't find same one.

I believe it is the array subset. How can I build that one?

wzh0053auburnedu_0-1686257645204.png

Thank you again

0 Kudos
Message 7 of 9
(1,712 Views)

wzh0053@auburn.edu wrote:

Thank you so much!

I was trying to find this symbol, but I couldn't find same one.

I believe it is the array subset. How can I build that one?

wzh0053auburnedu_0-1686257645204.png

Thank you again


Right click on the orange wire and then navigate as shown here: 

Jay14159265_0-1686261592352.png

 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 8 of 9
(1,656 Views)

That icon is actually the Index Array function that changes its image to match the array wired into it and is expandable for multiple outputs.  Just hover over the bottom edge to expand it.

Michael_Munroe_0-1686367513356.png

 

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
Message 9 of 9
(1,504 Views)