Sequencial execution of two VIs in LabView
Hi,
I am sure other people have encountered the similar problem, but I can not seem to find relevant posts
on the NI forum.
I have two VIs. I like to execute one VI first (which is a while loop), and a second later execute the 2nd VI.
Since the first VI runs "forever", the 2nd VI would never get executed if I put the two VIs in a sequence
in a main VI.
What is the best way to do this? I apologize for the newbie question.
Best regards,
Jianglai
You can use queues or notifiers to do this. Here's an example using notifiers that runs a second vi once after the first vi has run in the loop.
See the Master/slave or producer/consumer design patterns (they are included in the LabVIEW templates) if you need to run the second vi more than once.
Systems Test Engineer
Certified LabVIEW Architect (CLA)
Attachments:
Notification from loop.vi 15 KB
Similar Messages
-
Compare two VIs in LabVIEW Full Developmen​t System
I am using Labview 8.6 Full Development System. I want to compare two VI's, what is the best way to do it? I am using TortoiseSVN source code control software. I found some VIs (vi_diff.vi) in this forum. But this VI will work only in Professional Development System. Because this vi will use LabVIEW8.6\project\procmphier.llb\CMP compare two VIs.vi. This vi will work only in professional system.
How can I compare two VIs in my current LabVIEW system. Pls give suggestions.
Thanks
NesaraIf you pay more for the PDS than the FDS, you want more features. The diffing is one of those. So you either get the upgrade $$$. Or you do it manually.
Manually, I go for a complete VI documentation (I don't remember the menu entry) of one of the VIs and have that open as pdf while going through the code of the other.
Felix
www.aescusoft.de
My latest community nugget on producer/consumer design
My current blog: A journey through uml -
How can I compare more than two VIs at a same time in labview 2009
How can I compare more than two VIs at the same time. I am an Lab Engineer I have to check assignments submitted by students and I want to know how many of them are copied from each other. Labview compare VI can only compare two VI at a time while I want to check about 30 VIs at same time.
Regards,I'm not aware of a tool to compare multiple VIs. If you don't find anything, consider posting this to the LabVIEW Idea Exchange to expose this idea directly to NI R&D.
Thanks!
- Greg J -
Operating two Vis at same time
First time posting here on NI, need some help with setting up a Labview program. A little background so you know what we are attempting to do and the level of skills involved in it. I'm a undergrad research assistant and I have never used labview before until I started on this project and just have a basic understand of the program now. All the programs involved in this were written before I started on the project by other undergrad and grad students. So any answers will probably have to be dumbed down to a noobs level for me. Here is our problem :
We have two VIs that we are having to run at the same time. The First VI is a program that we use to run a automated arm/probe. It is setup to run manually by using the arrow keys on the keyboard or we have a grid system setup on our test box and can tell it were to travel too by inputting the x y cords into the program. The second VI is a safety loop, the testing we are doing is dealing with EM fields and detection of them. We have equipment that generates the field inside the test box but we can not allow it to get over a certain watts level. The second program was designed to detect when we reached this level and turn the system off for safety. Both of the programs work just fine.
So here is the problem, we can not run them at the same time which is an issue. Anytime they try and run them together the system bogs down then crashes or they just fail to load and run at the same time.
Here is the solution I would like to try and find. What is the best, fastest and simplest way to link both of this programs as a single VI that wouldn't take a lot of programming and knowledge. Basically the programming team that made the VIs is gone now. If needed I an post the VIs. Thanks for any help or inputI would guess that your programs are not programmed very efficiently and are running with what are known as greedy loops. That is, the VIs have a loop in them but don't provide any means for LabVIEW to switch between tasks. One, or both, are starving the CPU which causes your execution issues. Even some as simple as adding a Wait(0) to the loop will help to prevent greedy loops from occuring. Additionally, they could have issues with maintaining memory and do things like allowing arrays to grow infinitely large. Without seeing the code though it will be difficult to give you specific advice.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot -
Hello!
I want to know how i can run two VIs at the same time.
I mean that i want to run a second VI ( N.2) while another VI (N.1) is in
execution without suspend it (N.1)
If anyone has suggestions, please help me!
Thank you very much.
roby.If you say "run a vi", I assume that you have the VI open in LabVIEW, then press the run button. (Some of the earlier answers taks about programmatically calling VIs, which I don't think is the focus of your question)
You can run as many VIs as you want at the same time. Simply press the run button of the second VI and they will both run.
Of course you should ensure that they don't use the same resources (e.g. DAQ device, or listen on the same TCP port, etc.) In these cases, the second VI might fail. (Also if the second VI is a subVI of the first VI, you won't be able to run it seperately, because it will be already running.)
LabVIEW Champion . Do more with less code and in less time . -
How to make a communication of two VIs from difference computers throught VI server?
how to make a communication of two VIs from difference computers throught VI server?
I have built the program which is attached at below. But it doesn't work. Can any one help me?
Attachments:
panel5.vi 82 KBHi Barry,
What do you mean "it doesn't work"? What kind of errors are you seeing? Also, you only specified the file name (data.vi) when opening a VI reference. Try specifying the whole path to the VI. Also, you might want to make sure you are able to ping your other computer from the start (to see if this is a LabVIEW issue or a network issue).
Hope this helps,
Travis H.
LabVIEW R&D
National Instruments -
Conversion of VIs from LabView 2013 to 2011
Hi,
I would be grateful for conversion of zipped VIs from LabView 2013 to 2011.
Thank You,
Michal
Solved!
Go to Solution.
Attachments:
main VIs.zip 38 KBHere you go.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Attachments:
main VIs 2011.zip 27 KB -
I have two codes that suppose to be the same but I want to make sure by comparing the VIs. The code consists of 50+ VIs. I was trying to use CMP compare two VIs.vi in labview 7.0 but got an error when try using it. Is there an easy way to compare the VIs?
Nikolai Maris wrote in news:2tp8eeF2264ogU1@uni-
berlin.de:
> If the vi's should be exactly the same, you can compare them with a
> hex-editor. E.g. with WinHex, is free as trial for files up to 250 kB.
>
> Tran25 wrote:
>
>> I have two codes that suppose to be the same but I want to make sure
>> by comparing the VIs. The code consists of 50+ VIs. I was trying to
>> use CMP compare two VIs.vi in labview 7.0 but got an error when try
>> using it. Is there an easy way to compare the VIs?
>
Or use dos command fc
Binary files with different lenght will be flagged different
Binary files with same lenght will show where they are different.
Text files with differences will output different lines.
Rolf -
Please Convert Vis from Labview 2013 to Labview 2011
Please convert the attached Vis from Labview 2013 to Labview 2011
Solved!
Go to Solution.
Attachments:
Convert from2013 to 2011.zip 255 KBHere you go.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Attachments:
Converted to 2011.zip 176 KB -
Report generation VIs in Labview 6.1
Hello,
I am havinf problems with using Labview 6.1 VIs for report generations. The VIs provided by Labview are not executable! It seems as if they had internal errors, non fixed errors. Moreover, I am not able to open the diagram because it is password protected. Does someone know if there is any patch to fix this or the reason why these VIs don't work?
Thanks a lot!
Regards,
MaríaHello Maria,
are you using the report Generation Toolkit for MS Office or the standard vis that LabVIEW provides for report generation?
If you use the Office toolkit, this may help:
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/c8888a9a74e75c4786256cda00694a1e?OpenDocument
If not, this may also help:
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/9acb175f6de483ae86256b2200776b8b?OpenDocument
In any case, WHAT I WOULD TRY FIRST is to do a Mass Compile of the folder where the report vis are located.
Here you can see what this does and how to perform it:
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/654877e62a97b72986256c95006f9b24?OpenDocument
One last question...are you having trouble only
with executables or also during development?
Regards,
JorgeM. -
How do we compare two images in labview?
I have created a back end code which is comparing two images using LABVIEW.i have used a comparator and put a tolerance factor which will help me filter out almost same images.the problem i am facing is that on subtraction of the given two images i am getting a completely random output with noise surrounding the parts of the image which are being compared.Also the tolerance percentage i have given has not been working very effectively.Kindly let me know if there is an easier solution to my task or what needs to be done
Thank youCan you post your code?
Randall Pursley -
Hello Every One,
Can anyone help me in combining these two attached VIs please. What I am trying to do is convert 16bit tif image (attached) to 64 RGB image and then only crop the image, however I do not know how to attached these two VIs. Please someone help
Many thanks
Lazer
Attachments:
Image Crop_2009.vi 85 KB
Grayscale to Color 16bit_v2010.vi 85 KB
1800s.jpg 8 KBHi Lazer,
Thank you for your question. Firstly, the image you've attached is blank, have you uploaded the file in the appropriate format?
I see that the 'Grayscale to Color' VI converts the image from a Grayscale U16 image to a U64 RGB image. Is this what you wish the VI to do? The second VI simply crops the image.
Do both of these VI's function as you wish them to, as separate entities? If so, the issue is calling them in a sequence, is that correct? If so, you can do this by simply making a third, Main VI, which calls these two VI's as sub-VI's.
Kind Regards,
Shalimar Ali
Applications Engineering Intern -
How to integrate two VIs (diffserv,​intserv)
hi
i need help in the to make integration of two vi (DiffServ,IntServ) attached with this email as my topic is integration of differentiated services and Integrated services ..
how i can integrates these two VIs
thanks
Attachments:
Diffserv.vi 58 KB
IntServ.vi 63 KBThread duplcated
Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me -
Best way of sending signals between two VIs
Hello all,
I have two VIs. One that generate some complicated signals (sine wave, impulse, etc.). The other one takes manually inputted voltage and pressure send them out to some hardware with a pump, and reads back the output of the pump.
What is the best way of sending the waveforms from the signal VI to the manual control VI? I still need to be able to control the signals manually in that manual control VI.
Thanks.
Solved!
Go to Solution.nitad54448 wrote:
hi
For exactly this kind of process, I am using queues, FG and (relax ppl, I know..) global variables. If you are writting a global in one Vi and reading it in another (to prevent accidental (fake)updating); globals are easy to implement. Many people hate them (I do, sometimes) but for these kind of cases I think they are well adapted.
For FG you need a user control and a vi for each variable you want to share... Both FG and globals are "bottle in the ocean" like of information : you send some info and sometimes this info will arrive somewhere...
If you need to be sure that the info is passed then Queues are to be used...
N
While you may not run into race conditions using global variables in a write once/read many approach they do not protect you from some part of your application deciding to write to them. FG at least provide some level of protecting access while globals do not. In addition, global variables can create multiple copies of your data. If your data is large, this can be problematic. I much prefered using a defined messaging scheme. The intent is very clear and you can provide safe guards. Even FGs are better. I personally would never recommend the use of global variables even though some cases MAY work out. A defined API is always a prefered approach and helps to keep the code modular and decoupled. This leads to greater reuse. Global variables tie things together and make reuse more difficult.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot -
Where to download the exercise VIs from "LabView Basics II"?
Hello everybody,
Where can I download the files with sample Vis for "LabVIEW Basics II" course?
In the company I currently work, they couldn't find these files. I have got only books.
TIA,
Yazilim.I think you have to purchase it. Contact NI for more information.
Nam.
Yazilim wrote in message
news:[email protected]..
> Hello everybody,
> Where can I download the files with sample Vis for "LabVIEW Basics II"
> course?
> In the company I currently work, they couldn't find these files. I
> have got only books.
> TIA,
> Yazilim.
Maybe you are looking for
-
I am unhappy with the recent upgrade to Thunderbird 31.3.0 and now 31.4.0. My bottom line question is whether I can roll back to the previous version, which was working well for me. The problems I have encountered include: 1. I used to be able to ent
-
How can i set up IPAD2 without an American credit card?
Ok.. I have purchased my IPAD2 in NY, USA, i live in Barbados but I cannot set it up because it will not accept my local credit card. What to do? Why sell product outside of US and not accept international credit cards?
-
How to alter country in registration form.
I successfully upgrade my MacBook from Tiger to Leopard. When I restarted my Mac, the 'Setup Assistance' brought me to registration page but the form is for US resident. The form did not contain field 'Country' and contain 'State'. I am not US reside
-
Issue when naming resources the same on different zone clusters
Dear all I found a very strange issue related to naming of resources and zone clusters, and would like to know weather what I am doing is supported. I have a 4 node cluster and on the first two nodes I have zone cluster A. On the second two nodes I h
-
I have downloaded a addon now I will edit it and put some new thing . so, can i do this thing. is it legal?