06-17-2020 07:17 AM
Hey guys,
i am a student and currently working at a project at my university.
Now i am faced with a problem that is driving me crazy.
i am getting values which i want then to represent in a graph.
This graph should have the following requirements.
-The X-axis should show the timestamp.
-The range of the x axis should be freely selectable.
-it has to be possible to choose a number of saved datapoints that are saved (which i receive).
-and you have to be able to choose how oft the loop/new datapoints are being read.
so i wrote a vi which is attached. But my datapoints arent displayed.
i guess my vi isnt written very efficient and clearly arranged. So it will maybe a bit difficult to understand. But i would appreciate any help!!!
thanks in advance
Solved! Go to Solution.
06-17-2020 08:05 AM
Something seems wrong with your graph. Try deleting it and putting a new one in.
I see an issue with your cluster based on the coercion dot that appears at the Insert Into Array right after you bundle the two numbers together. When you initialize the array, your cluster is I64, DBL. When you bundle the elements, your cluster is DBL, U64. So your date/time which is a value of 3.673e+9 right now is being coerced to an I32 which maxes out at 2147483647 (2.1 e+9)
Fix your initial cluster for its order and so it matches the data type of the are creating in the bundle inside. Ideally, you create a type definition for this cluster.
Note, it is awkward to use an Insert into Array when you are only adding data to the end (or beginning). Use Build Array instead. Less inputs required and easier to read your intentions. Only use Insert into Array if you ever need to insert data to the middle of an array.
06-17-2020 09:05 AM
Thanks you made my day. It works!!!!!!!
the only strange thing is why the representation was U64 in the first place. Cause, i created the constant by right-click...
Does labview create U64 by default or did something get messed up on my way?
Nevertheless, thank you very much!
06-17-2020 10:03 AM
If you right click a wire or a terminal, it will give you a constant for whatever data type that wire or terminal is.
If you drop a numeric integer constant from the palette, it will be I32 by default.
The U64 came from the output of the random number generator. when you bundled that into a cluster, the cluster got that datatype.
I believe you created your initial constant manually (cluster container, drop DBL, drop integer) and the bigger error was that the order of those two elements didn't match the order that you later bundled them. So they both got coerced.