From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence Locals: Undesired behavior when replacing single values with arrays

Solved!
Go to solution

We are using LabWindows to perform a signal suppression test.  Before we had two tones each at a single power level and single frequency, i.e. four local variables with single values.

 

We now want to sweep one of the tones over 16 power levels.  I first just replaced the one power level local with a comma-separated array of 16 values, but I got an error that the arrays were not consistent.  So then I replaced the single frequency value for that tone with an array of 16 identical frequency values, but I got the same error.  So then I replaced the power and frequency values for the second tone with arrays of 16 identical values.

 

Now the software "works", but the test is now run 16x16 times.  How am I supposed to modify the Sequence file so that the one tone is swept across the 16 different values, but the other tone just remains at the one frequency and one level for 16 total measurements?

 

NOTE:  I am very new to LabWindows.  I have extensive experience in C coding, but I am new to the TestStand Sequence interface.

0 Kudos
Message 1 of 3
(2,269 Views)
Solution
Accepted by topic author koughdur

Hi Koughdur,

 

I want to make sure I understand your setup from a high level. It sounds like you are using TestStand to call code modules written in LabWindows/CVI, correct? Do you know if it is calling your code module 256 separate times, or is it calling the code module once, but this code module is changing both tones at once? I'm trying to figure out if this is an issue with how you have set up your inputs/looping on the TestStand side, or an issue with your C code. 

Adena L.
Technical Support Engineer
National Instruments
Message 2 of 3
(2,237 Views)

You're right about the Test Stand sequence calling LabWindows C Modules.  I was not the one that wrote the C modules.  I've just been brought in to maintain the code since the original developer has left our company.

 

I thought the sequence was the thing that was getting the code to repeat, but it turns out the C module was the thing that was causing the C code to repeat.

 

We were able to get the code to repeat the proper amount of time by being more careful with assigning local values.

0 Kudos
Message 3 of 3
(2,221 Views)