From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing values in shift registers

Hi everyone, iam currently working on a project using the DAQ assistant for ELVIS II to acquire data like voltage, current and power from an evaluation board through analog inputs. I created a case structure with a DAQ Assistant in each of the cases to calculate and display the data. I realised this is not the 'correct' method as the acquired data are of different timing, therefore not accurate. Iam trying to use shift registers to store the values of  the DAQ Assistant, so that the same values can be used for all the case structures. Any ideas on how to store them to be used for different cases ? any help would be appreciated. Here is part of my code.

Thank you

0 Kudos
Message 1 of 3
(2,040 Views)

Hi Bobby,

 

am trying to use shift registers to store the values of  the DAQ Assistant, so that the same values can be used for all the case structures.

Where are you actually trying to use shift registers? I don't see that in your image…

 

Any ideas on how to store them to be used for different cases ?

Use shift register(s)…

 

any help would be appreciated.

When you need to learn about shift registers I recommend to take the FREE online learning resources offered in the "Training" section in the header of the LabVIEW board!

 

Here is part of my code.

No, there is no code. Not even "part of code". All you attached is an image of part of code!

How would you react on someone posting an image of some C code???

Best regards,
GerdW


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

All values of controls that are outside the case structure are available inside the case structure, but you definitely don't want to plug it up with inner interactive loops, so get rid of that. Use the outer loop to spin the code of the various states! Also all your properties only need to execute when the inputs change. There is no point hammering them 10x/second with the same values. It is also sufficient to have a single enum. You can branch the wire to the various nodes. Yo could even iterate over an array of references to simplify.

 

A lot of advice depends on what's in the various cases and how the subVIs function internally, but since you only attach a picture we cannot help further.

 

In the meantime, I strongly suggest learning about proper coding practices and e.g. avoid right-to-left wires and subVI connectors that exit on all sides. It is difficult to debug code that looks like a birds nest. Most likely all inner your subVI needs is two connectors: (1) dynamic array in. (2) cluster out (and maybe error terminals in their usual location). Simplify!!!

 

(also spell check your diagram comments)

0 Kudos
Message 3 of 3
(1,992 Views)