Views:

The Mensor CPC6000 controller is setup as an Example Device in COMPASS for Pressure and can be used to create a new device by making a new Support Device, choosing Mensor as the Manufacturer, and CPC6000 as the Model, then pressing the "Find Previous Setup" icon  to select its example setup file.

However, that setup does not include a Ready/NotReady command so this is how to set that up. The attached MS Word(R) file is the same as the below text/images.

Mensor CPC6000 Ready/Not Ready Command Setup in COMPASS for Pressure

Sending the command Stable? to the CPC6000 returns Yes/No (with a space before them) depending on stability setting. Use the “Use Ready Status” feature on the Set tab of the Support Device setup in COMPASS.

1. Click on the [Edit Ready Command] button

 

2. Enter a Read command of Stable? and check the “Read Response” and “Process Response” boxes

3. Select the “[Add/Edit Macro]” selection in the “Manipulate Response” drop-down to open the COMPASS Macro Editor

  

4. Press the “New Macro” icon and press [Yes] to add a new function (macro) to the module: ReplyParser

5. Select all of the text in the new macro and delete it

6. 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
'colRange  :Device Range class that the relation ship applies to.
'
'The value is returned by setting the function name =
'to the calculated value..
'
'****************************************
Function CPC6000Ready(Reply, ParamID, colRange)
 
'CPC6000 Ready/Not Ready query command is "Stable?" (without quotes)
'Reply to that is " Yes" or " No) (without quotes)
 
If left(Reply,3) = "Yes" Then
'If InStr(query,"Y") > 0 Then    'alternate method. uncomment/comment lines as necessary
     CPC6000Ready = 1 'Ready
Else
     CPC6000Ready = 0 'Not Ready
End If
 
End Function

7. Type in “CPC6000Ready” as the Title of the macro (image below) Press the disc save icon  to save the macro. View of the completed macro is below

9. Close the COMPASS Macro Editor

10. Select the CPC6000Ready macro in the “Manipulate Response” drop-down

11. Press the save icon  to save the new command

12. Press the [OK] button to close the “Set Ready Command Editor” window

13. Press the save icon  to save the changes to the CPC6000 Support Device

14. Run your device/test to check if it’s working