08-21-2017 06:11 PM
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.
08-21-2017 06:52 PM
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.
08-22-2017 07:58 AM
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
08-22-2017 02:56 PM
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.
08-23-2017 06:14 AM
@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!!!!!!