From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

I need to insert a number into an array for every 15 mins continuously..

I need to insert a number into an array for every 15mins continuously..and the array need to hold all datas for example in 0th position i insert a value 10 by 10.00am, after that at 1st position i need to insert 11 by 10.15am, next at 2nd position i need to insert 12 by 10.30am and so on...how this can be done

 

Can anyone help me in this...

0 Kudos
Message 1 of 9
(3,374 Views)

Start with the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

When you are ready to start programming, you'll be looking at Build Array, shift register, while loop, and elapsed time Express VI.

0 Kudos
Message 2 of 9
(3,373 Views)

Hi cgk - 

 

I've thrown together a fairly simple approach to what I believe you are asking for. This kind of approach you will learn in the basic training courses for LabVIEW. So, if you wish to learn more about  what is going on, I suggest you seek further training.

 

I haven't included any conditioning on the number display; have used only 5 seconds as the time compare; and the loop will run as fast as it can until the stop button is pressed. Also, the array won't be displayed until you press stop... Comments included.

 

However, here is something you can start working with for now. Enjoy. 🙂

 

David.

0 Kudos
Message 3 of 9
(3,339 Views)

Problem description seems incomplete. Where is the value to be inserted coming from?

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

Iam Sick of this code.... i hope you can get some idea on this, it continuously loop . but it can give an output every 15 mins. as you said  0th position i insert a value 10, 1st position i need to insert 11. try to evaluate and do what exacly waht you want.. 

 

 

insert num to array.png



Thank you & Best regards
syrpimp

=======================================================
“You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley
0 Kudos
Message 5 of 9
(3,273 Views)

Hi Syrpimp - 

 

A good idea. You probably don't need the While loop here, as the For loop will run its course as per the number of required iterations.

 

To go the other way, you could get rid of the For loop and place all shift registers on the While loop and use the loop iteration number instead.

 

Of course, that depends on how the original poster inteads to implement his code.

 

One thing I will say is, you need to be careful on using the Wait vi - it will hold that For loop up for 15 mins, thereby removing any focus on the Front Panel. This means you can't stop the loop or program until the For loop is finished (No.of.Data x 15mins), or perform any other action.

0 Kudos
Message 6 of 9
(3,255 Views)

I'm glad to here those point from you David, thank you for boosting those out... and I will  note on those.  you will absulotely determine i am a rookie by that code.   Smiley Happy  lesson learn.



Thank you & Best regards
syrpimp

=======================================================
“You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley
Message 7 of 9
(3,246 Views)

The Quotient Remainder Function is kind of pointless when you divide by 1.  The remainder is always zero in that case.

0 Kudos
Message 8 of 9
(3,215 Views)
Long waits in inner loops are a bad idea, because they block any reasonable user interaction. Use the timeout case of an event structure instead, or poll with the elapsed time express VI.
0 Kudos
Message 9 of 9
(3,207 Views)