Benefits of Virtual Instrumentation-
Less expensive than actual bench top instruments and while replicating all the functions of
the instrument.
Ability to support custom requirements with minimal cost and testing time.
Better connected to PC technology such as analysis capabilities, remote control.
Product Used- LabVIEW 8.2
Challenge- Developing a fully featured, flexible, powerful and reliable Data acquisition
and control system for instruments implemented with Modbus protocol.
Solution- Establishing serial communication between all the instruments and a computer.
Develop an application in LabVIEW real time software which provides user interface to
acquire data from the instruments and supports various other features.
Description of Application-
In Radiochemistry Lab facilities like Gamma Area Monitors to detect -radiation
leakage, Ventilation System using filters to purify contaminated air etc. are available at
different locations for safe laboratory operation. Common features of all instruments are that
they are implemented with Modbus Protocol which provides internal standard to
microcontroller for parsing messages and contain RS485 serial ports for establishing serial
communication. A typical Gamma Area Monitor displays current Dose rate, Alarm status,
EHT value, Instrument address etc. and filters in Ventilation system measure Air velocity and
Differential pressure of air.
Central surveillance system developed using LabVIEW acquires all these parameters from
instruments on a computer. So from a computer all the instruments can be monitored and
controlled. A database of parameters is maintained on central computer with date and time
stamp for future reference. From central computer readings can be made available on Local
area network and alarms can be put on Public announcement system.
In the core of LabVIEW application is the development of drivers for instruments
implemented with Modbus protocol. Then making appropriate driver calls in other VIs to
collect data from each instrument one by one in a loop as fast as possible, displaying the data
in virtual panels created for all these instruments and updating data at regular intervals.
System Set-up-
Announcement System
Converter
(RS232 RS485)
Central Computer Daisy
chain form
(Labview application running)
Figure 1. System Topography
Central Surveillance System was developed to communicate with all the instruments
implemented with Modbus protocol and having RS485 serial interface. Serial communication
is established between various instruments (which are connected to each other in daisy chain
fashion) and a computer. A RS232 RS485 converter is required to convert RS232 signal
coming from the computer to RS485 signal going to instruments. RS485 standard provides
advantage of communication over longer distances (due to its differential signal which has
immunity to noise), communication at faster rates, connecting several data terminal
equipments (DTEs) in a network structure.
The central computer is connected to other computers in LAN to make use of features of web
publishing & email sending. LabVIEW application continuously runs on this central
computer to continuously acquire data.
Software Implementation-
Modbus protocol defines message structure that microcontroller of instrument will recognize
and use. In this project, it was implemented using asynchronous serial transmission over
RS232 and RS485 media. Microcontrollers were setup to communicate over standard
Modbus network using RTU (Remote Terminal Unit) transmission mode. The transmission
mode in serial communications defines the way Modbus messages are coded. In RTU mode,
each byte in a message contains two 4-bit hexadecimal characters.
Modbus message structure is shown below-
LAN
Instrument drivers were created in LabVIEW using various VISA functions.
VISA Configure Serial Port- Serial Port of computer is configured using parameters
VISA resource name (COM 1) baud rate (19200), data bits (8), stop bit (1), parity (none),
flow control (None), timeout (10 sec).
VISA Write- Sends Modbus message string to serial port of computer.
Modbus message is created using instrument address, function code, register address, No. of
registers and CRC (cyclic redundancy check) values. Instrument address and register address
are user inputs while function code and CRC are generated using these. An algorithm is
implemented in labview to generate CRC. All message fields are then concatenated to form
message string.
VISA Read- After some time delay (say 50 ms) VISA Read reads the message bits
available on serial port. Incoming message string is decoded to obtain desired value.
VISA Close- Finally, VISA session is closed.
For example to obtain Dose rate from Gamma area monitor addressed 100, Modbus message
values will be-
Instrument address- 100; Function- 04; Register address- 30001; No. of Registers- 01; CRC-
56 63
These instrument drivers were then used to create Virtual Panels for instruments. For Gamma
Area Monitor shown below
Figure 2. Gamma Area Monitor
Virtual panel looks like-
Figure 3. Virtual Panel for Gamma Area Monitor
It displays Dose Rate, Alarm Status, EHT value, set Alarm value etc which replicates actual
Gamma Area monitor. If alarm is present, it can be acknowledged from virtual panel itself.
Similarly virtual panels for other instruments can be created using those drivers.
A separate VI was created to display all instruments present in network simultaneously.
Figure 4. Main Panel*
It displays some parameters for each instrument. Detail analyses can be obtained for an
instrument by clicking for that instrument. If some instrument is not working in network, then
display for that instrument can be switched off to save time.
Application works in loop i.e. after acquiring data from instrument 1, it goes to instruments 2
to acquire data and after acquiring data from last instrument in the network, it comes back to
instrument 1. Readings for each instrument are updated in regular intervals of say 1 minute.
Average of 4-5 readings is calculated for each instrument in every 5 minutes and stored in a
file with time and date stamp for future reference.
*Testing was performed for two Gamma Area Monitors. But the concepts can be extended
for more instruments.
For every instrument calibrated readings are obtained. Average and std. deviation are
calculated from calibrated values to obtain 3 range for each instrument. These values are
stored in a reference file. For this job, a separate VI was created-
Figure 5. Configure Instruments Screen**
Here already set calibrated values for each instrument are displayed as soon as this VI is
opened. Reference file address, reading storage file address, total number of instruments
connected and calibrated values for each instrument can be modified here.
**Numeric blocks to enter calibrated readings are shown only for 4 instruments.
To view past readings or do 3 comparison, a separate VI was created.
Figure 6. Past Data Display Screen***
Here reading storage file name is entered to display contents of that file. It displays readings
with time & date stamp. A particular instrument can be selected to plot readings (mean of
readings) for that instrument with time on x-axis along with 3 range.
***A typical graph should look like this. Here readings of both instruments are zero due to
absence of radiations.
What initially available to operator is CSS Option Screen shown belowFigure
7. CSS Option Screen
CSS Option Screen
Configure Panel Main Panel History Panel
GAM-1 GAM-2 ….. Instrument- N
Calibrated Value Dose Rate Past
Readings
No. of Instruments Alarm Status Plot
with 3 range
References file EHT
Reading storage file Set Alarm
Instrument Drivers
LabVIEW 8.2-
As it can be observed, LabVIEW played an important role in entire project. Some general
properties are mentioned below which were useful -
Graphical Programming, which is unique feature of LabVIEW.
Various options (fonts, colors, decorations etc.) available to make front panel more attractive
and user friendly.
LabVIEW points out error by showing broken “run” button and exact location of error can
also be easily found out.
If correct results are not coming, “highlight execution” can be used to see the actual flow of
data in program.
Lots of in-built functions are available which can be directly used in program.
Lots of examples and LabVIEW HELP can be examined to clear doubts.
Some specific properties related to project are mentioned below-
VISA provides simple functions in LabVIEW which can be used to interface with serial port.
Various VI panels can be linked together i.e. control can be transferred from one VI to other
VI.
Web Publishing Tool makes it easy to make application available on LAN. Also using
functions related to sending email are very easy to implement.
Advantages:
Time- This application saves tremendous amount of time. RCL operator needs to sit in front
of central computer to monitor entire lab meanwhile he can perform his other works as well.
If some mishap happens i.e. radiation leakage then alarm comes on central computer within
seconds so immediate action can be taken. Operator can set the instrument parameters also
from computer itself.
If delay of 50ms is given between serial write & read and total number of
instruments connected in network are 16, then total time taken to obtain all readings once is
50ms*6*16 + 1sec(refreshing time) = 5.8 sec (quite small).
Past Readings- A very good feature of this application (which I also like the most) is that it
keeps track of past readings which can be used for future reference. Also various types of
analyses can be performed with these readings for e.g. 3 comparison. It is impossible
without using this application.
Availability on LAN- This application can be made available on LAN. So, higher
authorities of RCL can view status of instruments by giving URL of this application on their
computers. They need not to install LabVIEW on their computers also.
Conclusion:
Project aimed at developing a central surveillance system in RCL for functional facilities
available. The proposed system uses a LabVIEW application running on central computer
which provides GUI to monitor and control the instruments implemented with Modbus
protocol. Serial communication was established between instruments and central computer.
Other features like web publishing, email facility, voice announcement, past data storage
were added to make this application powerful.
No comments:
Post a Comment