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.
- Select the mass flow output (“Flow sccm” in this example) and then click on the [Edit Commands] button
- Enter a Read command of A and check the “Read Response” and “Process Response” boxes
- Select the “[Add/Edit Macro]” selection in the “Manipulate Response” drop-down to open the COMPASS Macro Editor
- Press the “New Macro” icon and press [Yes] to add a new function (macro) to the module: ReplyParser
- Select all of the text in the new macro and delete it
- 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
- Type in “Alicat Flow” as the Title of the macro (image below)
- Press the disc save icon to save the macro
- Close the COMPASS Macro Editor
- Select the AlicatFlow macro in the “Manipulate Response” drop-down
- Press the save icon to save the new command
- Press the [OK] button to close the “Command Editor” window
- Press the save icon to save the changes to the Alicat DUT
- Edit the commands for the Temperature and Pressure of the Alicat flow meter. Macros on following pages
- 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
- 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