4.3.5 Active Read on Trigger (ART) ............................................................................................................... 19
4.3.6 Active Write on Trigger (AWT) ............................................................................................................. 19
5 Data Manipulation Features......................................................................................................................... 20
5.3.1 Math Function as a Moves Function .................................................................................................... 33
5.3.2 Standalone Math ................................................................................................................................. 34
5.3.3 Math Usage Example: .......................................................................................................................... 34
6.1.1 Node Status Function ........................................................................................................................... 44
9.3Enable on RS-232 Port .............................................................................................................................. 59
10 Hot Standby ............................................................................................................................................ 60
10.3.1 Single Port Server: ................................................................................................................................ 64
10.3.2 Dual Port Server: .................................................................................................................................. 64
10.3.3 Tiers – SCADA and PEX ......................................................................................................................... 65
10.3.4 RUINET functions for Hot Standby Mode 2 .......................................................................................... 65
10.3.6 Server Name......................................................................................................................................... 67
10.3.7 Application example using Hot Standby Mode 2 ................................................................................. 67
10.3.8 Configuring the FieldServer for Hot Standby Mode 2 .......................................................................... 68
10.3.8.1Hot Standby Status Function ...................................................................................................... 68
10.3.8.2Cable Status Function ................................................................................................................. 69
Appendix A. Useful Features ................................................................................................................................ 70
Appendix A.1. Using comments ............................................................................................................................... 70
Appendix A.2. Using conditional process statements ............................................................................................. 70
Appendix A.2.1. Disabling the Client side of a configuration: .......................................................................... 70
Appendix A.2.2. Disabling a Node .................................................................................................................... 71
Appendix B. Reference ........................................................................................................................................ 73
Appendix B.1. Working with the Driver Manuals .................................................................................................... 73
The FieldServer functions as a gateway enabling different devices utilizing different protocols to interface with
each other. The FieldServer solves communication and protocol conversion problems and improves response
times in distributed data acquisition and control systems. The extensive driver library available from FieldServer
Technologies provides a wide range of interoperability solutions. For a current list of available drivers visit our
website at www.fieldserver.com.
The FieldServer also acts as an Ethernet gateway, enabling new and legacy PLCs, RTUs and SCADA devices to link to
Ethernet for plant-wide communications.
®
Depending on the model, the FieldServer is equipped with combinations of Serial, Ethernet and LONWORKS
as well as various Fieldbus ports. The internal poll-block caching capability insures that data from Server devices is
immediately available to the Client devices when needed. Data can be cached from slower devices or remote units
for immediate access by the Client device. See Section 8 for details.
The Hot Standby option for the FieldServer is available when dual redundancy is required. See section 10 for
details.
ports
1.2 App l ication
Today’s plants are integrated, intelligent facilities requiring multiple mechanical and electrical systems to be
controlled from a central processor. Many of these devices are not part of the central automation system, but that
system still needs data input from these devices.
Through its powerful protocol conversion capability the FieldServer allows system designers and managers to
connect unique instrumentation and sensor devices onto common protocol systems and into the plant Ethernet
backbone. Due to its internal poll-block caching, multiple protocol capability and high port count2, the FieldServer
improves data and machine update time compared to conventional HMI packages using multiple drivers and port
expanders.
The FieldServer is designed to enable devices within a facility to communicate with each other or to a central
control station via Serial, Arcnet, Ethernet or other communication busses. Two-way communication is easily
available between the various process and control systems.
1.3 Terminology
1.3.1 No des
The devices communicating with the FieldServer may be referred to as “Stations”, “Nodes”, “RTU’s”, “DCS’s”,
“Workstations”, “SCADA Systems”, “MMI’s”, “Field Devices”, etc. To prevent confusion these devices are always
referred to as Nodes in this manual.
Similarly, “Device Address”, “Station Address”, “Station ID” is always referred to as “Node ID” in this manual.
LONWORKS® is a trademark of Echelon Corporation registered in the United States and other countries.
Except for FS-X20
Nodes may have the same Node_ID value, so long as they are connected to different ports.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
A Client Node can request data from and write data to a Server. In Process Control and Building Automation
applications, it is accurate to describe a Client as a device that receives status and alarm data from a Server, and
writes setpoints and control points to the Server.
In a FieldServer application, there is a Client/Server relationship on each network coupled to the FieldServer. It is
therefore typical that the FieldServer acts as a Client and a Server at the same time. Figure I below illustrates this.
Figure I - Client/Server
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
The FieldServer functions as a bridge between two or more different Nodes (see Figure II). The information is
gathered by the Client side of the FieldServer from the Server Nodes via a Serial Port, Ethernet port or plug-in card.
Nodes may use different protocols and even different communication busses. The Client Node Descriptors contain
information about each Node including connection ports and protocol. Each Node is given a Node_Name and a
Node_ID. The data from a Server Node is stored on the FieldServer in a Data Array. The exact location as well as
the format of the information is determined by the Map Descriptors. The FieldServer can contain any number of
Data Arrays, but each Data Array can only store data in one format. The Client Map Descriptors describe where
the information is to be stored on the FieldServer, and the Server Map Descriptors describe how this information is
able to be accessed by a Client Node. On the Server side of the FieldServer, virtual Nodes are created to convert
the information stored in the Data Arrays to the format required by the Client Node. These Nodes can be accessed
by any of the available ports on the FieldServer at any time. The FieldServer thus acts as a Client and a Server
simultaneously.
Figure II - FieldServer Operation Theory
Example:
Consider a Modbus PLC with a set of 10 high alarms in address 00001 to 00010.
A Map Descriptor is allocated to fetch Data Objects from Modbus address 00001 length 10 and save this data to a
Data Array named PLC1, offset 20. The high alarm for sensor number 5 on PLC1 is thus stored in Data Array PLC1;
offset 24 (the fifth location starting at offset 20).
A DCS using Allen Bradley DH+ protocol can be configured to access the FieldServer and read the Data Array. The
FieldServer will appear to the DCS as another DH+ PLC. If the Virtual Node PLC1 is configured to contain the data
on sensor 5/PLC1 as a DH+ address B3:57, then the data needed for address B3:57 will be retrieved from Data
Array PLC1, offset 24.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
This title appears on the top line of the RUI screen. It
may be used to indicate the configuration version
loaded, and the relevant customer/project.
Data Arrays are “protocol neutral” data buffers for storage of data to be passed
between protocols. It is necessary to declare the data format of each of the Data
Arrays to facilitate correct storage of the relevant data. More information is
available in Appendix B.3
Lines beginning // are comments and do
not affect the configuration.
Note: Comments should be at the start of
lines. If comments made after a line of
parameters must not follow a comma
directly.
This section allows for the determination of parameters
not directly related to any of the connections.
3 GETTING ST A RT E D – BASIC CONFIGURATION
3.1 Configuration File Overview:
The default driver configuration file (CONFIG.CSV) for any driver combination ordered is loaded into the
FieldServer and can be retrieved using the Remote User Interface Utility (see the FieldServer Utilities Manual for
more details). Use this file as a template when editing configuration files to ensure that the edited file t akes the
correct form. A detailed explanation of the configuration file follows:
3.2 Configuration File Structure
//==========================================================//
// Delivery.csv
// SMC Customer : XYZ Corp.
// Ultimate Destination : Main Office
// SMC Sales Order : 00103400
// Driver Configuration : Modbus RTU
// Configured By : GFM
// Date : 23 Mar 00
//
// Copyright (c) 2000 FieldServer Technologies
// 1991 Tarob Court, Milpitas, CA 95035
// (408) 262 6611 Fax: (408) 262 9042
// support@fieldServer.com
//
//===========================================================
//
// Common Information
//
Bridge
Title
DCC030 CC00103400 V1.00a
//===========================================================
//
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
Name assigned to the Map
Descriptor. In some protocols
the name becomes the variable
name.
Offset in relevant Data Array to start data
access/storage
Data Array to be used
for storage of data
being passed
between protocols.
Determines how data is to
be fetched/written. The
FieldServer is either
reading, being read, or
writing data. This can be
Node being
accessed.
First point
address being
accessed.
Number of points in
package
Timing
parameters
assist with
pacing of data.
The Map Descriptor parameters describe the address details required to move data
between the FieldServer and an external device and the nature of the data transfer.
//==============================================================
//
// Client Side Map Descriptors
//
/
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
Adapter definition applies to defining network
and FieldServer (e.g. Profibus) connections.
A Node name for
reference by the
Map Descriptors.
Since the FieldServer is a Server here, this is the ID of the FieldServer (virtual)
Node. The FieldServer can represent multiple Virtual Node_ID’s in most protocols.
The protocol for the network
connected to this port.
Settings for how the FieldServer communicates with Client Nodes.
/==========================================================
//
// Server Side Connections
//
//==========================================================
//
// Server Side Nodes
//
//==============================================================
//
// Server Side Map Descriptors
//
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
The configuration file is in comma-delimited format where entries within a line are separated by commas and the
end of a line is indicated by an entry without a comma. This file can be edited using spreadsheet programs or any
text editor.
It is recommended that the CONFIG.CSV file be backed up before editing. Once edited, the file can be sent back to
the FieldServer using the "D" command in the Remote User Interface.
Refer to Appendix B.4 for the parameters that are usually filled out in the configuration file. Only the specified
values may be used - other values may affect FieldServer performance or functioning.
Not all parameters are compulsory for every driver (See the related driver manual for details). The bold legal value
is the value that will be used if the parameter is not specified.
Not all variables need be defined for every configuration. Depending on the protocol and configuration, some
variables might not be necessary. More detailed information is located in the relevant Driver Manual, including
settings specific to the drivers being used for a particular application.
Most FieldServer parameters are specified in a configuration file and are fixed. A growing number, however, may
be changed dynamically using values found in Data Arrays. We call these Dynamic Parameters. Refer to Section
6.3 for more information on Dynamic Parameters.
3.4 Testing Configuration Files with MB8SIM.EXE
MB8SIM.EXE is a program that simulates the FieldServer on the PC and can be used for testing edited configuration
files before transferring them back to the FieldServer. This file can be obtained by calling Tech Support. It is not
necessary to use mb8sim. The configuration can be loaded into the FieldServer and tested in much the same way.
Open an MS-DOS prompt and navigate to the directory containing the configuration file.
Type: "mb8sim.exe -c<configuration file>", where <configuration file> is the name of the file to be tested.
For example, to test the CONFIG.CSV file, type "mb8sim –cconfig.csv".
To test specific sections of a configuration file it is possible to ignore certain sections:
To ignore a block use the "ignore" keyword at the start and the "process" keyword at the end of the
block.
To ignore individual lines use “//”
The "end" keyword will stop processing the file, and anything after this keyword will be ignored.
The following is an example of the interface when using MB8SIM.EXE. It looks very similar to the interface when
using RUINET.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
None of these messages are errors.
Config and system errors will have a
“banner” saying “System Error” or
“Configuration Error”.
Figure III - MB8SIM Interface Screen
Check all screens to see if the file is working correctly, paying particular attention to the Error screen. From the
main menu, press "E" to enter the error display screen, and examine the errors listed (refer to Figure IV). Take
note of System Errors or Configuration Errors. These indicate configuration problems in the configuration file.
Note: a number of "System Overrun" errors may occur in this screen. They are caused as a result of the simulation,
and will not cause any problems on the FieldServer.
Figure IV: MB8SIM Error Screen with Driver Versions
When the file is free from errors (with the exception of "System Overrun" Errors), download it using the "D"
command from the main menu of the Remote User Interface.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
Check the Connections defined to ensure that they are as expected.
Do the same for Nodes.
Check the Data Arrays to ensure that all Data Arrays defined are there. If too many Data Arrays exist, this
usually signifies that a spelling error exists in the configuration, and that incorrect Data Arrays were
specified in the Map Descriptors.
Note that the first few lines of the error screen are merely informative and relevant information used for fault
finding and do not represent errors. Errors are shown as “System Error” or “Configuration Error” in the error
screen.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
Map Descriptor functions determine how data is mapped between Data Arrays and the corresponding driver data
points. The choice of function used is critical in ensuring that the right relationship is established with the device
being communicated with. The most important decision to make when choosing a function is whether the
function needs to be active or passive. Once this is determined, the trigger for initiating communications
determines which active or passive function is used.
4.1 Active vs. Passive functions
Active functions control the communications activity for the associated points in the network. Specifying an active
function for a point will enable the FieldServer to decide when a point is updated, and monitor the health of the
communications path for that point (if the associated protocol allows for this). Specifying a passive function will
mean that the FieldServer expects the communications for that point to be controlled and monitored by another
device on the associated network.
Note: By design, it is necessary that all active Map Descriptors communicate to a point that has a passive mapping
on the remote device, and that passive Map Descriptors are controlled by an active mapping on the remote device.
There is a loose relationship between Active/Passive and Client/Server. Clients usually use active mappings and
Servers usually use passive mappings, however Active Servers and Passive Clients do exist. Points that send an
update to a network on change (e.g.: Alarm panels) are a good example of Active Servers.
Another set of terminology used in this area is solicited vs. unsolicited messages. A Client receives a solicited
message from a Server when it asks for it (i.e.: the point is polled). A Client receives an unsolicited message from a
Server when the Server sends the point without the Client asking for it. Clients that send solicited messages are
Active Clients communicating with Passive Servers. Clients that receive unsolicited messages are Passive Clients
communicating with Active Servers.
4.2 Passive Map Descriptor Functions
4.2.1 Passive
The Passive function will not initiate any communications but waits to be solicited by a remote device and
responds with data accordingly. The Passive function will also accept writes and update the associated Data Array.
4.2.2 Passive Client (Passive_ C l i e n t )
The Passive_Client function is intended for use where the associated Map Descriptor performs a Client function
and is connected to an active Server. The Passive_Client function will consume all unsolicited messages for the
related point/s and store them in the associated Data Array.
Note that not all functions are supported by all drivers. Refer to the specific Driver Manual for information on functions supported by
individual drivers.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
Typical Properties
Map Descriptor function used for both
protocols A and B is “passive”
FieldServer is non-intrusive into both networks,
and responds to queries and commands only.
4.2.2.1 Working with Passive Clien t – Passive Server App lications
Figure V: - Typical Network architecture
Some applications require the data Server to actively write data to and from the FieldServer. To do this it is
necessary to change the Client side of the configuration to be passive.
Individual drivers have specific requirements for managing passive communications, but the following steps are
typically required to change the Active Client side of a configuration file to make it a Passive Client.
Remove Adapter/Port to Client side Node
Change Function from Rdbc to Passive
Remove Scan_Interval
Change Node ID to remote device’s target Device ID
If the Server side remains passive, then every Map Descriptor should have Passive as its function. Consequently,
the Server device will write data to the FieldServer’s Data Arrays, and the Client device will read that data from the
same Data Arrays, making the operation of the FieldServer much like that of a normal data Server on an office
network.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
A Responsible Map Descriptor is a Map Descriptor that inherently monitors the quality of the data that it is
mapping and can be recognized by the “Function” parameter field. The following are all Responsible Map
Descriptors.
4.3.1 Read Block Continuous ( Rdbc)
The Rdbc function will read a block of data of length specified by the “length” parameter, and transfer that data to
the Data Array specified. Reads are performed continuously at an interval specified by the “Scan_Interval”
parameter.
The Rdbc function also has the ability to perform what is known as “write throughs”. If the driver allows writing to
the point related to the Map Descriptor where Rdbc is specified, then the Rdbc function will write the data in the
Data Array back to the point when an update in the associated Data Array is detected. This makes Rdbc the ideal
function for read/write points.
4.3.2 Active Read Continuous with Sequencing (A rcs) .
This function will perform the same operation as an Rdbc (Arc) function, but will sequence through the range of
addresses starting at "Address" and wrapping at "Address + Length". A length of 1 will be used for every one of the
Addresses that gets polled. The following drivers currently support the ARCS function.
The Wrbx function will write data from the Data Array to the remote device. The write is triggered by a change in
the associated Data Array. If the associated Data Array is updated a write will occur, even if the value/s within the
Data Array have not changed. The “Scan_Interval” parameter is not required for this function as writes are event
driven and not continuous.
4.3.4 Write Block Continuous (W r b c )
This is similar to the Wrbx function, except that the writes occur at a regular interval rather than on an event
driven basis. The frequency of the writes is determined by the “Scan_Interval” parameter.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
This function is used to effect a single data read per trigger. An example from the Envirotronics Driver is presented below:
This command is triggered by writing any value to Data_Array_Name at Data_Array_Offset.
The retrieved data is stored as follows:
4.3.6 Active Write on Trigger (AWT)
This function is used to effect a single data write per trigger. As with the Wrbx function, the write only occurs when the Data Array is updated. In this case the
updated data is not used to form the write, but updating the Data Array triggers a read of a Secondary Data Array which contains the data to be served in the
write.
In the example below (from the Lutron eLumen Driver) the driver watches the Data Array called ‘Lut_triggers’ (offset 13). If that Data Array element is
updated (even if the value remains unchanged) the the write is triggered. The driver extracts the data from the Secondary Data Array called ‘Set_tlck’ (offset 0)
and forms a message to write this data to the field device.
Only certain drivers support/require the use use of this function. For other drivers, awt is a synonym for wrbx since there is no secondary Data Array to extract
information from.
Note: The driver may extract more data from the array than specified by the ‘length’ parameter. The only way to know how much dat a is to read that specific
driver’s manual.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
A Move operation must specify the following elements:
Source_Data_Array
The name of the Data Array from which data is to be copied.
Source_Offset
The offset within the Data Array from which data is to be copied
Target_Data_Array
The name of the Data Array to which data is to be copied
Target_Offset
The offset within the Data Array to which data is to be copied
The following elements are optional:
Length
The number of consecutive source Data Array values to be moved to consecutive
target locations, starting at the respective offsets
Task_Name
If a task name is specified, the move operation becomes a continuous task on the
FieldServer that is executed at the scan interval specified.
Scan_Interval
The time interval at which the task will be repeated. A task name must be specified if
a scan interval is specified.
Function
Defines move functionality, e.g. byte order manipulation. Functions are summarized
in Figure VI.
Conditional_Data_Array
The name of a Data Array to be used for conditional moves. See Section 5.1.1.3 for
more information.
Conditional_Offset
The offset into the Conditional_Data_Array where the conditional bits for the move
are defined. The value found at this specified location must be non-zero for the move
to be executed. If the value is zero, the move is inhibited.
5 DATA MANI P U L ATI O N FE ATURES
The features described in this section may or may not be needed depending on the application where the
FieldServer is implemented. If the application calls for straight passing of data without modification through the
FieldServer, then the features in this section will probably not be useful.
5.1 Moves
The Moves function permits data to be moved from one Data Array to another. The function parameter within
moves allows data manipulation to occur while moving the data, e.g: Logic operation, Integer to floating point
conversion, etc. Scaling, Logic and Math are also possible while moving data
With the exception of Conditional Moves (see 5.2.9), each Data Array location may only act as the target location
of one Responsible Move. This ensures that the data source can be uniquely determined in order to establish
source data validity, and so that a write through the target data location is directed to the appropriate location.
Moves will execute whenever the source data changes or the scan interval (if specified) expires. If a task name but
no scan interval is defined, a default scan interval of 1s is assumed.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
Map Descriptor 1 serves up 40001 Length 25 :
Map Descriptor 2 serves up 40026 Length 25
Client side Data Array 1
Client side Data Array 4
Client side Data Array 2
Client side Data Array 3
Server Side Data
Array
Remote Client can
now poll the
FieldServer using
large poll lengths
without fear of
hitting undefined
registers.
One Server
Data Array
means One
Server Map
Descriptor is
possible
Five Floating point values are
moved from the first offset of
Source_DA to Offset 40 of
Target DA
Move is reversible, meaning
data can move from
Target_DA to Source_DA if
applicable (writeable points
5.1.1 Sim ple Moves
The simplest move involves the transfer of data without any format or protocol changes. Whenever the Source
Data Array is updated (not necessarily changed) the Target Data Array will be updated.
5.1.1.1 Simple Move Ex ample
5.1.1.2 Special Applic ation: Group ing Data
The location of data in Data Arrays on the FieldServer is determined by corresponding Map Descriptors. Should a
Client poll the FieldServer for data spanning more than one Map Descriptor, the FieldServer will not know which
Map Descriptor to use. This can be circumvented by moving data from multiple “Client Side” Source Data Arrays to
a single “Server Side” Target Data Array. This Data Array should be larger (of greater length) than the maximum
poll length of the Client.
Example
Consider a Modbus Client needing registers 40001 through 40050 from the FieldServer. The poll lengths used to
obtain this data are unknown.
This could be configured in the FieldServer Server side as follows:
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
If the two poll blocks fall within these two address spans, the poll will be successful, however, if all
50 registers are polled in a single poll it will fail
Configuration 2:
Map Descriptor 1 serves up 40001 Length 50
For this to work, all 50 points must be contiguous in the same Data Array so that one Map
Descriptor can be created. If all 50 registers are polled in a single poll it will be successful. If the
Client polling algorithm keeps a fixed length of 50, and then decides to poll address 40050, length
50, the poll will fail because addresses 40051 through 40099 are not declared in the FieldServer.
Configuration 3.
Map Descriptor 1 serves up 40001 Length 200
For this to work, points must be contiguous in the Data Array, and the Data Array length must be
at least 200. Since Modbus can poll a maximum length of 125, a Client cannot poll the required
registers and encounter an address that is not configured. This is therefore the most robust
solution, and only costs a few points.
Float Data Array
With data from
Modbus address 40200
Bit Data Array
With data from
Modbus address 11235
Server Side Data
Array
-------------------------
Offset 20: Value
-------------------------
LonWorks Server Map
Descriptor
Data Array 1
ata
Data Array 2
Move
Server 1
Server 2
5.1.1.3 Special App lic ation: Sepa rating Respons ible Ma p De scriptors
Responsible Map Descriptors are active Map Descriptors that control the Communications (see section 4). Two
Responsible Map Descriptors cannot share the same Data Array Offset due to monitoring functions present in the
kernel (Refer to Section 4.3 for more information). If two Responsible Map Descriptors require access to the same
data, the data can be made accessible to the second Responsible Map Descriptor by moving it to a second Data
Array.
5.1.1.4 Special Applic ation: Creatin g a L onWorks SNVT_Switch fro m 2 Modbus reg isters.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
It is often necessary to manipulate incoming data to create the necessary outgoing data by either joining smaller
data types to create a larger data type, or splitting larger data types to deliver smaller data types. An example of
this is Modbus, where two 16 bit registers are used to transfer a 32 bit floating point value. Upon receipt of these
two registers, the FieldServer needs to join the integers to extract the floating point value. The Type Casting
moves described below perform these kinds of operations
5.2.1 Fun c t i o ns Available For Type Casting:
Join_Float , Split_Float
Join_Int16, Split_Int16
Join_Int32, Split_Int32
Swapped versions of the above (Big Endian vs Little Endian)
Bit_Extract, Bit_Pack, Bit_Move
The following legacy functions have been replaced by the functions listed above. They are simply presented in the
table below for reverse compatibility.
Figure VI – Legacy Functions for Type Casting Moves
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
Ten 16 Bit Integers are taken
from Source_DA and
combined in two’s to make
up 5 floating point values
Length refers to the data type referenced in the Function.
eg: If n is the value shown in Length, then:
Join_Float creates n Floats
Split_Float disassembles n Floats
Join_Int16 Creates n Integers
Bit_Extract extracts n Bits, etc
5.2.2 Converting two Integers to a Float.
5.2.3 Using M oves to pack and unpack bits to o r f r o m a Register
A register provided by a device often consists of a set of binary values packed together for efficient data transfer.
These registers are normally 16 bits in size, but may also be 8 or 32 bits long. Since a register is read as an analog
value by most protocols, these binary values need to be extracted out of the register into a bit data array before
they can be read as useful data. The Bit_Extract Move function has been created for this purpose.
The Bit_Pack function can be used to pack bits into a register.
The Bit_Move function allows the user the ability to extract a group of bits in one register and place them singly
into another register.
The Bit_Offset keyword can be used to start moving a group of bits from a specified offset within the register. This
keyword may also be used in conjunction with the Bit_Extract and Bit_Pack functions to specify the first register
offset to Extract or Pack.
The Length keyword will always specify the number of bits to be moved in the move operation when using these
three functions. If the length keyword is not used, then only one bit will be moved.
Note: The Data_Array_Type being used in source and target Data_Arrays can produce varying results and care
should be taken to use the correct type. For example, when using the Bit_Extract function, it makes sense to use
Byte, UInt16, or Uint32 source Data_Array_Types to extract 8, 16 or 32 bits per register respectively. It also makes
sense to use the Bit Data Type for target Data_Array_Type. However, the FieldServer will allow other types to be
used and follow a routine choice of conversion that may not be considered predictable to all users. For example, if
the Float Data_Type is used as a source type in Bit_Extract, 32 bits per register will be extracted according to the
rounded Integer number being represented in the Float Register. If the Float Data_Type was used as a target type
in Bit_Extract, then each float register would store one binary value and would only ever represent 1 or 0.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
The function extracts bits out of the source Data_Array Registers at the Data Array offset specified..
The bits are placed into the destination array in sequence. Only one bit is allocated per offset. If the
source array is of Bit Data Array type, a straight move is performed.
Bit_Pack
The function extracts the binary version of each source offset and packs the bits into the Data Array
offset specified. The number of bits packed depends on the target Data type (e.g: Bytes will get 8
bits, Floats will get 32, etc..). The length will specify the number of bits to pack. If the destination
Array is a Bit data type, a straight move is performed.
Bit_Move
The function extracts a subset of bits out of a source Register offset and transfers these to a
destination Register offset in packed form. Length specifies the number of bits to be extracted.
Keywords
Function
Legal
Values
Bit_Offset*
The parameter specifies the bit offset within a word to start at when performing a bit
move. For Bit_Extract operations, the source bit offset in the word pointed to by the
Source_Offset parameter is implied. For Bit_Pack operations, the bit offset within the
word pointed to by Target_Offset is implied.
Default
0
Length*
The length parameter specifies the number of bits to be extracted/packed.
Default
1
Data_Arrays
Data_Array_Name
, Data_Format
, Data_Array_Length
Source_DA
, Uint16
, 200
Target_DA
, Bit
, 200
Moves
Function
, Source_Data_Array
, Source_Offset
, Target_Data_Array
, Target_Offset
, Length
Bit_Extract
, Source_DA
, 5
, Target_DA
, 0
, 48
Data_Arrays
Data_Array_Name
, Data_Format
, Data_Array_Length
Source_DA
, Bit
, 200
Target_DA
, Byte
, 200
5.2.4 Example 1 – Simple Bit Ext r ac t i o n
The following example extracts 3 16-bit registers worth of data from the 6th register of the source array into the
equivalent target of 48 bits:
5.2.5 Example 2 - Simple Bit Packing
In this example, 12 bits are packed into the 3rd and 4th register of the target byte array, starting at the eleventh bit
in the source array. Note that the second target register will only be half populated, leaving the last 4 bits empty.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
The following example extracts 3 bits from the second byte of a 32-bit register and places them into a byte register
on their own. The Bit_Offset keyword is used here to achieve this:
5.2.7 Bit Extraction – Applica t i o n E x ample
Assume a Liebert device has been set up as follows:
Bits 0 - 10 are each used to specify a unique event, and each has a corresponding integer value determined by the
binary contribution it makes to the integer value. For example, bit 10 has an integer value of 1024 as its weighting
in the integer value is 2 to the power 10.
A single packed bit integer with a value of 1034 signifies a blown rectifier fuse, a hardware shutdown, and a
battery discharge (sum of the values for the corresponding events). The value “1034” has no meaning as such, but
when the integer is “unpacked” the individual data bits communicate the required information. This is depicted in
the following diagram.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com