cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

sequential frames not working

This is my goal:

I have 4 numbers

lets say : 3,4.3, 6,1

I start from level 2 let's say

I want to first 

3 - 2 ( starting level)  = 1 

Then for integer numbers send 1 x 20 digital signal ( so 10 true)

then wait 5 second then read the next number so

4.3- 3 ( previous number) = 1.3 ( so 1 integer part, .3 float part)

send 1 x 20 ( integer part x 20) + 3 ( float part) x 2 = 26 times ( 13 true)

and wait 5 second

then next number

I want this pattern be read 5 times

 

the problem is it only reads the last two elements of the array. if I run the first frame that reads the element separately in another vi it works perfectly but not here..any idea why

0 kudos
Mensaje 1 de 13
4.458 Vistas
  • Reduce it to a simpler problem without DAQ and shorter times. Just use a front panel LED.
  • You still don't initialize the shift registers
  • Place reasonable values into the controls and make them the default before saving
  • Some of your subtractions can result in a zero or negative number and the innermost loop will not iterate at all for these.
  • You use floating point numbers in your example above, but iterations need to be integers.

 

 

0 kudos
Mensaje 2 de 13
4.426 Vistas

UGHHH I attached the wrong file..here it is

0 kudos
Mensaje 3 de 13
4.422 Vistas

Please give your file unique names. I am already up to "test(15).vi" in my downloads folder.

0 kudos
Mensaje 4 de 13
4.419 Vistas

sorry..here it is

0 kudos
Mensaje 5 de 13
4.416 Vistas

Any clue ?

0 kudos
Mensaje 6 de 13
4.394 Vistas

Sorry I won't be near a computer for a while ...

0 kudos
Mensaje 7 de 13
4.387 Vistas

What are reasonable values for the "Pattern" array (currently it is empty). Your VI uses 100% CPU when not doing anything. Are you sure "switch until released" is the correct mechanical action for the "Run" button?

Shouldn't the "Pattern" array autoindex on the outermost FOR loop? Your code in the true case completes in nanoseconds, so you won't see anything interesting. Should't there be some delays?

 

 

0 kudos
Mensaje 8 de 13
4.363 Vistas

You are right about the switch . Wrong choice 

I even added 5 second time delay and still nothing happened 

I tried to rewrite it with a state machine instead . I feel kind of dumb ! If I want it to run sequentially should I pass the next state to the shift register ? Then how can I pass the values too ?

0 kudos
Mensaje 9 de 13
4.360 Vistas

Again, what are typical values for the "Pattern" array? I cannot test with an empty array.

 

How are you running this? What do you expect to see?

0 kudos
Mensaje 10 de 13
4.345 Vistas