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: 

Impossible to modify the value of cells while the VI is running

Solved!
Go to solution

Hello,

 

I'm trying to change the table values while the VI is on, but without success, someone can show me please how to do this.

 

Thanks

 

MGarry

0 Kudos
Message 1 of 13
(2,258 Views)
Spoiler
You are not reading from the table at all!

 


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 2 of 13
(2,248 Views)

In fact aCe i'm reading from the table in another VI, the values are transfered from it to an Excel file and i want to allow some flexibility to the programme by making changes after reading and saving them. If i can change the values in the LV table i can do the same with the excel file.

 

Thanks for your reply.

 

MGarry

0 Kudos
Message 3 of 13
(2,234 Views)

MGarry,

 

you are writing new values into the table every 6 seconds. So, if you made any changes, they will be overwritten because the data you write to the table is held in the shift register.

So instead of using a shift register, you can read from the table itself, add new stuff and write back using the local variable as you do right now. This is one of the rare cases, where a shift register might not be suitable for the task.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 13
(2,229 Views)

Ok Norbert, so how would i be able to perform the continuous reading if there is not any shift register, what do i have to add ?

 

MGarry

0 Kudos
Message 5 of 13
(2,224 Views)

Put the table terminal into the loop and read from that instead of the shift register. Delete the shift register (and connected wires) but keep the writing local variable referring the table.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 13
(2,221 Views)

I can't make it work this way maybe there is something i'm missing or doing badly, please if you could modify the VI i posted that'll be nice.

 

MGarry

0 Kudos
Message 7 of 13
(2,217 Views)
Solution
Accepted by topic author MGarry

MGarry,

 

something like this:

ReadTableDirectly.PNG

 

 

Please note that this does not reset the table content if you rerun the VI. You might want to add some code for that.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 8 of 13
(2,212 Views)

Thanks Norbert this is working,

 

MGarry

0 Kudos
Message 9 of 13
(2,202 Views)

there is something else, after doing the changes, i'm trying to modify directly from the Excel file and it seems to be impossible, i guess in order to do that Labview should be able to read from the Excel file while it's writing to it, can this be done ?

 

MGarry

0 Kudos
Message 10 of 13
(2,197 Views)