LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to define in the optional the clause, the maximum value of a colum

Hello agaion becktho,

 

I've been thinking about it and i thought the best way to import the last row written(that is what i want to import) is knowing all time the number of rows written (select...numrows...using fetch....) and when this values changed import all the data and select the last row with an index array.

BUT the problem  i have is that know all time the number of rows using fetch block......the machine works at 100% and for this reason is not a good solution.

How can i do to work only at 10% o something like this.

The best solution it would "a block" or a command that only import the data when a new row has been written in the database......then it would be more efficient.

Do you think i have to open a new topic with this last question....a command or a funtion to import only all the table or only the last row with a new row has been written in the database.

 

Thank you very much

 

Larson 

 

0 Kudos
Message 11 of 15
(901 Views)
I already wanted to know, who writes the data into the database.
Is this your application or is this something else?
 
I think this is important to know.
 
One cannot give tips to improve a system, if one doesn't know how the system looks like.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 12 of 15
(900 Views)
Hi,
the database is written by another "person". I just can access to this information by the connection to database. But I know that a new row is written each (more or less) 5 seconds...and i have to import this last row calculate some things and obtain a point.....this thing 400 times each batch. Every day there is 3 batches.
 
This is the information you required?
 
Thanks for helping me
 
Larson
0 Kudos
Message 13 of 15
(896 Views)
Ok - so this doesn't make it easier, but there are different ways to solve this problem.
 
You could maybe implement a mechanism to comunicate with the other app, so that it can tell your software that a new dataset has been stored.
 
Do you have to make this calculations also each 5 seconds or would it be no problem if you process several datasets?
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 14 of 15
(884 Views)
I think the best solution is ask for the numbers of rows....if this number has changed read all data and select the last one. This operation has to be done each five seconds (with an stack sequence and a delay).
In this way the machine only works hard an instant each five seconds.
 
For me this solution is good.
 
Thanks for all your reports and all your time spend in it.
 
Larson
0 Kudos
Message 15 of 15
(881 Views)