LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing Data one time From a Data stream

I've run into an issue where I need to pull an array of load values from an array of waveforms and store those values for the duration of the testing. I currently can pull the load values but I can't think of a way to store it.

0 Kudos
Message 1 of 6
(1,258 Views)

Hi T,

 


@T1p1ca1 wrote:

I currently can pull the load values but I can't think of a way to store it.


Use a wire and a shift register to store data in your loop…

 

  • Please don't use ArrayToCluster, followed by Unbundle: you can get the very same result much easier using IndexArray! (And please learn about the pitfalls of your approach: ArrayToCluster by default creates a cluster of 9 elements…)
  • Learn to avoid Rube-Goldberg code: "boolean <> TRUE" is the same as "NOT(boolean)"! And the CompoundArithmetic also supports inversion on inputs/outputs…
  • Why do you need to start and stop the DAQmx task in each iteration of your (outer) loop?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(1,248 Views)

Addendum to last message:

Example for your Rube-Goldberg code vs. simple array handling…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(1,210 Views)

While I do appreciate the help in improving the efficiency of my flow, you didn't really answer the question of when I'm pulling the data out of the inner while loop to store for the duration of the program running, how and what to store it in so that it doesn't update each time the outer while loop runs while still being inside the loop so it can be read through an indicator for the duration of the test. I hope this makes sense.

Also i have never used labview before this is my first attempt with very minimal instruction beyond here is the problem solve it.

0 Kudos
Message 4 of 6
(1,195 Views)

@T1p1ca1 wrote:

While I do appreciate the help in improving the efficiency of my flow, you didn't really answer the question of when I'm pulling the data out of the inner while loop to store for the duration of the program running, how and what to store it in so that it doesn't update each time the outer while loop runs while still being inside the loop so it can be read through an indicator for the duration of the test. I hope this makes sense.


Actually I believe that GerdW did answer your question. 

 


@GerdW wrote:


Use a wire and a shift register to store data in your loop…


I'm unable to look at your code myself as I only have LabVIEW 2019 installed (it's usually a good idea to back save your program a couple of LabVIEW versions for the forums as many do not upgrade to the latest version).

 


@T1p1ca1 wrote:

 

Also i have never used labview before this is my first attempt with very minimal instruction beyond here is the problem solve it.


Did you see the training materials at the beginning of this thread? They are a good starting point, and you will spend less time with them than you will in trying to write (working) code with no instruction.

 

These forums are great information sources, and many are ready to help you as GerdW did, but there is also some expectation that you put in some effort to help yourself. 
 

0 Kudos
Message 5 of 6
(1,187 Views)

@johntrich1971 wrote:


Did you see the training materials at the beginning of this thread? They are a good starting point, and you will spend less time with them than you will in trying to write (working) code with no instruction.

 

These forums are great information sources, and many are ready to help you as GerdW did, but there is also some expectation that you put in some effort to help yourself. 
 


I'm not going to lie, the training materials for LV are "messy" and, in my experience, incomplete. I've often read the training materials, read the documentation, and experimented with the code before posting only to be told I need to go to the training materials. There is a big gap between the training materials and practical coding.

 

That being said...

 


@T1p1ca1 wrote
I've run into an issue where I need to pull an array of load values from an array of waveforms and store those values for the duration of the testing. I currently can pull the load values but I can't think of a way to store it.

Gerd W. is on point. Same advice improved my code recently. Shift registers are the way to pass data between loop iterations.

 

If I were you I'd store the values you need in an array. Pass that array in a shift register. Add the code required to change that array when necessary. (Just a heads up, I'm new too.)

 

here's some info on shift registers

https://www.ni.com/getting-started/labview-basics/shift-registers

and here is a decent (Though basic) video on them

https://www.youtube.com/watch?v=wkjcHispZNY

 

And yeah, they can be grumpy on here. The answer may get buried in additional advice but that advice is pay dirt. It pans out. They've been doing it longer and can see things we can't.

 

 

 


___________________________________________________________________________________________________________________________________________________
Upgraded from intern to undergrad automation engineer. Attempting to explain to my employer why I need official training…. since I’m the groups only automation engineer.

I tried. I really did.
Message 6 of 6
(1,168 Views)