Define axis names by programming
-
- beginner
- Сообщения: 27
- Зарегистрирован: 19 мар 2012, 16:03
- Версия LabVIEW: 2010
- Контактная информация:
Define axis names by programming
Hello. It's me again. Sorry for asking you too much :(. I tried to define the axis names with different units by programming instead of doing in the graph properties. In my vi, I wired each axis name corresponding to the unit input to the graph property node, but it didn't come out correctly. I can't even see all graphs in the waveform chart which I defined each graph name already. How can I work around it?
- Вложения
-
- Values Measurement 1-main.vi
- (43.44 КБ) 280 скачиваний
-
- selecting data to plot.vi
- (30.39 КБ) 276 скачиваний
-
- unit selection.vi
- (18.1 КБ) 277 скачиваний
-
- selecting data to save.vi
- (30.41 КБ) 275 скачиваний
-
- value sending desicion.vi
- (25.36 КБ) 275 скачиваний
-
mzu2006
- doctor
- Сообщения: 2456
- Зарегистрирован: 16 авг 2008, 02:12
- Награды: 3
- Версия LabVIEW: 7.1 10 11 12
- Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
- Контактная информация:
Re: Define axis names by programming
This should work. But why are you setting Y axis label multiple times?
Правила форума (Forum rules in Russian)
rm -rf /mnt/windows
rm -rf /mnt/windows
-
- beginner
- Сообщения: 27
- Зарегистрирован: 19 мар 2012, 16:03
- Версия LabVIEW: 2010
- Контактная информация:
Re: Define axis names by programming
There are 4 different axis names I want to have depending on the unit adjusted at the beginning. However it didn't come out right. I can't even see all lines in the chart (don't know why!!). Could you please take a look at my code to see what's wrong with it?
-
mzu2006
- doctor
- Сообщения: 2456
- Зарегистрирован: 16 авг 2008, 02:12
- Награды: 3
- Версия LabVIEW: 7.1 10 11 12
- Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
- Контактная информация:
Re: Define axis names by programming
Look at this property node:
Then you set the label of the current YScale. So whatever YScale has been selected current, will get its label; changed multiple times. Are you sure this is what you want?
You set ActivePlot, then adjust name and the Y scale it belongs to. OK.Then you set the label of the current YScale. So whatever YScale has been selected current, will get its label; changed multiple times. Are you sure this is what you want?
Правила форума (Forum rules in Russian)
rm -rf /mnt/windows
rm -rf /mnt/windows
-
- beginner
- Сообщения: 27
- Зарегистрирован: 19 мар 2012, 16:03
- Версия LabVIEW: 2010
- Контактная информация:
Re: Define axis names by programming
No. So how can I define the axis names to different axis at the same time?
- Вложения
-
- Values Measurement 1-main.vi
- (45.87 КБ) 265 скачиваний
-
mzu2006
- doctor
- Сообщения: 2456
- Зарегистрирован: 16 авг 2008, 02:12
- Награды: 3
- Версия LabVIEW: 7.1 10 11 12
- Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
- Контактная информация:
Re: Define axis names by programming
I would do it in two separate property nodes:
Using second one, for each scale you assign the scale label
Using first one, for each plot you assign plot name and Yscale index this plot belongs to.Using second one, for each scale you assign the scale label
Правила форума (Forum rules in Russian)
rm -rf /mnt/windows
rm -rf /mnt/windows
-
- beginner
- Сообщения: 27
- Зарегистрирован: 19 мар 2012, 16:03
- Версия LabVIEW: 2010
- Контактная информация:
Re: Define axis names by programming
Thank you. It worked!! However, the lines in the chart don't correspond with the values changed. When I tried to adjust the values in the data mainstream, the graphs didn't change along with the change of values. Why is that?
- Вложения
-
- Values Measurement 1-main(1chart).vi
- (46.48 КБ) 279 скачиваний
-
mzu2006
- doctor
- Сообщения: 2456
- Зарегистрирован: 16 авг 2008, 02:12
- Награды: 3
- Версия LabVIEW: 7.1 10 11 12
- Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
- Контактная информация:
Re: Define axis names by programming
This is better, but still some work is required.
1. So in each iteration of the cycle you update scale labels. Moreover, you have 2 values for scale #0 "Flow(L/min)", "Flow(L/hr)" and for scale #1 "Pressure (bar)", "Pressure (pascal)". Now the latest used got actually set. Create new for loop: 2. Now I do not get what you mean by " the lines in the chart don't correspond with the values changed." Can you provide an example?
1. So in each iteration of the cycle you update scale labels. Moreover, you have 2 values for scale #0 "Flow(L/min)", "Flow(L/hr)" and for scale #1 "Pressure (bar)", "Pressure (pascal)". Now the latest used got actually set. Create new for loop: 2. Now I do not get what you mean by " the lines in the chart don't correspond with the values changed." Can you provide an example?
Правила форума (Forum rules in Russian)
rm -rf /mnt/windows
rm -rf /mnt/windows
-
- beginner
- Сообщения: 27
- Зарегистрирован: 19 мар 2012, 16:03
- Версия LabVIEW: 2010
- Контактная информация:
Re: Define axis names by programming
Ok As you can see in my VI, when you run the vi, the data will be plotted in the chart. However, when you try to change to value in the main array, nothing happens in the chart even though the value has been changed. So the plotted lines don't follow the change of the values in the data mainstream.
Your suggestion is to create a new for loop for Yscale name label. You mean I should create another for loop inside the for loop I already have,especially for this y scale label property? or another for loop outside the big for loop. Why did you remove the sub vi "unit array" out from the big for loop? Can you fix it in my vi?
Thanks
Your suggestion is to create a new for loop for Yscale name label. You mean I should create another for loop inside the for loop I already have,especially for this y scale label property? or another for loop outside the big for loop. Why did you remove the sub vi "unit array" out from the big for loop? Can you fix it in my vi?
Thanks
-
mzu2006
- doctor
- Сообщения: 2456
- Зарегистрирован: 16 авг 2008, 02:12
- Награды: 3
- Версия LabVIEW: 7.1 10 11 12
- Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
- Контактная информация:
Re: Define axis names by programming
It is extremelly hard to fix code in your , because some sub s are missing. My attempt is attached.
- Вложения
-
- Values Measurement 1-main(1chart) (2).vi
- (28.03 КБ) 264 скачивания
Правила форума (Forum rules in Russian)
rm -rf /mnt/windows
rm -rf /mnt/windows
-
- beginner
- Сообщения: 27
- Зарегистрирован: 19 мар 2012, 16:03
- Версия LabVIEW: 2010
- Контактная информация:
Re: Define axis names by programming
Thanks for adjusting my code but I still can't have the correct plots in the chart when you try to change the values in the data mainstream. Nothing happened in the chart when you adjust the values. Do you know what is going on with my code?
-
mzu2006
- doctor
- Сообщения: 2456
- Зарегистрирован: 16 авг 2008, 02:12
- Награды: 3
- Версия LabVIEW: 7.1 10 11 12
- Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
- Контактная информация:
Re: Define axis names by programming
Do you want to have the graphs changed when you adjust the data? Then move the graphing part
inside the while loop with event structure.
Правила форума (Forum rules in Russian)
rm -rf /mnt/windows
rm -rf /mnt/windows