LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot data from .csv

I have a vi that make plots from .csv file.   

However, I need to modify the vi to be more friendly for end users.

The current vi does

1. have options to display 1,2,3 or 4 plots on the front panel

2. x-axis is fixed with time

3. y-axis can take up to four sets of data (y-axis only has one unit scale)

The vi after modification need to be able to

1. select data for x-axis

2. y-axis need to have primary and secondary unit scales for different data

My problem

I think the current vi code has some code smells.  

I would like to learn the best practice and approach before I start messing the code or even rewrite the code. 

0 Kudos
Message 1 of 5
(2,720 Views)

I would just use a simple while loop with event structure inside. You will need to set up the second y-axis beforehand, but you can do everything else just by bundling data together and setting property nodes, including which scale to use and whether the plot is visible or not.

0 Kudos
Message 2 of 5
(2,704 Views)

If you want to learn how to improve your code, post your code and we can make recommendations.  Otherwise, you are asking us to do your work for you ...

 

Bob Schor

0 Kudos
Message 3 of 5
(2,647 Views)

Thanks. I am using an event structure inside a case structure and the case structure is inside the while loop.  I got one plot that works and going to multiple plots.  Thanks.

0 Kudos
Message 4 of 5
(2,629 Views)

@quan0418 wrote:

Thanks. I am using an event structure inside a case structure and the case structure is inside the while loop.  I got one plot that works and going to multiple plots.  Thanks.


Apparently some people think we are psychic.  I don't think even Jeff's Magic 8 Ball can figure this one out.

 

WE NEED TO SEE YOUR CODE IN ORDER TO HELP YOU DEBUG IT!!!!!!


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 5
(2,615 Views)