03-17-2024 06:27 PM
I am attempting to write a VI that will collect data from an Arduino and print it onto an XY graph. The Arduino is collecting data from two sources to use as the x and y coordinates for the graph. However, I want the VI to be repeatable in the sense that the data that the Arduino reads will go from 0-100 on the X-axis and then go back down to 0 or a negative value which is what I want the indicator to be to move on to the next case. Ideally I would like this to happen 3 times so I would have the initial start and two resets which would result in three graphs with varying y-values.
I also am trying to save the data from the Arduino into a text/excel file and have it separated into three individual columns or three individual files. Is it possible to set up a single write to text file for the three sets of data or would it be possible to have one continuous write to text file and parse the data later?
I've also been attempting to create a default case, as I am using an Enumerator to allow for case selection, to designate that a new case has not been chosen as I would like to invalidate whatever Case has already been used. How would I go about that.
Sorry for all the questions. I have included the VI I have been working on and would love any input or advice. Thank you!
03-17-2024 08:28 PM
Building an array with one element from a scalar is not useful.
If you want a case that is not one of the four enum values, create an enum with one more item, e.g. "do nothing".
If you have a popup in case 0, you cannot select a new item while the dialog is active. Catch 22.
Why not graph everything on one xy graph? You probably don't need the express VI, just accumulate the data in a shift register.
Do you really want wo write to three different files?
I doubt you need three visa reads.
Why do you write the entire growing string from scratch to the file. Wouldn't it make more sense to open the file once and just append the new data?
I recommend to do a few more of the simple tutorials.
03-18-2024 06:45 AM
You love zig-zag wires.
I hate zig-zag wires.
03-18-2024 01:10 PM
Since I don't have your instruments, here's a quick simulation how you could handle the xy graph data so each scan (up or down) has its own plot on the same graph. Maybe it can give you some ideas....
03-18-2024 08:13 PM
This is almost exactly what I am looking for!!! With multiple plots, instead of shifting it up and down, could I overlay them on top of one another in the different colors that you have shown by removing the boolean up? Actually, how did you bound them to a single unit in the y-axis as I am noticing that each graph is bounded by 1 "NewtonMeters"?
I have included images of the XY graph with the data plotted. The idea with the multiple graphs was to be able to compare them as the same test would be ran multiple times and to see how similar the graphs are to one another.