08-21-2017 06:49 PM
Hi I´m trying to create a temperature/humidity display control with LabVIEW. I´m using visa to obtain the info from the different sensors and want to display them with the waveform graph but I´m having some problems. I don´t know why it keeps giving me a wrong graph display, it displays the right values but the graphs tend to cero then and stays like that. I attached the vi so someone can help me.
Kind regards.
08-21-2017 07:59 PM
You have a very complex confusing VI that isn't working. We have no idea what data are coming in from the VISA port, how much data, how fast, how it is organized, etc.
Your question is about getting the Graph to look right. I recommend writing a simple VI that simulates the generation of a single channel of data, and plot it on a single graph. It probably won't work, but if it much simpler, you stand a better chance of deducing what it is doing. Also, if your test code consists of at most 4 functions, you can look up the Help on each of them and learn how to do it.
Bob Schor
08-21-2017 08:06 PM
One obvious problem I see is that you bundle together to scalars into a cluster, than turn that into an array. Why?
Then you take that and reshaped that 2 element 1-D array into a 4 x 2 2-D array. Well, you don't have that much data, so all the new elements you just created will become the default value of zero.
Also, Index Array is resizable. Drag down the bottom border and get multiple outputs. You won't even have to wire in constants very often as you'll get elements 0, 1, 2, 3, .... by default.
08-21-2017 08:23 PM
There´s my problem. I´m trying to put the scalars in groups of two into an array to show them in a graph. For example, point A temperature and humidity (both in the same graph) and point B temperature and humidity (in one graph both too). I really don´t know what I´m doing... With the waveform chart I can put the output of the cluster directly into the chart and there was no problem, but with waveform graph I have an error (Attaching this). I just need to know how to show that two scalars into a waveform graph, I thought that with a cluster will be ok, but it seems is not that easy.
Thanks for the Index Array tip, haven´t notice that.
08-21-2017 08:44 PM
Look up graphs in the LabVIEW help. There is even an example for it. Study that so you know all the different ways you can combine data to make single and multi-plot graphs.
Don't mess with the cluster. Build the 2 scalars into an array. Then use another Build Array to turn the 1-D array into a 2-D array and wire that to the graph.
08-21-2017 09:09 PM
Thanks I´ll try that.