MORECHEMISTRY.COM::MORE CHEMISTRY ON THE WEB    
Home Member Area Links Events Publications Promotions
 

LabVIEW drivers - Bronkhorst FlowDDE


Bronkhorst controllers and indicators using FlowDDE

Bronkhorst controllers and indicators are great instruments to control the flow of gasses and liquids. These instruments can be addressed through various protocols such as DeviceNet™, Profibus-DP®, Modbus or FLOW-BUS. This document describes a LabVIEW driver for FLOW-BUS devices that are communicating with a DDE server called FlowDDE.

DDE allows to exchange data between programs. While there is one DDE server there can be several DDE clients. The DDE server can be used to perform tasks that can only be performed by a single program instance (e.g. communication through a serial line) but of which the data should be available to or even be changable by other programs (e.g. MS Excel or LabVIEW).

Using FlowDDE as DDE server allows programs such as FlowPlot, FlowPlot and LabVIEW to simultaneously communicate with the connected FLOW-BUS devices.

Program principle

Using LabVIEW with FlowDDE goes like this:

  1. run the DDE server; FlowDDE
  2. for all channels create a DDE reference
  3. if a setpoint has changed on screen write it to FlowDDE
  4. for all channels read the process value from FlowDDE
  5. at fixed time intervals repeat the previous 2 steps until the STOP button in pressed
  6. for all channels remove the DDE reference (in reverse order)

Driver specifics

The FLOW-BUS protocol defines some 330 parameters that, if defined for a specific device, can either be read or written or that can both be read and written. The presented LabVIEW driver can be used for the 2 most common parameters: setpoint and process value. Additional parameters, such as valve position, can easiliy be added.

What should be known for each device is its channel number and its nominal range. On the LabVIEW BlockDiagram there should should be a reference for each control (setpoint entry) and indicator (process value display).

The driver communicates with an instance of FlowDDE. Since FlowDDE must be running, the driver will automatically start  FlowDDE if it isn't already running. In order to make this work it must be known which instance of FlowDDE must be used in which mode (real or simulated) and the folder in which FlowDDE can be found.

The driver comes as a functional global which can perform the following 3 tasks: initialize, update and terminate. 'initialize' takes the abovementioned parameters and creates references to the related DDE items. 'update' will update the setpoint of a device if the setpoint on screen has changed and every nth time (10th time by default) updates the process value readings. 'terminate' closes all the DDE references.

The following sample shows how to implement the LabVIEW driver for 4 mass flow controllers.

FrontPanel for FlowDDE sample

[FrontPanel]

Blockdiagram for FlowDDE sample

[BlockDiagram]

The number of mass flow controllers can easily be expanded by putting more control and indicators on the FrontPanel and by expanding the arrays on the left side on de BlockDiagram.

Download

bronkhorst-flowdde.zip


This file includes:

  • bronkhorst flowdde module 1.vi for use with FlowDDE
  • bronkhorst flowdde module 2.vi for use with FlowDDE2
  • bronkhorst flowdde module sample.vi the abovementioned sample program
  • bronkhorst flowddde.llb a library of files required by the other VIs

Remarks

  • All VIs have been created with LabVIEW 2011 SP1 Professional Development System
  • Bronkhorst provides only 2 instances of FlowDDE, additional copies don't work as additional instances. This means all used devices can be distributed over (no more than) 2 serial lines.
  • Occasionally using DDE technology may cause some loops in your LabVIEW program to go to sleep, only to wake up after a mouse movement or click.
  • For flowmeters provide a dummy reference for the setpoint.

See also


Bart Boshuizen, 2012/09/13

 


© copyright 2000-2014, morechemistry.com
design by Bb.