LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared variable updating

Hi there:

 

I am using a shared variable as a reference to the index position in an array. After each iteration of my program I have the index selector increment +1. 

 

The selector itself is a shared  variable. So I basically use two blocks of the shared variable, one in write mode and one in read mode, separated by a +1 increment.

 

However my program is not executing as it should and I believe it is because the index did not increment. 

 

Is my method inherently wrong??

 

Thanks

0 Kudos
Message 1 of 5
(2,587 Views)

Please post your block diagram or code snippet - A picture paints a thousand words

0 Kudos
Message 2 of 5
(2,570 Views)

Here's the piece of code. Can I do that?

0 Kudos
Message 3 of 5
(2,564 Views)

I don't see why not it looks OK to me. 

I would wire up the error terminals as well.

Does it need to be a Network Published Shared Varaible - Have you tried changing to a Single Process Shared Varaible.

If you suspect it is not incrementing add an indicator to the output or probe the wires - run it in highlight execution mode.

0 Kudos
Message 4 of 5
(2,549 Views)

Ok I will try single process and wire up the error terminals.

 

Well basically these variables select the next index in an array. One of the arrays controls a time delay. I did not experience the time delay which suggested to me that the increment never occured and remained on index position 0 which is a 0 sec time delay.

 

I'll let you know what happens.

 

Thanks!

0 Kudos
Message 5 of 5
(2,540 Views)