LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can we apply range of integers in labview

hello everyone 

 

 

in labview can we make range of integers like  

 

where a=10 , x has some value

b = (1:a)*x;

 

c=[1 , d(1 : a-1)];

 

 

 

can anyone tell me how to implement these two functions in labview

 

0 Kudos
Message 1 of 11
(2,925 Views)

are you looking for "in range and coerce" function?

0 Kudos
Message 2 of 11
(2,912 Views)

i am trying to implement these functions but these functions have range ,

 

 

i dont know how to put range in labview

0 Kudos
Message 3 of 11
(2,904 Views)

I meant the function is readily available in labview

 

inrange.png

0 Kudos
Message 4 of 11
(2,896 Views)

I don't understand your notation, but you might find a For loop helpful.  You can put your expressions inside the loop and evaluate it over the range as the loop executes, or you can wire "i" out and put the expression outside of the loop to operate on the values as an array.

 

Example_VI.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 5 of 11
(2,883 Views)

in range and corge is not  what i am searching for 

 

 

it just checks whether this integer x lies in the given range or not 

 

 i want to give range not want to check 

0 Kudos
Message 6 of 11
(2,864 Views)

The case structure input can be configured to specify multiple integer values separated by commas and also ranges denoted by ellipsis...

 

http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/case_selector_values/

 

integer case statement using ranges.png

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 7 of 11
(2,855 Views)

I'm with jmarcody, you want to use the FOR loop with autoindexing the values out.  The result will be an array of numbers.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 11
(2,847 Views)

I think you are looking for something like the Ramp Pattern.vi

http://zone.ni.com/reference/en-XX/help/371361K-01/lvanls/ramp_pattern/

0 Kudos
Message 9 of 11
(2,821 Views)

Also, math functions can work on arrays in their entirety.  You don't necessarily need to index through an array to operate on each element individually.

 

Though depending on the function, or the complication in the math, you may need to iterate through the array, and For Loops with auto-indexing are a big help there.

0 Kudos
Message 10 of 11
(2,807 Views)