LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

voltage Ramp and Counter

Dear John,

 

I am new in the forum and I have few questions regarding the example codes you have posted on Synchronize Analog Output Sample Clock With TTL Pulse Count

I am using now the acquisition card pci 6221 to scan a laser beam in 2D and when I tryied to run one of those examples (Raster_2DOutput_wCounter_621x_86) I have the error:  The subVI could not be found when loading this VI. It may have been moved, deleted, or its name may have changed. Somehow the subVi is missing. I have already changed the 6251 with 6221.

 

Do I have to put this folder somewhere in the labview path or what is exactly the problem?

 

Thanks very much for help

Best regards,

Abdelghani

 

 

0 Kudos
Message 11 of 14
(909 Views)

For Luke, I recommend using a Functional Global variable to keep track of the running total (I assume you mean point-by-point).  The attached VI (below) can be used as a sub-VI that will keep track of the values and implements three options: Add Array to Total, Get Total, and Reset.  Essentially it acts as a variable.  If you want the averaged amount, you can divide the total by the Number of Arrays Added.  It should make more sense once you take a look at the parameters, but I think this should be what you need.

 

For Abdelghani, welcome to the forum!  The SubVI should be included on the Community site where you downloaded the main VI.  It is called Generate 2D Raster.vi.  If you are using the 6251 or the 6221, you should use the Raster_2DOutput_wCounter_86.vi example.  The one you are referring to is specifically for the 621x DAQ devices which automatically discard the first sample when performing a buffered period measurement.

 

It shouldn't matter where you save the sub VI, just make sure to point your main VI to it when you open the code.

 

 

Also, for questions specific to the example code, you might try posting on the thread that is on the download page--that way others who find the example code can read through the posts if they have any questions as well.  Thanks!

 

Regards,

John

John Passiak
Message 12 of 14
(893 Views)

Thank you for input once again! I'm trying to implement the subVI you mentioned but it doesn't seem to quite work the way it is supposed to. When the array through the loop gets sent through the Summed Arrays VI, the values don't seem to add, and are lost. I put test graphs before and after it, and the graph before it displays the values, while the graph after it does not. Is there something else about this VI that needs to be implemented?

 

Here is an image of the array portion of my program. 

 

Thanks again,

 

Luke 

0 Kudos
Message 13 of 14
(865 Views)

Hi Luke,

 

Try this version:

Functional Global Variable to Add Arrays

 

It turns out that adding arrays of different lengths actually results in an array of the smaller size (not the larger).  The fix here is to make sure both arrays are the same size before adding them together.

 

-John

John Passiak
0 Kudos
Message 14 of 14
(846 Views)