08-06-2014 08:36 AM
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
08-06-2014 09:27 AM - edited 08-06-2014 09:28 AM
Please post your block diagram or code snippet - A picture paints a thousand words
08-06-2014 09:31 AM
Here's the piece of code. Can I do that?
08-06-2014 09:40 AM - edited 08-06-2014 09:43 AM
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.
08-06-2014 09:47 AM
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!