LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform chart

Hi,

I have problems when I want to show the time in x-Axis of my waveform. Well, I have two vi, Ctrl_graficPH_SBR1.vi and graficPH_SBR1.vi.

First, from Ctrl_graficPH_SBR1.vi I obtain the reference of the waveform chart placed in graficPH_SBR1.vi.
Then I generate random numbers and associate it with its timestamp in a cluster and I plot it in the waveform chart of Ctrl_graficPH_SBR1 and it's all OK... but when I try to plot the same cluster (timestamp, double random number) in the waveform chart placed in the another vi (graficPH_SBR1.vi) it doesn't plot the time in the X-AXIS correctly. Why? What is the problem?

Thanks,

ToNi.
0 Kudos
Message 1 of 4
(3,191 Views)
Hmmmm...
 
That was rather tricky, with overlapping problems.
 
The issue is mainly related to the fact that there are two types of waveform charts : one for numbers, as in your graficPH vi, and one for waveforms, as in your Ctrl_graficPH vi. First, you need to correct that.
 
Then, you can't get a strict-typed reference to a panel control as you did in your GetReference vi. What you get is a generic reference, and the value you pass using the value property node will be coerced from waveform to number.
So, it seems to be better to go the other way round : let your graficPH vi generate the proper strict-typed reference at run time, and use this ref to pass the waveform from the Ctrl_graficPH vi.
 
See the attached llb, and don't forget the stars, this will help to cure my headache !
Chilly Charly    (aka CC)
Message 2 of 4
(3,173 Views)
Hi,

Thanks, you are right. I can't view your code you attached to me because I have LV7.0 and not LV7.1 but what you say to me is right. I think the problem is that I send to graficPH.vi from Ctrl_graficPH_SBR1.vi a type different that the waveform graph placed in graficPH.vi hopes. If I change the type of the waveform chart to Waveform type it seems to work because when you create a waveform chart its type is double by default (DBL, see the icon in block diagram, at the bottom of the waveform chart icon it shows DBL, if you change it to waveform type it seems to work well).

Can you attach me your example in LV7 please?

See the new example in LV7.0 Express that I attach to you here, I only change the data type of the waveform chart placed in graficPH_SBR1.vi (see the icon of the block diagram, at the bottom, now its type is waveform and not DBL). This is the only change I have introduced and its works fine 😉

Thanks very much for you effort and for helping me 😉

One thing.... I don't know how to change the data type of waveform chart to waveform because I have done copy and paste form one vi to graficPH_SBR1.vi. In the vi I have done the copy I made a build waveform block (see Ctrl_graficPH_SBR1.vi) and then I link it to waveform chart and then LV automatically change the type of the waveform chart from DBL to waveform but I don't know how to do it manually. Finally I copy this waveform chart to graficPH_SBR1.vi. How can I change manually the type of the waveform chart from DBL (default when you create it) to Waveform?


ToNi.

PD.: Now I am testing what I have told to you (change the data type of waveform chart placed in graficPH_SBR1.vi from DBL to waveform) and If I get problems then I'll tell to you something.
0 Kudos
Message 3 of 4
(3,167 Views)
Here is a 7.0 version. There is only two vi's and a global variable, a setup much simpler. In the control vi, there is an additionnal case to download the graph history to the graph display, when the display is loaded and launched after running the control vi.
Hope it helps...
 
Chilly Charly    (aka CC)
0 Kudos
Message 4 of 4
(3,161 Views)