NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Initialize numeric array to a sequence of values

Solved!
Go to solution

Is there a way of using TestStand array expressions to achieve the functionality that LabVIEW ramp by delta function has: https://forums.ni.com/t5/LabVIEW/how-to-best-initialize-array-to-sequence-of-values/m-p/3360005/high...

0 Kudos
Message 1 of 7
(3,609 Views)

Hi SumitN,

 

The attached sequence file uses a for loop with an expression to generate a similar vector to the ramp by delta but this begs the question: why wouldn't you just use that function in LabVIEW and output the result back to TestStand?

Regards,
0 Kudos
Message 2 of 7
(3,577 Views)
Solution
Accepted by topic author SumitN

Hi SumitN,

 

If you wanted to do this within TestStand, rather than call a LabVIEW VI, it can be easily be implemented through a Statement step:

 

Create Ramp Data - Sequence.PNG

This can be achieved by configuring the expressions and looping as follows:

 

Create Ramp Data - Expressions.PNG

 

Create Ramp Data - Looping.PNG

 

I've attached an example sequence with the above step included.

 

I hope this helps.

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

Message 3 of 7
(3,568 Views)

@DJColeslaw

Creating a VI just to create a array of sequential values seems an overkill since this seems like a simple task which can be done in TestStand expressions. All I need is an array with an increment/delta of 1. The other option is to call "Ramp pattern by delta.vi" from vi.lib in program files but this will create a headache for me for deployment.

 

I wasnt able to open your sequence since its in TestStand 2017 whereas I am at 2016.

0 Kudos
Message 4 of 7
(3,553 Views)

@CharlieRodway

 

Thanks this was what I was looking for.

0 Kudos
Message 5 of 7
(3,551 Views)

No problem, glad I could help! Smiley Happy

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

0 Kudos
Message 6 of 7
(3,548 Views)

@SumitN,

Thanks for the reply and sorry for the version conflict! That definitely makes sense, I just wanted to understand your use case in case there are additional alternatives which weren't being covered. Sounds like a simple looping statement will cover it for you, though. Have a good one!

Regards,
0 Kudos
Message 7 of 7
(3,535 Views)