MORECHEMISTRY.COM::MORE CHEMISTRY ON THE WEB |
LabVIEW drivers - Bronkhorst FlowDDE
[LabVIEW vi collection]
[LabVIEW links]
[LabVIEW bookstore]
[programming topics] [drivers] [device simulators] [utilities] [projects] [events] [related topics] Bronkhorst controllers and indicators using FlowDDEBronkhorst 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 principleUsing LabVIEW with FlowDDE goes like this:
Driver specificsThe 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] [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
Remarks
See also
Bart Boshuizen, 2012/09/13
|
|