fiwip_img FIP-OPCUA Gateway

   FIPOPCUA Daemon

FIPOPCUAD is the daemon that starts/stops a FIP/WorldFIP node device and attaches its FIP session data to an OPC UA server.

We will describe here how to install the FIPOPCUA daemon and its associated kernel module under GNU/Linux.

First, download the fipopcua archive (.tar.xz) corresponding to your hardware architecture and your GNU/Linux flavour.

In this example, the machine used is based on x86_64 processor (64-bit) and the package archive is extracted in /home directory.


1 - Driver compilation & installation

Open a terminal and enter the following commands:

$ cd /home/fipopcua-1.x.x-x86_64/driver/kernel
$ sudo KBUILD_NOPEDANTIC=1 make
$ sudo chmod +x install_drv.sh
$ sudo ./install_drv.sh

2 - Daemon installation

Open a terminal and enter the following commands:

$ cd /home/fipopcua-1.x.x-x86_64/fipopcuad/
$ sudo chmod +x install_svc.sh
$ sudo ./install_svc.sh


Once installed, you can manipulate the daemon with the classic commands of systemd:

Start the daemon: $ sudo systemctl start fipopcuad

Stop the daemon: $ sudo systemctl stop fipopcuad

Enable the daemon at system startup: $ sudo systemctl enable fipopcuad

Disable the daemon at system startup: $ sudo systemctl disable fipopcuad

Daemon status: $ sudo systemctl status fipopcuad

To set up this daemon, edit the file "/etc/systemd/system/fipopcuad.service" and change the ExecStart command with your own settings.


Daemon configuration file - /etc/systemd/system/fipopcuad.service
# It creates a bi-directional gateway of FIP/WorldFIP master/slave device to OPCUA network.
# By default, if no option is added, the app opens the first FIP master/slave device found,
# and creates an OPCUA server session to 16664 TCP port.
# 
# Options:
#     -i, --index       FIP device index [default=1st found]
#     -p, --port        OPCUA tcp port number [default=16664]
#     -f, --fip_conf    FIP config file path [default=/usr/local/share/Exoligent/FipNode/fipnode.xml]
#     -b, --ba_start    start bus arbiter on daemon startup (0:off,1:on) [default=off]
#     -d, --daemon      daemonize this application
#     -l, --list        list host FIP devices
#     -C, --daemon_conf daemon config file path
#     -L, --log_file    write logs to this file
#     -P, --pid_file    PID file used by daemonized app
#     -v, --version     show version and exit
#     -h, --help        show this help and exit
# 
# 
# Examples: 
#     fipopcuad -i 2
#     fipopcuad -d

[Unit]
Description=Bidirectionnal FIP-OPCUA Gateway

[Service]
Type=simple
ExecStart=/usr/bin/fipopcuad \
            --log_file /var/log/fipopcuad.log

User=root
Restart=on-failure
RestartSec=3

[Install]
WantedBy=multi-user.target

Daemon Parameters:

  • -i, --index : Index of the FIP master/slave (mPCIe) device to attached to the app (value range: [0-3])

  • -p, --port : OPCUA TCP port number (default=16664)

  • -f, --fip_conf : FIP config file path (default=/usr/local/share/Exoligent/FipNode/fipnode.xml)

    Note: It is this file that defines the configuration of your FIP node, and at the same time the variables that will be exposed by the embedded OPC server. To generate it, you can either write it by hand (xml format: click here for more infos), or use FipLabs GUI to build it.

  • -b, --ba_start : Start the FIP bus arbiter on daemon startup (0:off,1:on) (default=off)

    Note: Only if the FIP node configuration is set with a bus arbiter.

  • -d, --daemon : Start this app as a double forking daemon.

  • -l, --list : Display the list of the FIP master/slave devices of the host.

  • -C, --daemon_conf : Read daemon configuration from an external file path.

  • -L, --log_file : Write logs to the specified file path.

  • -P, --pid_file : PID file used by daemonized app.

  • -v, --version : Show the application version and exit.

  • -h, --help : Show this help and exit.