Hello again. now I got a problem with connecting a sub vi to the main vi. As you can see in my vi, I connected "unit conversion" to my main vi but it didn't work like I tested in my sub vi. I'm not pretty sure about input/output connector in the sub vi. There are some local variable I cannot set as an output.
My objective of this sub vi is to make the values change correctly along with the changed units before going to the saving program. But after I connected it, it didn't work.
Sub vi connectior
-
mzu2006
- doctor
- Сообщения: 2456
- Зарегистрирован: 16 авг 2008, 02:12
- Награды: 3
- Версия LabVIEW: 7.1 10 11 12
- Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
- Контактная информация:
Re: Sub vi connectior
post the subVI, please
Правила форума (Forum rules in Russian)
rm -rf /mnt/windows
rm -rf /mnt/windows
-
- beginner
- Сообщения: 27
- Зарегистрирован: 19 мар 2012, 16:03
- Версия LabVIEW: 2010
- Контактная информация:
Re: Sub vi connectior
I already connected the sub VI "unit conversion" in my main VI but the values in the data mainstream didn't change like in the subVI
- Вложения
-
- unit conversion-1.vi
- (21.58 КБ) 248 скачиваний
-
- selecting data to save.vi
- (30.41 КБ) 256 скачиваний
-
- selecting data to plot.vi
- (30.39 КБ) 254 скачивания
-
mzu2006
- doctor
- Сообщения: 2456
- Зарегистрирован: 16 авг 2008, 02:12
- Награды: 3
- Версия LabVIEW: 7.1 10 11 12
- Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
- Контактная информация:
Re: Sub vi connectior
You have an event structure in the subVI. It does not react to programmatic change of values in the main VI unless you specifically instruct it to do so (via VI Server and dynamic event registration). I advice to move the event structure out to the main VI.
Правила форума (Forum rules in Russian)
rm -rf /mnt/windows
rm -rf /mnt/windows
-
- beginner
- Сообщения: 27
- Зарегистрирован: 19 мар 2012, 16:03
- Версия LabVIEW: 2010
- Контактная информация:
Re: Sub vi connectior
I move it out but it didn't work in the way I want. I want the user to be able to adjust both units before the data flows in the big while loop.
- Вложения
-
- Values Measurement 1-main(2).vi
- (37.42 КБ) 252 скачивания
-
mzu2006
- doctor
- Сообщения: 2456
- Зарегистрирован: 16 авг 2008, 02:12
- Награды: 3
- Версия LabVIEW: 7.1 10 11 12
- Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
- Контактная информация:
Re: Sub vi connectior
The event structure in the while loop should work before the data goes to the processing loop.
You should change tunnels for shift registers (RMB-> chnage to shift registers).
You may also want to move variable update inside the while loop to make the changes visible?
You should change tunnels for shift registers (RMB-> chnage to shift registers).
You may also want to move variable update inside the while loop to make the changes visible?
Правила форума (Forum rules in Russian)
rm -rf /mnt/windows
rm -rf /mnt/windows
-
- beginner
- Сообщения: 27
- Зарегистрирован: 19 мар 2012, 16:03
- Версия LabVIEW: 2010
- Контактная информация:
Re: Sub vi connectior
I already moved the event structure out into the main vi. It worked well with the correct values corresponding to the changed units. However, the unit outputs from the event sturcture are not correct (it's not the same as inputs). It seems to be right when the loop is running, but when I stop the while loop, the unit outputs are wrong. I tried to add shift register but it didn't solve the problem. These output units,which are not the same as inputs will appear in the saved text file.
- Вложения
-
- WriteDataToFile.vi
- (22.2 КБ) 254 скачивания
-
- Values Measurement 1-main(2).vi
- (37.84 КБ) 252 скачивания
-
mzu2006
- doctor
- Сообщения: 2456
- Зарегистрирован: 16 авг 2008, 02:12
- Награды: 3
- Версия LabVIEW: 7.1 10 11 12
- Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
- Контактная информация:
Re: Sub vi connectior
Just 2 more shift registers will do the job:
- Вложения
-
- Values Measurement 1-main(2)_mz0407.vi
- (25.12 КБ) 256 скачиваний
Правила форума (Forum rules in Russian)
rm -rf /mnt/windows
rm -rf /mnt/windows