08-23-2017 04:54 PM - edited 08-23-2017 05:02 PM
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
08-23-2017 05:44 PM
08-23-2017 05:50 PM
UGHHH I attached the wrong file..here it is
08-23-2017 05:52 PM
Please give your file unique names. I am already up to "test(15).vi" in my downloads folder.
08-23-2017 05:55 PM
sorry..here it is
08-23-2017 07:38 PM
Any clue ?
08-23-2017 08:15 PM
Sorry I won't be near a computer for a while ...
08-23-2017 10:14 PM
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?
08-23-2017 10:20 PM
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 ?
08-23-2017 11:34 PM
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?