LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Weird behaviour of Replace Array Subset !

Hi All,

Today, I encountered (am still encountering actually) a weird behaviour with the Replace Array Subset icon.

In my program, I use a Insert Into Array icon at one place.

I replaced it (using Rt Click Replace) with the Replace Array Subset icon, it showed broken wires.

So, I replaced it (using Rt Click Replace) with the Insert Into Array icon, it showed NO broken wires.

Now, I did Undo (Ctrl+Z), it got replaced with the Replace Array Subset icon, but with NO broken wires.

I'm stunned to see this weird behaviour... !

But the program behaviour remains the same respectively for these respective icons.

Even the other way around also results in the same behaviour of the Replace Array Subset icon.

Normally, a Replace Array Subset icon cannot have two arrays of the same dimension connected to it, it'll show broken wires.

Now, I replaced the Replace Array Subset icon with the Insert Into Array icon, it shows NO broken wires.

Then, I did Undo (Ctrl+Z), and to my disbelief, it showed NO broken wires.

Can experts explain me about this, if it is my fault of LV programming, I mean Undoing, or LV's odd behaviour ?

I'm using LV7.1

Regards & Thanks,
Partha.
- Partha ( CLD until Oct 2027 🙂 )
Message 1 of 9
(4,995 Views)
I tried it and got the same results.  Hmmmm, strange indeed.  I then ran the vi and got expected results, the array elements were replaced.  See attached vi in LV7.1
- tbob

Inventor of the WORM Global
Message 2 of 9
(4,968 Views)
LabVIEW should not let you wire arrays of the same dimension to both the "array" and "new element/subarray" inputs of the Replace Array Subset function.  While I've never used it this way, apparently this is legal for Insert Into Array.  When you perform an undo, the wire should become broken again.  Similar behavior is reproducible in 8.2.  I've filed a bug report (ID #40LD2E1W) for this issue.
Message 3 of 9
(4,941 Views)
Turns out my explanation was a bit too general.  It is OK to have 1D arrays wired to both of these inputs of a Replace Array Subset, and to have 2D arrays wired to both inputs provided that both indices are wired.  In your case, only one index was wired, and in this case, the array element/subarray should be a broken wire.  Regardless, it is the fact that the wire does not break again after the undo following the replace that is an issue for investigation.
Message 4 of 9
(4,928 Views)
hi bob,

I tried to do all the steps that U've given in Ur post.

After some runs, I switched to program other VIs and ran those VIs for some time. After that I came back to Ur VI in its last edited settings (as per Ur instructions given), and pressed the Continuous Run button directly.

I encountered these bizzare behaviour of LV, which I've attached with this post.

The prog is actually running, but Continuous Run button stays pressed, Stop button is bribht Red, and even Pause button works too. I'm confused a lot.

All my other VIs Run & Work perfectly.

Pls analyze & explain these things that I cant understand.

Regards,
Partha.
- Partha ( CLD until Oct 2027 🙂 )
Download All
Message 5 of 9
(4,893 Views)
When you press the Continuous Run button, it stays pressed until you press it again.  This is normal behavior.  Stop button will also be bright red, normal behavior.  You can stop the continuous run by pressing either the continuous run button or the stop button.
- tbob

Inventor of the WORM Global
Message 6 of 9
(4,865 Views)
hi bob,

pls see my pics closely, you'll notice that the free run button is normal even when the continuous run button is pressed...

also the pause button is enabled bright red, highlet bulb is also enabled, but still the VI is not running at all !

rgds,
Partha.
- Partha ( CLD until Oct 2027 🙂 )
Message 7 of 9
(4,858 Views)
Hmmm, doesn't do that on my system.  I don't have a clue.  If the pause button is bright red, the vi is paused, which is why it isn't running.  What caused it to go into pause if you didn't press the pause button, I don't know.
- tbob

Inventor of the WORM Global
Message 8 of 9
(4,841 Views)

As Jeff B mentioned...

This was reported to R&D (# 40LD2E1W) for further investigation.

Thanks,

Travis H.
LabVIEW R&D
National Instruments
Message 9 of 9
(4,686 Views)