Views:

Alicat mass flow meter Setup in COMPASS for Flow

The read command to the Alicat flow meter is the ID of the flow meter. The ID can be viewed in the on-screen menus. The default ID is A and that is what I use for the read command.

The attached MS Word(R) file is the same as the below text. 

The device Raw and Final Output screens are the same as any other device. 

  1. Select the mass flow output (“Flow sccm” in this example) and then click on the [Edit Commands] button

  

  1. Enter a Read command of A and check the “Read Response” and “Process Response” boxes
  2. Select the “[Add/Edit Macro]” selection in the “Manipulate Response” drop-down to open the COMPASS Macro Editor                          
  3. Press the “New Macro” icon and press [Yes] to add a new function (macro) to the module: ReplyParser
  4. Select all of the text in the new macro and delete it
  5. Copy the below macro text and paste it into the new macro by pressing [Ctrl] and [v] with the cursor in the new macro window

 

'**************************************************

'This Function must return the fully formatted response

'of a device.  The output is used as the Raw output

'in the relationship determination of the Final Output.

'

'Reply     :Raw unmanipulated response of a device.

'ParamID   :Parameter ID of the device

'cRange    :Range class that the output applies to.

'

'The value is returned by setting the function name =

'to the calculated value..

'

'For example: ReplyParser64336 =  val(mid(rawReply,5))

'**************************************************

 

Function AlicatFlow(Reply, ParamID, cRange)

cDebug.LogStatus "Raw Reply = " & reply

 

'Alicat reply is pressure temperature mass_flow volume_flow gas (separated by spaces)

'Use Global macro qextract(teststring, Startseparator, EndSeparator, Separator)

    

'    AlicatPrs = qextract(reply,1,2," ")  'get the value before the first space

'          cDebug.LogStatus "Pressure = " & AlicatPrs

'    AlicatTemp = qextract(reply,2,3," ")  'get the value before the first space

'          cDebug.LogStatus "Temperature = " & AlicatTemp

'    AlicatVflow = qextract(reply,3,4," ")  'get the value before the first space

'          cDebug.LogStatus "Volumetric Flow = " & AlicatVflow

     AlicatFlow  = qextract(reply,4,5," ")  'get the value before the first space

           cDebug.LogStatus "Mass Flow = " & AlicatFlow

 

End Function

  1. Type in “Alicat Flow” as the Title of the macro (image below)
  2. Press the disc save icon to save the macro
  3. Close the COMPASS Macro Editor
  4. Select the AlicatFlow macro in the “Manipulate Response” drop-down
  5. Press the save icon to save the new command
  6. Press the [OK] button to close the “Command Editor” window
  7. Press the save icon to save the changes to the Alicat DUT
  8. Edit the commands for the Temperature and Pressure of the Alicat flow meter. Macros on following pages
  9. Run your device or test to check if it’s working

 

Function AlicatPrs(Reply, ParamID, cRange)

 

'Alicat reply is pressure temperature mass_flow volume_flow gas (separated by spaces)

'Use Global macro qextract(teststring, Startseparator, EndSeparator, Separator)

    

     AlicatPrs = qextract(reply,1,2," ")  'get the value before the first space

           cDebug.LogStatus "Pressure = " & AlicatPrs

'    AlicatTemp = qextract(reply,2,3," ")  'get the value before the first space

'          cDebug.LogStatus "Temperature = " & AlicatTemp

'    AlicatVflow = qextract(reply,3,4," ")  'get the value before the first space

'          cDebug.LogStatus "Volumetric Flow = " & AlicatVflow

'    AlicatFlow  = qextract(reply,4,5," ")  'get the value before the first space

'          cDebug.LogStatus "Mass Flow = " & AlicatFlow

End Function

 

Function AlicatTemp(Reply, ParamID, cRange)

 

'Alicat reply is pressure temperature mass_flow volume_flow gas (separated by spaces)

'Use Global macro qextract(teststring, Startseparator, EndSeparator, Separator)

    

'    AlicatPrs = qextract(reply,1,2," ")  'get the value before the first space

'          cDebug.LogStatus "Pressure = " & AlicatPrs

     AlicatTemp = qextract(reply,2,3," ")  'get the value before the first space

           cDebug.LogStatus "Temperature = " & AlicatTemp

'    AlicatVflow = qextract(reply,3,4," ")  'get the value before the first space

'          cDebug.LogStatus "Volumetric Flow = " & AlicatVflow

'    AlicatFlow  = qextract(reply,4,5," ")  'get the value before the first space

'          cDebug.LogStatus "Mass Flow = " & AlicatFlow

End Function

 

  1. Volume Flow is in the macro text but not shown in the outputs. Only setup Volume flow if necessary because setting it up will require you to specify and pressure and temperature device when initializing a test (even if you are not using the volume flow output)

End of Article