LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calcuating continutiy in a data arary

Solved!
Go to solution

I wanted to calculate the continuity in data array. And I used the following logic

 

C=0;

J=0;

A=[1 2 3 4 10 11 12 15 16 19];

B()=0;

For(i=0,i<=size of A ,i++)

{

If [A(i+1)-A(i)==1]

C=C+1;

Else

{

B(J)=C;

J=J+1;

C=0

}

}

 

My output should be

3

2

1

0

 

I tried to build this in Labview but i am facing problem if the “else” part of logic.

Kindly help me,

thanks in advance

0 Kudos
Message 1 of 7
(2,574 Views)

Hi Rajesh,

                Can you please explain what actually you are trying to achieve without providing your text based code?

  

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 2 of 7
(2,569 Views)
Solution
Accepted by topic author Rajeshkumarc

Hi Rajesh,

 

Please check the attached vi. I tried to build the logic you explained.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
Message 3 of 7
(2,567 Views)

Hi Rajesh,

 

Please check the attached vi. I tried to build the logic you explained.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
Download All
Message 4 of 7
(2,566 Views)

@danil33 wrote:

Hi Rajesh,

                Can you please explain what actually you are trying to achieve without providing your text based code?

  


It seems to me a kind of homework application 🙂

 

-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 5 of 7
(2,561 Views)

Hi Rajesh,

 

Use this vi to get all the continuities for your given data array.

 

Anand kumar SP
Senior Project Engineer
Soliton Technologies Pvt Ltd
Message 6 of 7
(2,548 Views)

Thanks a lot for your support. . its working. .

0 Kudos
Message 7 of 7
(2,518 Views)