Skip to content
This repository was archived by the owner on Mar 16, 2022. It is now read-only.
This repository was archived by the owner on Mar 16, 2022. It is now read-only.

Fix: Multi-waveform sweeping behavior in TestStand sequences #146

@mdwhitten

Description

@mdwhitten

@heyItsDale and I have both discovered that using multiple waveforms within the TestStand sequences does not work properly.

The fundamental issue is that TestStand doesn't allow using container arrays for the sweep loop. Hence, we cannot directly specify sweeping the Static_Station_Configs.Waveform_Configs array.

The current implementation is designed to work around this by sweeping another matched array. However, it seems like two different ideas were used by not tied together. The sweep loop sweeps an array of waveform names and applies the value to a local waveform name variable, like so:
image

However, when this waveform configuration is supposed to be selected in the Configure sequence, the Waveform_Index variable is used. This variable is never modified in the sequence. Hence, only the first waveform configuration is ever used, even though the waveform name is updated. This results in invalid data because a different waveform is used from the applied configuration
image

This implementation is also fragile because it depends on creating matched arrays of the same length as the waveform configuration, which is prone to error and difficult to understand.

My proposal instead is to use the TestStand API to retrieve the size of the Waveform Configs array, then increment the Waveform_Index variable for each element in the array.
image

This would:

  1. Make the process of adding more waveform configurations transparent to the user; when they are added they will be swept without user interaction
  2. Remove extra variables that make it difficult to follow
  3. Ensure that the number of permutations is known at edit time

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions