LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array mystery - have you seen this before?

Hi, Has anyone seen this before?

I have an array contant that sometimes change during run-time to an emty array. Just like magic! I then delete this emty array and replace it once more with an array constant and all is fine.

This does not happen every time the vi is run - just now and again. Can't find any reason for this as I have a lot of constants in my program and not all change.

I'm using this array for my serial write vi. Converting the array to a string using 'byte array to string' function and then writing the value to the serial port.

How can this be - I must say I'm very puzzled by this and would like to know if there's something I should know about array constants.

Thanks for the help,
Madri
0 Kudos
Message 1 of 3
(2,417 Views)
Is that array an array constant on the block diagram or is it an array control on the front panel with its content set to default?

Are you able to simplify the VI under question by removing anything that has nothing to do with the array and do you then still see the mysterious behaviour?
0 Kudos
Message 2 of 3
(2,417 Views)
Hi Madri,

So aou have it passing through a FOR loop which is autoindexed, and sometimes runs zero times? In this case, the default value for the data type is often passed on through the loop. This might be a problem.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 3 of 3
(2,417 Views)