Views:

This COMPASS for Pressure Test macro stops pressure control when the raw output of the pressure switch (Device Under Test, or DUT) reaches 24 volts. Note that the Controller must have an Abort command in its setup file if the controller is not setup as an Autodetect device in COMPASS for Pressure.

Here is the code to use in the COMPASS Macro Editor. Need to make a new Test Macro and copy/paste this text into it.

 

Function AbortControlAt24V(iT, iL, iC, iP, cTest, cConfig)
     cdebug.LogStatus "Output: " & cConfig.DUTPrs(1).RawOutput1

If bAborted =1 Then Exit Function 'Only abort once then exit. This macro is only good for a test with one setpoint.    
     ' Need bAborted note In _Declaration Test Macro

     If abs(cConfig.DUTPrs(1).RawOutput1 - 24) < 24 * 0.1 Then  'Aborts when pressure within 0.1% of target 24 V    
         cdebug.LogStatus "within range to abort"
         cConfig.SetPrs(1).IoSetOutput 0,0,2
         bAborted = 1
     'cCOMPASS.TestPoint 1,10    'this will average for 10seconds
     End If

End Function

 

Here's a screen-shot of the macro in the COMPASS Macro Editor

 

If you have questions please contact Fluke Calibration Pressure Technical Support at the below link or by calling +1.877.355.3225

Here's an article for a pressure switch test without macros,
Pressure Switch Test in COMPASS for Pressure