Object-Oriented Technology in LabVIEW Programming
Kirill Rybaltchenko
JINR, DUBNA
Abstract
LabVIEW[1] is a powerful graphical package accessing
any type of equipment of accelerator′s controls andoffering well-designed Graphical User Interface (GUI).
This paper consider the questions about LabVIEW
programming in Object-Oriented manner and integration
LabVIEW to the high-performance distributed ObjectOriented software system using modern technologies(CORBA).
1 Introduction
Now LabVIEW becomes more and more populardevelopment environment to create a software controllingthe different kinds of equipment in the control systems ofaccelerators. The control group of the SPS and LEP
accelerators at CERN, Geneva, uses LabVIEW to control
different accelerator subsystems, such as Beamloss monitoring system, Hydrostatic levelling system, Bunchlength
measurement system, etc. LabVIEW uses a software
package (SL-EQUIP) to access any equipment connected
to any fieldbus (BITBUS, GPIB, RS-232, JBUS) remotely[2].

Fig. 1For example, in the Multi-Orbit Positioning (MOPOS)
Timing Diagnostics system the LabVIEW program runningon HP workstation controls 9 GPIB-oscilloscopes installedaround SPS ring (fig.1). And sometimes the controlled
system has a dynamically changeable configuration. For

example, in the Time-Division Multiplexing Monitoring
system the LabVIEW collects data from more than 70points installed around accelerators and every point has
different changeable configuration. In this example
LabVIEW uses an ORACLE [3] database as aconfiguration database. In those examples there are strong
requirements for the program flexibility: program shouldbe able to connect to or disconnect from the system its
different parts dynamically, keep current information
associated with active parts of system. In that case theimplementation of the OOP technology seemed to be very
useful. Of course, we cannot say about OOP in a fullmeaning because of the LabVIEW graphical programming
language ″G″ is not an Object-Oriented language. But
some aspects of OOP are applicable and could give someprofit.
Let′s consider a system of several devices, for instanceoscilloscopes, like in the MOPOS Timing Diagnostics
system. We can suppose even more complicated system:some of that scopes are Tektronix TDS-320, another are
Tektronix TDS-210, some of them have RS-232 port
instead of GPIB interface. And the configuration of thesystem may be changed: operator can include or exclude
some devices from the data acquisition process in the runtime. In that case an implementation of OOP could help toavoid extra-complexity.
What is the typical way to write the OO program fordevice in C++? We create the class of devices describing
entire family of devices, for instance scopes TDS-2xx andTDS-3xx. This class contains function-members to
perform on that family of devices and all data-members
containing the information about the current state ofparticular device. It may be the following functions:
VerticalSetup, HorizontalSetup, GetData, etc. This classcontains the Constructor and Destructor as well.
Constructor, for instance, allocates memory for dataassociated with this device instance, opens connection tothe device, performs device initialisation sequence, reads
start-up values of device parameters. Destructor puts thedevice back to the local state, terminates the connection
and release memory, allocated for this device instance. If
we′d like to create a class for TDS-210 device, forinstance, we create a subclass of this basic class andredefine the members unique for this particular device
type.
How this methodology can be implemented in a
LabVIEW programming? Normally all devices in family
have the same set of functions. They differ from each otherjust in a format of command and response, number ofcontrolling parameters. We create a global data table
describing all common commands and parameters (fig.2).
This table is sharing between all device instances.

Fig. 2

Fig. 3
When constructor creates an instance of device it creates a
local data table containing all elements unique for thisinstance. All tables have the same fields. For instance,′Horizontal′ field contains the format of command/response string and current Horizontal settings of the device. And
the member-function HorizontalSetup sends takes fromthis field appropriate command, sends it to the device,
extract all parameters from the device response using
format response string and put all parameters to theirplaces. So there is only one function HorizontalSetup for
all devices. The block-diagram in fig.3 demonstrates how it
can be implemented.
This small program opens connection to three devices ofdifferent type with different interface types. MTEK_Initialize.vi (Multiple Device Constructor) creates theinstances of all devices and puts the array of references tothese instances to all other functions. There is no need totake care about properties of every device functions pickup all what it need from data associated with that device
and pointed by this reference to device instance.
Another important part of implementation OOP inLabVIEW is the communication between LabVIEW
program and Front-End computers or between different
Back-End applications (one or more of them are theLabVIEW applications) running on the different computers. If both applications are object-oriented, the oldfashioned communication software becomes bottleneck ofsuch system. Now the CORBA [4] standard becomes moreand more popular as a communication environment in theobject-oriented software. An ILU [5] is one of the CORBA
realisations which was tested for the Front End – Back Endcommunication. The evaluation of ILU figured out thatLabVIEW could be integrated easily in the distributed
computing system using CORBA standard and the modern
CORBA realisations like ILU could be implemented for
the Front-End – Back-End communication.
Acknowledgements
I would like to thank my colleagues in SL division(CERN) and in LCTA JINR (Dubna) who helped me totest and to develop this software.

References[1] LabVIEW − trademark of National Instrumentcompany.
[2] Integrating Fieldbuses at the application level: C
interface and LabVIEW integration − VITA Europe
Congress 7-9 Oct. 1996, P.Charrue, K.Rybaltchenko.
[3] ORACLE − trademark of ORACLE corporation.
[4] CORBA − Common Object Request Broker Architecture standard developed by Object ManagementGroup.
[5] ILU − Inter-Language Unification system − freesoftware package developed by Rank Xerox
company.