From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string or hex number split/divide in same number.

Solved!
Go to solution

hello this is not working, Im getting random values..

let me explain the my conditions again, there should be only 4 cases as i have only 4 conditions.

 

if 

N< N1 then case 1 should execute,

if N> n1 and less than n2 then case  2 should execute,

If N>n1,n2 and less than n3 case 3 should execute,

If N>n1,n2,n3 last case 4 should execute.

 

inside the case im performing some mathematics operations.  

 

0 Kudos
Message 21 of 27
(498 Views)

Hi new123,

 


@newmemeber123 wrote:

if 

N< N1 then case 1 should execute,

if N> n1 and less than n2 then case  2 should execute,

If N>n1,n2 and less than n3 case 3 should execute,

If N>n1,n2,n3 last case 4 should execute.


Try this:

Keep in mind: LabVIEW (like any reasonable programming language) starts to count ranges at zero, so you get cases 0…3 (instead of 1…4) for 3 nx values…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 22 of 27
(486 Views)

its showing threshold error array with bad terminal i know why its showing like that. now all the values are scalar not array because i removed previous error i was using indexing tunnel not previous value thats why it was giving output as a array not scalar now its giving scalar.

 

is there any example if the values are scalar not an array?

0 Kudos
Message 23 of 27
(476 Views)

if 

N< N1 then case 0 should execute,

if N> n1 and less than n2 then case  1 should execute,

If N>n1,n2 and less than n3 case 2 should execute,

If N>n1,n2,n3 last case 3 should execute.

0 Kudos
Message 24 of 27
(461 Views)
Solution
Accepted by topic author newmemeber123

Hi new123,

 


@newmemeber123 wrote:

is there any example if the values are scalar not an array?


Is it really this complicated to adapt my suggestion to your "only scalar values" requirement?

Really???

 

(Do you really need to post your requirement again in a new message?)

 

 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 25 of 27
(458 Views)

@newmemeber123 wrote:

its showing threshold error array with bad terminal i know why its showing like that. now all the values are scalar not array because i removed previous error i was using indexing tunnel not previous value thats why it was giving output as a array not scalar now its giving scalar.

 

is there any example if the values are scalar not an array?


The solution I posted earlier does exactly what you are asking. I don't see why you are struggling this much when several correct solutions have been posted.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 26 of 27
(437 Views)

its working now. thanks 

best regards

0 Kudos
Message 27 of 27
(412 Views)