diff --git a/SemiconductorTestLibrary.TestStandSteps/source/SetupNIRelayModules.cs b/SemiconductorTestLibrary.TestStandSteps/source/SetupNIRelayModules.cs
index f1f7fc15..07274998 100644
--- a/SemiconductorTestLibrary.TestStandSteps/source/SetupNIRelayModules.cs
+++ b/SemiconductorTestLibrary.TestStandSteps/source/SetupNIRelayModules.cs
@@ -12,6 +12,7 @@ public static partial class SetupAndCleanupSteps
/// If the input is provided, the step will apply the specified relay configuration.
/// Note that the relay configuration must be defined within the pin map, otherwise the step will throw an exception.
/// Supported devices: PXI-2567 and PXIe-6368.
+ /// This method expects each NI DAQmx task associated with relays in the pin map to have the Task Type set to "DAQmxRelay".
///
/// The object.
/// Whether to reset device during initialization.
@@ -21,6 +22,9 @@ public static void SetupNIRelayModules(
bool resetDevice = false,
string initialRelayConfigurationToApply = "")
{
+ // Note that the SetupNIDAQmxDOTask method has its own try catch block and should be called before ApplyRelayConfiguration,
+ // since the relay configuration being applied could have both 2567 and 6368 relays defined in it.
+ SetupNIDAQmxDOTask(tsmContext, taskType: "DAQmxRelay");
try
{
InstrumentAbstraction.Relay.InitializeAndClose.Initialize(tsmContext, resetDevice);