"The Safe House" Scenario: vPLC + vSafe + ProfiSafe + Time Provider + License Server

Note
The documentation on the following pages is provided for informational purposes only. For restrictions and safety or certification information, please consult the safety documentation of the manufacturer of the device that you are programming.
Requirements
Scenarios:
The requirement for this scenario is the successful setup of the "Virtual with Fieldbus" Scenario: vPLC + License Server + Edge Gateway + Fieldbus.
Hardware
The following devices are also required:
Desktop PC with CODESYS Development System installed
Linux Host PC with virtual Edge Gateway, virtual PLC 1, and license server installed
The following additional devices are also required:
Host for the time provider, named Linux Host PC 2 in the diagram. Requirements for this host: Linux operating system and Docker must be installed and SSH configured.
Real-time capable network to the Linux Host PC to ensure deterministic transmission of data packages.
Add-on products
CODESYS Virtual Safe Control SL must be installed on the desktop PC.
Linux Host PC 2
On the Linux Host PC 2, set up the time provider.
The time provider sends the current time to a configured destination and can be used to provide the second time required by the Virtual Safe Control SL.
Execute the command Tools → Deploy Control SL and establish a connection to the Linux Host PC 2 (Communication tab).
For more information, see: Establishing a Connection
Install the latest versions of the following images (Deployment tab):
CODESYS Virtual Safe Time Provider
For more information, see: Installing an image
Click the Deployment tab.
In the Product list box, select CODESYS Virtual Safe Time Provider SL.
In the Version list box, select the newest version.
Click the Install button.
The CODESYS Virtual Safe Time Provider SL image appears in the Installed Images section.
Create the required instances.
On the Linux Host PC 2, the timeprovider instance is required, which you create as follows on the Operation tab:
In the VPLCs section, click the
button.
The Add New Instance dialog opens.
Specify
timeprovider
as the name.In the Filter list box, select
Safety Timeprovider
.Select the latest version of the
CODESYS Virtual Safe Timeprovider SL
image and click OK.The new instance is listed in the VPLCs section.
Configure the instances:
The target IP address and the target port must be configured for the
timeprovider
instance. The target is thevHost
and port60000
by default.Genericcommands:
-e TARGET_IP=[IP or host name of the Linux Host PC]
-e TARGET_PORT=60000
60000 is the default port for a Virtual Safe Control SL to receive an external time source from the timer.
Autostart
Yes
When Yes is selected, the instance is started automatically each time the system is booted.
In the VPLCs section, click the
timeprovider
instance.The settings for the
timeprovider
instance are displayed on the right side. theTARGET_IP
andTARGET_PORT
are already pre-assigned under Genericcommands with the valuesvSafePLC1
and60000
.Change the
TARGET_IP
to the host name or the IP address of the Linux Host PC 1.For more information, see: Detecting the network address
In the Autostart list box, change the value to Yes.
Click the Save button to save the changes.
For more information, see: Creating and configuring a new instance
Start the instance.
Start the
timeprovider
instance by selecting it in the VPLCs section and then clicking theStart Selected button.
In the State column, the status of all instances changes to Running.
Linux Host PC
On the Linux Host PC, set up the CODESYS Virtual Safe Control for Linux SL.
Execute the command Tools → Deploy Control SL and establish a connection to the Linux Host PC 2 (Communication tab).
Switch to the Operation tab.
Install the latest versions of the following images (Deployment tab):
CODESYS Virtual Safe Control SL
Create the required instances.
On the Linux Host PC 1, the vSafePLC instance is required, which you create as follows on the Operation tab:
In the VPLCs section, click the
button.
The Add New Instance dialog opens.
Specify
vSafePLC
as the name.In the Filter list box, select Safety runtime system.
Then select the latest version of the CODESYS Virtual Safe Control for Linux SL image.
Then click OK.
The new instance is listed in the VPLCs section.
Together with the instances which you created on this device in the last scenario, the following instances should now be available in the
VPLCs
section:Instance
State
Product
vGateway
Stopped
Gateway
vPLC
Stopped
Runtime system
vSafePLC
Stopped
Safety runtime system
Check whether the following entry is available in the
Services
section:Product
State
CODESYS LicenseServer for Linux SL
Running
Before reconfiguring, click the Stop All button to stop the instances.
The state of all instances changes to Stopped.
In the VPLCs section, click the
vSafePLC
instance.The settings for the
vSafePLC
instance are displayed on the right side.Configure the
vSafePLC
instance as follows:Ports:
60000:60000/udp
This is the default port for a Virtual Safe Control SL to receive an external time source from the time provider
Ipc:
container:vPLC
Access to the IPC namespace of the vPLC instance for communication between these two instances.
Dependencies:
vPLC
The vPLC must be started first because this creates the IPC namespace that this instance wants to join. A dependency will ensure the correct starting order.
In the VPLCs section, click the
vPLC
instance.The settings for the vSafePLC instance are displayed on the right side.
Configure the
vPLC
instance as follows:IPC:
shareable
Create an IPC namespace for this container that can be used by other containers. In this case, the vSafePLC instance should join for the communication between these two instances
Start the instances.
In the VPLCs section, click the
Start All button to start all instances.
In the State column, the status of all instances changes to Running.
Check the configuration.
To make sure that the times of the timeprovider arrive at the vSafePLC as desired and configured, you can check this in the log of the instance.
To do this, select the
vSafePLCs
instance in the VPLCs section.In the Actions section at the top right, click the Show Log button.
The Runtime System log window opens.
The message
External Time Provider found
exists in the log.
All the required devices are now ready. The next steps for creating a project and integrating PROFIsafe are described in the CODESYS Safety Extension documentation.