cancel
Showing results for 
Search instead for 
Did you mean: 

Combining Two VIs

Nishant Koti
Member

Combining Two VIs

Message contains an attachment
Hello,
I am working on two different VIs. One of them is Vibration analysis and other one is voltage reader. I collect the amplitude and frequency values as well as Peak to Peak voltage and RMS voltge from the first VI. I collect just the voltage values resulting from a pressure transducer. I would like two cobine these two VIs, so that I can get all the values in one sheet and also able to see the graphs of different variable in one VI. I have PCI-4452 DAQ board with SHC-68 switch connected by BNC cables. I am attaching the VIs, I work on. Thank you.
18 REPLIES 18
Ray.R
Knight of NI

Re: Combining Two VIs

Hi Nishant,

I haven't looked at your vi's yet. 

Typically, you can do this by treating the 2 vi's as sub-vi's within a vi.

One question is:  do you need to synchronize the acquisitions?  In other words, is there a time dependency between the two? Or are they treated as two completely seperate entities?  This will impact any suggestions.

RayR

Nishant Koti
Member

Re: Combining Two VIs

Ray,
 
thanks for the reply. I need these two VIs run at same time. I will be reading the amplitude value and the corresponding pressure(votage from the second VI) value at that point, thank you.
 
Nishant
devchander
Trusted Enthusiast

Re: Combining Two VIs

Nishanth,

  • You cannot Run two Analog input tasks/ two seperate Analog Input acquisition VI's on the same Device
  • So acquire all your Voltage signals in one single acquisition Task/ VI. Now from the acquired values, index out all the vibration data channels, perform your Vibration analysis only on those channels

Hope this helps

Regards

Dev

Ray.R
Knight of NI

Re: Combining Two VIs

Well,

it depends, you can acquire multiple channels simultaneously Smiley Wink

It's a question of design:  requirements vs solutions.

Anything can be done.... it's all a matter of time & $$$  Smiley Very Happy

Nishant Koti
Member

Re: Combining Two VIs

Dev,
 
Thanx for the reply. Would you eloborate on the method you mentioned above. I am still a novice to LabVIEW, thank you.
 
Nishant
Nishant Koti
Member

Re: Combining Two VIs

Joe,

Have you looked at my VIs, what are the chances running both at the same time? Would you explain, thank you.

Nishant

MJBrehm
Member

Re: Combining Two VIs

Without looking at all into what you are aquiring or how... i notice you have two while loops in whiich I assume all the data collection is taking place.

If you have the screen for it... just copy the code from the one and paste it side by sdie with the other, you can run parallel while loops.

This is just looking at your code for a couple seconds... and assuming they can be run at the same time independently. I assumed you are currently running these two VIs at the same time. Hope this helps
Ray.R
Knight of NI

Re: Combining Two VIs

Hi Nishant,

I am looking at your vi's right now... or at least trying to.. Smiley Wink

it appears that you have a project setup for this..  Is that correct?  And using LV8.0?

I don't have many of the sub-vi's that are needed to run the vi, such as "AI clear.vi", "AI Config.vi", "AI Start.vi", "My Data Processing.vi", "AI Read.vi", "AI Read (waveform).vi", "SVT Weighting Filter.vi", "SVT Weighting Filter (1 Ch).vi", "SVT Power Spectrum", "SVT Power Spectrum (1 Ch)", and others...

When there is a will, there is a way...  Smiley Wink

At the moment, I don't see what would prevent you from being able to implement a solution where both run simultaneously.  As long as they do not use the exact same resource at the very same time.  It may require modifying the sub-vi's, but I can't tell without seeing the overall vi's (they are full of missing vi's)..

RayR

Nishant Koti
Member

Re: Combining Two VIs

Hi MJB,

I will try the way you suggested. Let you know, if i get anymore problems, thank you.

Nishant