<<
Page 1

REGISTER INTERFACE
Our vendor-specific EtherNet/IP register interface object allows
the Soloist’s built-in integer and double registers to be
accessed via EtherNet/IP. This provides a flexible, general-purpose
interface to the Soloist that can be adapted to many different
applications. Data consistency is guaranteed internally, so there
is no need for concern when accessing these registers simultaneously
via EtherNet/IP and AeroBasic programs on the controller.
The Rockwell software is configured in very much the same way
as the ASCII command interface. In this case, the message source
(shown in red in Figure 5) is a data array. The message configuration
in Figure 5 is for the “Write
Single Register” service. That service requires two pieces
of data: the number of the register to write, and the value to
be written. Therefore, we configure the message source tag as
shown in Figure 6.
The value 100 is the register to write to, and the value to be
written is 7. When the MSG block is activated, the register query
is sent to the Soloist via the EtherNet/IP protocol. As you can
see, this is a straightforward data interface from the PLC to
the Soloist. In addition to writing a single register, the interface
also supports writing multiple registers in one message and reading
single or multiple registers. This example was interfacing with
an integer (32-bit) register, but the interface supports the same
functionality with double-precision (64-bit) floating point values.
|
Soloist Code Snippet (AeroBasic) for Register Interface
To make use of the data that is being transferred to and from
the PLC, the user can write an AeroBasic program to respond to
incoming register transfers, as well as write outbound register
data. This combination of EtherNet/IP communication with the power
and flexibility of AeroBasic allows for the implementation of
many unique applications. For example, the following AeroBasic
code snippet shows how the register interface can be used to control
the Soloist timebase value (set by the AeroBasic TimeScale command).
HEADER
' The PLC writes timebase values
tO IntegerRegister 101
Define timebaseRegisterIndex 101
END HEADER
DECLARATIONS
' Declare a global variable named
"timebase"
Global timebase as Integer
END DECLARATIONS
PROGRAM
' initialize the timebase register
to 100% speed
RegS IntegerRegisters, timebaseRegisterIndex,
100
' ... do work in AeroBasic
...
' Change timebase to value
sent from PLC
Call GetTimebase()
TimeScale timebase
' ... continue working
...
END PROGRAM
FUNCTION GetTimebase() as void
' Read the value from IntegerRegister
101 into the variable "timebase"
timebase = RegS(IntegerRegisters,
timebaseRegisterIndex)
END FUNCTION
|