LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

query

Hi all,

 

I would be gratful if someone can help me to solve this issue in my code.

 

As you can see from the attached code, I have an array with 39 elements, I want to rearrange it again by making the first and end three elements are equal to (-150), the problem is I made condition to make the for loop stop, but it runs only one time and stop suddenly without check the condition, Any idea?? Thanks in advance

 

Regards

0 Kudos
Message 1 of 4
(2,841 Views)

Hi rawachy,

 

oh gosh…

 

Any idea??

A lot of ideas:

- race conditions due to heavy overuse of local variables

- weird logic needs to be defined properly and applied to your data

- not using LabVIEW debugging tools

 

making the first and end three elements are equal to (-150)

Quite easy when taking you "word by word":

check.png

As said before: please define what you are going to do… 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,822 Views)

Hi GerdW,

 

Thank you so much for your quick support, to be honest, I didn't get your idea.

 

what I want to do from the attached array is that even when I change the place of element it gives me the three elements in the front and  the end respectively? does your picture solved this issue? Thanks again


Regards

0 Kudos
Message 3 of 4
(2,807 Views)

Hi rawachy,

 

why did you create this double post instead of sticking with your original thread?

 

Search for 6 consecutive elements with value "-150", then rotate your array to have the last 3 of them at the indices 0-2…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,763 Views)