Getting Started¶
Log-in¶
Login to a standard ELT machine.
Retrieve and build the Software¶
If not yet done, retrieve the complete ICS Framework from the SVN repository. Integration area shall be defined in advance.
svn co http://svnhq9.hq.eso.org/p9/trunk/EELT/ICS/ifw
cd ifw; waf configure; waf install
Starting Database Server¶
The present version of the Device Manager uses Redis as the database engine to store run-time configuration (Redis documentation).
Before running the Device Manager
is required to start up the DB server executing the following
command:
redis-server &
Note
When no port is specified, the Redis DB server uses the port 6369.
The data is stored in the DB using a list of keyword/values. Each keyword has a hierarchical name that helps to idenfify its context, for instance the keys associated to a Device Manager start with the server id.
The ELT development environment provides a DB browser tool (dbbroser) that can be used to monitor the database keywords in an easy way similar to the ccseiDb tool in the VLT project.

Dbbrowser tool screenshot showing Device Manager attributes.
dbbrowser &
Note
The attributes will be populated only when the Device Manager server is started.
Creating a Server Configuration¶
The Device Server
requires a configuration file including all the relevant information for the server
to run like the endpoint for the zeroMQ request/reply or the list of supported devices.
An example of a server configuration is provided by the FCF. The configuration includes one shutter that is configured in simulation so no need to have a PLC in order to test the server and its GUI.
Server configuration: devmgr/server/cfg_sim.yml
server_id : 'ins1.fcs1'
ins1.fcs1:
req_endpoint : "tcp://*:5577"
sub_endpoint : "tcp://localhost:5567"
pub_endpoint : "tcp://*:5567"
ext_pub_endpoint: "tcp://*:5557"
ext_sub_endpoint: "tcp://localhost:5557"
db_endpoint : "127.0.0.1:6379"
db_timeout : 2
scxml : "devmgr/server/sm.xml"
dictionaries : ['dit/stddid/primary.did', 'devmgr/server/fcf.did']
fits_prefix : "FCS1"
devices : ['shutter1']
cmdtout : 60000
shutter1:
type: Shutter
cfgfile: "devmgr/server/shutter1_sim.yml"
Shutter configuration: devmgr/server/shutter1_sim.yml
shutter1:
type: Shutter
interface: Softing
identifier: PLC1 # OPCUA Object Identifier
prefix: MAIN.Shutter1 # OPCUA attribute prefix
simulated: true
ignored: false
address: opc.tcp://134.171.59.98:4
simaddr: opc.tcp://127.0.0.1:7576 # Simulation address
mapfile: "devmgr/server/mapShutter.yml"
fits_prefix: "SHUT1"
ctrl_config:
low_closed: false
low_fault: false # If T, signal is active low
low_open: false # If T, signal is active low
low_switch: false # If T, signal is active low
ignore_closed: false # If T, ignore the signal
ignore_fault: false # If T, ignore the signal
ignore_open: false # If T, ignore the signal
initial_state: false
timeout: 2000
Starting Device Manager¶
$ devmgrServer -c devmgr/server/cfg_sim.yml &
The output of the server shall be something like the following:
2018-11-27T22:09:45.766449 INFO Application radServer started.
2018-11-27T22:09:45.804573 INFO External publishing to: tcp://*:5557
2018-11-27T22:09:45.815435 INFO Internal publishing to: tcp://*:5567
2018-11-27T22:09:45.827983 INFO [shutter1] Warning device simulated !
2018-11-27T22:09:45.828141 INFO Reading configuration keywords for device:shutter1
2018-11-27T22:09:45.830288 INFO Internal subscription from: tcp://localhost:5567
2018-11-27T22:09:45.840672 STATE from to
2018-11-27T22:09:45.840715 STATE from to
2018-11-27T22:09:45.840737 STATE from to NotReady/NotOperational/On/
2018-11-27T22:09:45.841032 STATE from NotReady/NotOperational/On/ to NotReady/NotOperational/On/
Initialising the server¶
The client application can be used to send commands to the server from the command line:
devmgrCliennt 5000 localhost 5577 modif.ReqInit ""
The reply from the server shall be something like the following:
[shutter1] Connection failed :Error obtaining endpoints for address: opc.tcp://127.0.0.1:7576
Starting the Shutter Simulator¶
To avoid the above problem, the Shutter simulator shall be started. This simulator mimic the interface and behaviour of a Shutter device controller. It launches an OPC-UA server listening in the specified port. The address space of the OPC-UA server matches the one from the real device.
devsimShutter --port 7576 --name-space-def fcf/devsim/devsimShutter/shutter1Namespace.xml --cfg fcf/devsim/devsimShutter/shutter1.yaml &
Note
The port number have to match the configuration endpoint in the shutter configuration.
Now that the simulator is running, the server can be initialised.
devmgrCliennt 5000 localhost 5577 modif.ReqInit ""
If the initialisation is succesfull, the server will go to NotOperational/Ready. Now it is possible to move it to Operational by sending the command Enable.
devmgrCliennt 5000 localhost 5577 modif.ReqEnable ""
In Operational, the server accepts the Setup command to control the status of the Shutter (open or close). You can try setting up the Shutter with the Device Manager GUI.