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: 

delete historical data from a table

What to do to delete historical data from a table.even when i turn of clients,and i re start the server,in the table the last value entered in a client showed up

1.png

0 Kudos
Message 1 of 12
(2,906 Views)

Dear achfire,

 

try

Select the Table (in Front Panel) -> Data operation > Empty table, then

Select the Table (in Front Panel) -> Data operation > Make current value default

 

Cheers,

 

Note1: you do not need the for-loo named "Maybe data beyond first column". Remove it. The "equal" and "all" will adjust accordingly.

 

Note2: do not (over-)use local variables. Just wire the i variable of the for-loop to the "NrOrdreSuivant" through the wall of the case-structure.

0 Kudos
Message 2 of 12
(2,896 Views)

thanks for the advice

 

about your solution i already used it,but it doesn't give me any result.the moment i run the Vi i get data in 6eme row(the last data i entered in a client),it doesn't matter which row but one row show up filled with data.

maybe some invoke node or spmething else i don't know,i think it's a shared variable problem

0 Kudos
Message 3 of 12
(2,887 Views)

Hi,

 

the table is connected to some OPC (?) data source via the shared variable engine. So on startup it will be filled with the last data the shared variable engine has stored for that item…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 12
(2,878 Views)

what to do to avoid that

0 Kudos
Message 5 of 12
(2,868 Views)

I never used that feature on my own, but I guess you can read values by direct access to the shared variable engine (SVE).

Then you would also gain access to a timestamp telling you the time the data was created and so you may differ between old and new data…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 12
(2,864 Views)

@achfire wrote:

What to do to delete historical data from a table.even when i turn of clients,and i re start the server,in the table the last value entered in a client showed up


Your Vi is full of race conditions because of local variable misuse. Fix that first.

0 Kudos
Message 7 of 12
(2,846 Views)

@altenbach wrote:

@achfire wrote:

What to do to delete historical data from a table.even when i turn of clients,and i re start the server,in the table the last value entered in a client showed up


Your Vi is full of race conditions because of local variable misuse. Fix that first.


Achfire:

 

I told you about the local variable problem yesterday.  http://forums.ni.com/t5/LabVIEW/check-if-a-row-is-empty-in-a-table-using-shared-variable/m-p/2837632...  How come you haven't fixed that yet?

0 Kudos
Message 8 of 12
(2,835 Views)

You also need to stop writing to indicators and their local variables in parallel. Both operations are equivalent so only writing to the terminal is all you need. Obviously you don't fully understand what a local variable is.

 

Before continuing with this project, you need to complete all LabVIEW tutorials first (e.g. here). Your current state of training is not suitable for what you are trying to do.

0 Kudos
Message 9 of 12
(2,827 Views)

thanks;i'll try your advices

unfortunately;i don't have time to check thoses tutorials,because i have to complete the project quickly.it's a race condition Smiley Sad

0 Kudos
Message 10 of 12
(2,814 Views)