LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How would you make a Card Sorting interface

Solved!
Go to solution

Hey Guys,

 

I could you some advice and direction. I'd like to write a Vi that will do the following:

 

 

In data enter mode:

Write a string and have it added to the top of an array

In Data sort mode:

Go through all the strings in the array from the first element to the last element and allow you to choose to send it to the last position or have it stay where it is.

After both of those modes are executed I would like it to save the array as a text file.

 

I'm tried a few things with clusters and case structures but I suspect I'm barking up the wrong tree. Is there a function or two that are native to lab view that will make this super easy for me?

 

Thanks in advance for all your help..

C.

 

0 Kudos
Message 1 of 2
(2,071 Views)
Solution
Accepted by topic author liegev

Create a state machine

Create a shift register and put your array into it => this will keep your array in memory

 

On event go to state "DATA ENTER" => add a string to the top op your array with build array => after this go back to state "IDLE"

On event go to state  "DATA SORT" => go through your initial array

Make sure you create a second array which is a copy of your first to do the moving of elements.  With index array you can read you current element, delete from array removes your current element en build array can put your current element at the back of your array.

After you looped through your initial array => go to state "SAVE" and save your file

 

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 2 of 2
(2,055 Views)