LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

arrays

HI

well I am having some troubles with the arrays...I want to have an array with 2 elements which takes data continuously each second from a source and store them in those 2 locations,

e.g.. a value been stored as the 0 element and the next value comes from the same source will be stored as the new 0 element and the value already there (in the 0 element) will be passed to 1st When. when the next value comes in, the value in the 1st element will be deleted and the value in the 0 element will be stored in the 1 element and goes on like that..

can you give me a clue how to do that please.

PS I want to have recognize to recognise when the temperature values going up and when the temperature values going down..comparing the 2 elements in the array.

0 Kudos
Message 1 of 6
(3,152 Views)
You will need shift registers to pass from one iteration of the loop to another.
0 Kudos
Message 2 of 6
(3,144 Views)
I think this should do what you need, plus a little.  Remove the wait statement when you integrate the rest of your code. LV7.1.1

Paul
0 Kudos
Message 3 of 6
(3,141 Views)

Hi,

A far less complicated way of doing things (if you only need the temp going up/down) is shown in the following example.  By simply using a shift register and a compare function you can see when the temperature has increased from the last itteration.

(you may want to add timing into the loop to slow it down...)

Hope this is helpful

 

AdamB

NIUK

Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 4 of 6
(3,110 Views)
thanks mate, it is working, now I am integrating it with rest of my code...
thanks a lot to everybody who helped me out..
cheers
sureshiu
0 Kudos
Message 5 of 6
(3,088 Views)
Here's another variation of the theme. 🙂
0 Kudos
Message 6 of 6
(3,068 Views)