04-22-2020 07:43 AM
hi
i have empty array i want to add adjustable number to first array by pushing button
then by pushing the button again the adjustable number goes to second array without losing my first number and continue doing this.
04-22-2020 08:04 AM
On the first page of this Forum, there is a section called "LabVIEW Training Resources" which list Tutorials and Videos that you should view and follow. You need to learn about more than putting fancy gadgets on a Front panel. If you have had some programming experience (Basic, Matlab, C), some of the LabVIEW concepts may seem familiar, but the power in LabVIEW comes from some of its "unconventional" components designed to make it an Engineering Workbench. These include the concept of Data Flow, the use of Time as almost a "data type" (including a number of tools and data structures built around data sampling, such as the Waveform data structure), how data acquisiition and process control arise "naturally" (and how easy it is to collect data with DAQmx).
Once you've spent a little time (and you should have plenty of time now) with this material, you should be more than able to start over and design a VI (or VIs) that will do this task for you.
Bob Schor
04-22-2020 08:23 AM
I recommend you learn about the following concepts:
1. While Loop (repeat code until you give it a stop condition)
2. Shift Registers (hold data from previous iterations of a loop)
3. Event Structures (easily detect when a button is pressed)
04-22-2020 09:11 AM
this vi is what i did with while and case structure and shift register.
do you have any idea to make it optimized?
Thank you.
04-22-2020 09:20 AM - edited 04-22-2020 09:35 AM
1. Store your array in the shift register.
2. Use Replace Array Subset to update the one value you care about.
3. How often should this array be updated? If you only want it updated on a button press, then use an Event Structure with the button's Value Change event to update the array.
4. You need to supply a real stop condition on your loop. Do NOT rely on the Abort VI in the toolbar to stop your VI. A simple Stop button on your front panel will do the job.
04-22-2020 12:26 PM