LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

repeat a repetitive value for a given time

Hi to all: I have this VI and its respective invocked .txt files. You select one of these files and it spreads an array with a number sequence, the second part takes value by value of that array to show each one as a integer number for 1.5s. 

 

I have two questions:

 

1. What can I do to to repeat that number sequence in the integer number (called "valor" in the VI) form for a given time (40 or 45 min for example)??

2. How can I get every value of "valor" out of the for loop in real time?? (to show "valor" out of the for loop in real time)

 

Thank you! Smiley Happy


Carlos Ignacio Sarmiento
Electronic Engineer
(Ciudad Madero Technological Institute)
Laboratory of Bioelectronics, Biohospital Engineering Departament
National Institute of Neurology and Neurosurgery "Manuel Velasco Suárez" (Mexico City)
0 Kudos
Message 1 of 7
(2,499 Views)

these are the files:


Carlos Ignacio Sarmiento
Electronic Engineer
(Ciudad Madero Technological Institute)
Laboratory of Bioelectronics, Biohospital Engineering Departament
National Institute of Neurology and Neurosurgery "Manuel Velasco Suárez" (Mexico City)
Download All
0 Kudos
Message 2 of 7
(2,498 Views)

I apologize, this is the VI 


Carlos Ignacio Sarmiento
Electronic Engineer
(Ciudad Madero Technological Institute)
Laboratory of Bioelectronics, Biohospital Engineering Departament
National Institute of Neurology and Neurosurgery "Manuel Velasco Suárez" (Mexico City)
0 Kudos
Message 3 of 7
(2,487 Views)

it is hard to make any sense about what you are saying? according to your block diagram...you are getting your array value and converting it to a U32 then convertin again to a string, then again to a dbl and a I32...very confusing.

 

you can do this with a simple while loop, shift regs. and timer...i try and stay away from flat sequence programming as you cannot transition as well as a state machine architecture.

0 Kudos
Message 4 of 7
(2,469 Views)

try not to use the wait(ms) function for your programming timer (CLD requirement). Elapsed Time Vi can be your friend...

 

Spoiler
repeat.png

 

0 Kudos
Message 5 of 7
(2,452 Views)

I was reading about auto indexing propiety and I found to do it easier than the first one (without DBL or I32 converters), but it is still the same problem... How to repeat all the sequence in an easy way with this?


Carlos Ignacio Sarmiento
Electronic Engineer
(Ciudad Madero Technological Institute)
Laboratory of Bioelectronics, Biohospital Engineering Departament
National Institute of Neurology and Neurosurgery "Manuel Velasco Suárez" (Mexico City)
0 Kudos
Message 6 of 7
(2,436 Views)

the problem is that the "for loop" will run dependent on the Ncount or array size, which ever is smaller. Use of a "while loop" is repeatable...

 

a different take using Quotient & Remainder...

 

Spoiler
contadorMOD.png

 

0 Kudos
Message 7 of 7
(2,418 Views)