LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a Table to display previously entered values.

Solved!
Go to solution

Hello,

 

I am seeking advice on how I should go about setting up a table to be used as an indicator for previous values entered into a form. I tried looking at other questions on forums but none are really asking what I am looking for. Currently I have a form that asks for three things, a two digit carrier number, a string, and another string. It's in a cluster so I assume I will have to convert it to an array of the same data type to be able to send it to a table. 

 

What I don't get is how to set the table up to repeat only once the submit button has been pressed, storing the value on the next row each time the button is pressed. I have never used tables before so any advice would help. I went over the tutorials, they didn't help much, and I have looked in the manual. 

 

Thank you!

Download All
0 Kudos
Message 1 of 10
(1,996 Views)

Here are my SubVIS (part 2) 

 

I figured by seeing how the code runs it would help understand what i am asking. 

0 Kudos
Message 3 of 10
(1,988 Views)

Not able to view your code because of multiple attachments, based on my understanding with your information, you want to update table repeatedly (holding previously updated values) in this case use table properties to (Read/write options available)

Read the existing values and append current iteration value and write back to table.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 10
(1,945 Views)

Yes! I have a form made currently, so each time they 'submit' the form it should add a new row to the table with the information they submitted, then begin again on the new row. 

 

The table would be nothing more than an indicator. I tried using a the Build Table function but couldn't wrap my mind around it. My data is in a cluster so I assumed I would need to change it to an Array. 

 

Could this be done with a while loop? or does it have to be a for loop?

0 Kudos
Message 5 of 10
(1,915 Views)

Remember a Table is nothing more than a String Array with a fancy front panel indicator.

 

All of the Array functions operate on a Table exactly the same.

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 10
(1,903 Views)

Hello Paintman,

Update this piece of code in your application

 

TableupdateBasic.png

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 7 of 10
(1,887 Views)

I am testing this out, for table controls and data form when they say "[abc]" are those constants made from the table and form? I tried using the cluster of my data to sync with the first property node in the second half but it says my data types are different. Is there a way to change what data types the node is looking for? 

0 Kudos
Message 8 of 10
(1,871 Views)

@paintman wrote:

I am testing this out, for table controls and data form when they say "[abc]" are those constants made from the table and form? I tried using the cluster of my data to sync with the first property node in the second half but it says my data types are different. Is there a way to change what data types the node is looking for? 


Not able to understand your Problem, For Changing Data type use Variant to Data, if your Input is Variant.

Already you have an Array after conversion same can be used for Building Table Array.

 

Note Table is a 2D Array of Strings.

PalanivelThiruvenkadam_2-1681503568385.png

 

 

If you are still having is data type conversion, be specific on what is your Cluster Data and Expected Datatype?

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 9 of 10
(1,852 Views)
Solution
Accepted by paintman
Spoiler

My data is in a cluster so I assumed I would need to change it to an Array. 

 Hi Paintman,

if you have your data in the cluster, you probably don't need to convert cluster to array. You can use "unbundle" or "unbundle" by name to extract data out of a cluster as shown below in my code below.

GRCK5000_1-1681523727622.png

Try to update your code to this below. Shift registers are very good; they allow you to update your table while saving previous data.

GRCK5000_0-1681524628768.png

Below is how maybe you should modify your code. I hope it gives you an idea.

GRCK5000_0-1681525810243.png

 

Front panel

GRCK5000_1-1681525864909.png

 

 

Message 10 of 10
(1,837 Views)