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

LabVIEW device simulators - West MODBUS


Introduction

While it is necessary to have the proper device drivers for the development of LabVIEW applications it can also be necessary to have some device simulation tool. With a device simulator the software can be tested without the actual hardware being available which has some obvious advantages. One advantage is that software development doesn't stop if the hardware is unavailable and another advantage is that software maintenance can be carried out on another PC than the deployment PC.

If you want to simulate West temperature controllers and limiters then the provided LabVIEW tool provides a solution as it emulates devices using the Modbus protocol. It will not emulate all possible functions but it does emulate the two basic functions, 'write setpoint' and 'read process value'.

Usage principle

The simulator can be used on the same computer on which you develop your LabVIEW application or on a separate simulation computer. In either case a real physical serial connection must be made. This also ensures the serial port can be tested even before the actual devices are present.

Changing a setpoint on your application will be received by the simulator which will change the corresponding simulated process value by moving it toward the setpoint. This resembles a real system which is enhanced by adding some noise to the process value.

The directory which contains the simulator also contains an ini file. This file describes which comport must be used and which devices must be simulated. Temperature ranges don't have to be provided since the data is transfered as actual values, not a percentage of full scale.

If the ini file doesn't exist then running the simulator will create it with default values. For the comport this will be COM1 and for the device addresses this will be 1 and 2.

The ini file looks like this:

[device settings]
temperature controllers addresses = "1,2"
com port = "COM1"

User interface

On the user interface there are 3 main sections

CommunicationsSimulated DevicesStatistics
A list containing the received commands and the responses given.
A list containing the simulated process values and the requested setpoints.
The lower part of this section allows the user to change the 'setpoints' for limiters.
A few ways to check the activity of the system, including a graph displaying the number of calls per second.

Download

simulator west modbus.zip

Remarks

  • All VIs have been made with LabVIEW 2012 SP1 Professional Development System.
  • The main vi, library and ini file should all be in the same directory.
  • While using the simulator the cable for serial communication should be a NULL modem cable.

Bart Boshuizen, 2013/10/23


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