LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detect numeric change from a indicator

HI all ,

 

   I have some trouble ,

i need to receive the data from database , how can i use labview to check that the table is add a new row ?

i want to check number of the row in the table so that i can see wether the number of row in the table have changed.

i have tried to use shift register and event structure , but i fail .

is there any other method ? or example to do this ?

 

Thank you !!

0 Kudos
Message 1 of 9
(4,597 Views)

Why does a shift register and event structure not work?

Here's how I would do it:

- Create a while loop, and add a shift register.

- Have an event structure, triggered by a value change in the table.

- Put your data in an 'array'.

- Initialize the shift register with the original array.

- Inside the event structure, use the 'array size' function the new array and the old array

- compare the values of the number of rows.

- if they are different, a row was added/deleted

Message Edited by Cory K on 03-20-2009 12:02 PM
Cory K
Message 2 of 9
(4,595 Views)

Dear Cory K  ,

      Thank for your help !

 

now , i can use SQL to know the size of my table

oh..sorry  , i still can;t understand , do u have some example ?

 

 

0 Kudos
Message 3 of 9
(4,592 Views)

I made a simple example to show you how to implement this logic.

See if you can follow the attached VI.

Let me know if you have any more questions.

Cory K
Message 4 of 9
(4,553 Views)

Thank you

But i can't open it , as i don't have VI 8.5

do u have 8.2 or just pastle the image to me ?

 

 

0 Kudos
Message 5 of 9
(4,541 Views)
Here you go. Also did a little modification to Cory K's code so that you can see the results more clearly.   🙂
Message Edited by ssingh1 on 03-21-2009 08:07 AM
Message Edited by ssingh1 on 03-21-2009 08:08 AM
0 Kudos
Message 6 of 9
(4,499 Views)

Hehe ssingh1, he said he cant open 8.5 because he has 8.2, so you modified my code and attached it in 8.6Smiley Wink

Thanks though.

 

Anyway, I reattached the code in 8.2

Cory K
0 Kudos
Message 7 of 9
(4,478 Views)

Cory K wrote:

Anyway, I reattached the code in 8.2


It's still in 8.5 😮

 

Your example is quite flawed (why local variables, why slice out colums to get the number of rows? Why no stop event? Why is there a timeout event? Why do we need a shift register?)

 

Here's a quick alternative.

 

Message Edited by altenbach on 03-21-2009 09:33 AM
Message 8 of 9
(4,472 Views)

I'm still in the phase of figuring out how to make a VI function properly.

Coding correctly and efficiently is an entirely different ballgame Smiley Very Happy

Cory K
0 Kudos
Message 9 of 9
(4,440 Views)