LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass data to another VI using

Good day all, I would like to ask on how to pass the data capture from one VI's to another VI's for data logging using global variable. The VIs I created are as follows:-

1. AC_CCH_Prob - VI that capture data

2. Control2 - ctl file that hold the captured data from AC_CCH_Prob and pass to Write to measurement

3. Write to Measurement - VI that created for data logging.

 

The problem i faced are as follows,

VI 1 able to capture data but however it seems that no file is created from VI 3. So is there any missing part in the created VIs?

Download All
0 Kudos
Message 1 of 9
(2,441 Views)

A ctl file is NOT a global variable. What gave you that idea?

 

Your VIs have a lot of strange and meaningless constructs. Have you done any tutorials?

 

I think it would be better to tell us what you want to do, not how you want to do it. I am sure there is an easy solution.

0 Kudos
Message 2 of 9
(2,421 Views)

Hi,

I am still new to Labview, currently havent done any tutorial yet.

I need to record the data capture in the 1st VI into Excel. 

0 Kudos
Message 3 of 9
(2,416 Views)

In simple words, I want to pass the data from 1st Vi to 3rd VI. 

0 Kudos
Message 4 of 9
(2,394 Views)

There are only two VIs.

Who wrote the VIs?

Do you want to write the file once the first vi has completed? Why not place the second on the first diagram as subvi?

0 Kudos
Message 5 of 9
(2,388 Views)

I wrote these two VIs. The first one basically already completed. 

 

Please correct me if I'm wrong. Create Sub Vi means once I finished the 2nd Vi, i just make it as subVi and then combine it with the first VI? Which means once I perform sound measurement, the subVi will be triggered as well, a single package. Can i say like that?

0 Kudos
Message 6 of 9
(2,385 Views)

@CCHUA1994 wrote:

Hi,

I am still new to Labview, currently havent done any tutorial yet.


Either learn LabVIEW yourself, or find/hire someone with knowledge of LabVIEW to do this for you.  This Forum exists to help you, particularly with learning LabVIEW.

 

Bob Schor

0 Kudos
Message 7 of 9
(2,341 Views)

@CCHUA1994 wrote:

Please correct me if I'm wrong. Create Sub Vi means once I finished the 2nd Vi, i just make it as subVi and then combine it with the first VI? Which means once I perform sound measurement, the subVi will be triggered as well, a single package. Can i say like that?


The "menu...edit..create subVI" is to wrap parts of code into a subVI. You already have a subVI, so you need to assign the connector pane to the desired controls and indicators.

 

Obviously you are not ready to do most of that. Apparently you jumped into the deep end without ever taking swimming lessons. That's like trying to play a game of chess without even learning the rules!

(Given these constraints, what you did is actually quite impressive! :D)

 

Yes, LabVIEW is easy once you know the rules of dataflow and the basic edit operations. While you can learn as you go, you need to start with a basic foundation.

 


@CCHUA1994 wrote:

I wrote these two VIs. The first one basically already completed. 


While they might work, they are full of meaningless and unnecessary code and overly complicated. There are also glaring mistakes. I'll point out some issues later.

 

0 Kudos
Message 8 of 9
(2,320 Views)


@CCHUA1994 wrote:

I wrote these two VIs. The first one basically already completed. 


While they might work, they are full of meaningless and unnecessary code and overly complicated. There are also glaring mistakes. I'll point out some issues later.

 


"Control 2.ctl": very poor choice in naming. My downloads folder already had a Control 2.ctl with a completely unrelated datatype, so the browser renamed your control to "Control 2 (1).ctl". Your Vis loaded the wrong control, breaking all code. It is highly recommended to give unique and appropriate file names!

 

Don't maximize the diagram or front panel to the screen. This will prevent you from looking at the help windows (which you need!) and other documentation while editing.

 

"Write to Measurement.vi" (Also poor naming. Can be confused with the "Write to measurement file" express VI from the palettes).

  • Upper half: Sequence structure has no purpose. Why is it there?
  • Lower half is dysfunctional and overly complicated (See image for some comments).

altenbach_0-1589386950310.png

 

 

"ACC_CCH_Prob.vi" Sorry, I don't have and DAQ installed, so I cannot comment about most of the code. I made no attempt to understand it, but it looks pretty bad.

 

Some morsels:

 

  • "delete from array" is not the correct function to take an array subset. Try "array subset" instead, right?
  • Not sure what you think this does (image below) and why you need it. It basically truncates all input arrays to the shortest. Is that what you want?
  • altenbach_1-1589387524683.png
  • etc....

 

0 Kudos
Message 9 of 9
(2,311 Views)