LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Overwriting same data in Table

Solved!
Go to solution

Hi

 

I am using an table in LabView to store some CAN data. My Table is now overflowing with data that have the same values. My question is if someone knows how to overwrite the data in a table if the data is the same.

 

Example if the first row has data: 12 30 12 and this comes on again that the row will be updated with the same value.

0 Kudos
Message 1 of 5
(1,020 Views)
Solution
Accepted by topic author VH_NIELS

Hi VH,

 


@VH_NIELS wrote:

I am using an table in LabView to store some CAN data. My Table is now overflowing with data that have the same values. My question is if someone knows how to overwrite the data in a table if the data is the same.


A table is a 2D array of strings: to replace subsets of an array you should use the ReplaceArraySubset function…

Best regards,
GerdW


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

Hi,

 

I think i formulated my question wrong. 

 

I am receiving data from a device. I am storing all the data in a table (2D array). The problem is that the data keeps filling up the table.

I can prevent this by overwriting the data if a single row pops up that is the same of an row that is already in my table.

 

I hope you understand my problem better.

0 Kudos
Message 3 of 5
(993 Views)
Solution
Accepted by topic author VH_NIELS

Hi VH,

 


@VH_NIELS wrote:

I am receiving data from a device. I am storing all the data in a table (2D array). The problem is that the data keeps filling up the table.

I can prevent this by overwriting the data if a single row pops up that is the same of an row that is already in my table.


And what is the question? Now it seems you already know how to prevent "overflowing the table"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(983 Views)
Solution
Accepted by topic author VH_NIELS

Well maybe if you posted your code we would get a better idea of what you mean. But in general I would say use the Arbitration ID to determine what the packet holds and where in the table to write its contents.

========================
=== Engineer Ambiguously ===
========================
Message 5 of 5
(954 Views)