The manual provides a step-by-step instructions on how to create a Device Monitor for a typical instrument which can input some data and return the corresponding readings.
Here, instead of creating a new Device Monitor, you adopt an existing one – from a Knauer P41S HPLC pump. You convert it into a West 6100 temperature controller with decimal data readings.
Step 1. Open OpenFlowChem project file and open the Monitor_KnauerP41S_v7.vi Device Monitor.


- Save as a new file (File → Save As → Open additional copy). Save under a new name.

- Make changes to the front panel. Change the log name prefix.

- Open the “Control” tab. Change names of the Numeric controls as in the screenshot.

To save the value of the control, go to the main top menu → Edit → Make Current Values Default

- Move the Ramp field downwards in line with the “Enact setpoint” button. You do it to underline that the original HPLC pump Device Monitor has 1 input and 2 outputs. You need to change this to 2 inputs, 1 output.

- Change the “Alarm” tab – rename the only Numeric Control to “Max temperature (C)”. This is the L2 alarm temperature – the unit will shut down if the current temperature exceeds the Max temperature.

- Open the last “External” tab. Change the expected type of the IN and OUT references.
(Open the OpenFlowChem project side-by-side. Select the correct IN type definition and drag it inside the IN reference. You take the West_IN, the type definition with a single input and 2 output.) You may need to create a new type definition for the Device Monitor you have. (Open a similar existing IN type definition, Save As → open a new copy under a new filename. Add any required Controls. Change the icon.)

- Drag the OUT type definition into the OUT reference the same way as in the previous step.

- Change the comment right from the type definitions

- Change the icon – Double click on the existing Device Monitor icon. Change the icon according to your taste and close the icon window.

- Adjust the VI description. Press Ctrl+I to open the VI properties. Change the category to Documentation and adjust the VI description as required.

- Open the Block Diagram (Ctrl+E) to make changes to the functions of the Device Monitor.

- Go to the left flat sequence titled “External control check for correctness”. Change the message which will be shown in case of problems with IN/OUT type definitions.

- Go to the top-most Datalog Flat Sequence shown below.

- You have only one variable, current temperature, to log instead of two currently present. You also need to rename the title string – change the “Liquid (uL/min)” into “Temperature (C)”. Also change the format string to %5.1f – the temperature is read only with one decimal.
- Remove the second element of the LOG Data array because you need to log only one value. Here, you remove the reference to the Control input (you can remove the reference safely because it does not change the actual indicator).

You may need (but not in this example) to create a new reference – right-click on the corresponding control on the front panel → Create → Reference. Move the reference created on the Block Diagram to the corresponding connection of the Log Data cluster.

- Resize the Log Data cluster array by dragging the block. Here, you have only one value to log, so you form an array of Log Data cluster with only one element.

- Now we move further down to the main cycle. Go to the “initialise” state.

- You need to remove the initialisation VIs here.

- You need to put a VI that enters the correct communications settings and can unambiguously confirm that the correct unit is attached.
Here, we already have a library with the (simplistic) drivers for the unit. You may need to create a driver of the instrument and check the existing NI driver database and the NI forums.
To open the driver, go to the West decimal library provided.

- Put the west_comm_init.vi from the library instead of the removed VI by dragging from the library.

- Wire the inserted VI from the corresponding COM number and the error wires.

- Move to the next “read” state. Remove the VI that communicated with the pump, but do not touch the Numeric Indicators.


- Put and wire the VI that reads the current temperature from the unit (west_comm_read_temp.vi from the library).

- Wire the current temperature indicator and move the Ramp indicator out of the state selector.
- Move to the “write” state. Remove the existing VI that deals with the HPLC pump we are no longer interested in. Move the Ramp indicator inside this case.
- Here, we need to put a VI that sends the setpoinds to the unit. It is much better to have a VI that not only sends the setpoint, but also checks if the setpoint sent was correct. The corresponding VI is present in the West library – West_macro_rampT.

- Convert the Ramp indicator into the control (Right click on the Ramp terminal → Change to Control). Wire the Setpoint temperature, Ramp, COM port, and the error wire to the Setpoint set/confirm VI.


- Move to the “end” state. Remove the VIs that are irrelevant to the West temperature controller we are doing.
- You need to close the connection, but put a safe setpoint prior to it. Place the same VI that sends and confirms the setpoint values. Also place a VISA close VI from the standard VI set (Instrument I/O panel).

- Wire the VIs and put the standby values to the setpoint set VI (in our case, we put 0 temperature and 0 ramp = immediate as defined by the West 6100 controller).

- Move to “alarm check” state.
Change the message in case of the alarm – “Temperature too high”.
Change the local variable from “Ramp (C/h)” into “Current temperature”. (Left click on the local variable terminal → select “Ramp…”)

Here, if the Current temperature exceeds the maximum temperature, the system returns L2 alarm flag as True.
- Move to the last “error” state.
In case of an error, we put the output values to NaN (not a number). In this example, it is only the current temp. Remove the Ramp value Local variable.
Replace the initialisation VI for the pump with the initialisation VI for the west controller used in the “initialise” state.
Change the error message to be shown when the connection is lost completely.
- Correct the Error message
- Move to the bottom, to the While cycle with the external control.
The IN type definition, you should change the setpoint temperature and ramp when the Device Monitor is commanded to enact the setpoint.
Left click on the black “Set temp (0)” and select the value we need – “Set temp (0)”. This way we put the setpoint temperature from the IN type definition into the Device Monitor.
- Expand the “Unbundle by name” field by dragging it from the bottom boundary. Ensure that the value appearing is the “Set ramp, C/h (0)”.
- Copy the local variable “Set Temp” (hold Ctrl and drag it) and change it into the “Ramp (C/h)”. Wire the new local variable to the Ramp in the cluster created in the previous step.
- Move down. Remove the “Ramp” local variable wired incorrectly to non-existent “P (bar)” of the cluster.

Remove the incorrect “P (bar)” of the cluster by dragging the cluster upwards from the bottom.
- Change the non-existent “Flow (uL/min)” into “Curr temp” by clicking on “Flow (uL/min)” and selecting “Curr temp” from the menu.
- Done!