Domat IDE
Home
  • Basic description of the Domat IDE
  • Start the IDE
  • Process station, or controller (PLC)
  • Project
  • HMI editor
  • Software
  • Domat devices
Contact
  • Čeština
  • English
Home
  • Basic description of the Domat IDE
  • Start the IDE
  • Process station, or controller (PLC)
  • Project
  • HMI editor
  • Software
  • Domat devices
Contact
  • Čeština
  • English
  • Basic description of the Domat IDE
    • Frequently asked questions
    • Programming options
    • Communication options
    • Hardware capabilities
    • User prerequisities
    • Definitions of terms necessary for work in Merbon IDE
    • General proceedings to program PLCs
  • Start the IDE
    • NewSolution
    • New Solution in Simple mode
    • Hot keys
    • Mouse control
    • Settings
    • Searching variables - Quick Find
    • Project archiving
  • Process station, or controller (PLC)
    • PLC attachment (and platform type settings)
    • Controller runtime update
    • Update from HW device
    • Uploading of program to a PLC
    • Online changes
    • Controller properties
    • Controller configuration
    • PLC Reboot
    • Time setup
    • Firewall settings
    • Dynamic Changes
    • Connection over a Proxy server
    • Alarms log
    • Profiles
    • PLC task definition
    • Communication channel settings
    • Definition of HW variables for a communication channel
    • Automatic assignment of a Domat device
    • Export of devices
    • Import of devices
    • Coupling IOs
    • Global variables mapping to hardware I/O
    • Access to variables of another PLC
    • SSL Communication
    • Modbus server setup
    • BACnet server setup
    • SSCP serial server settings
    • OPC server
    • Variable transformation, configuration of analogue inputs
    • History, saving data in a database
    • Alarm overview
    • Debugging
    • Licensing PLC
    • Break points
    • Break points window
    • Exceptions
    • Manual mode
    • Properties of hardware platforms
    • System status
    • PLC resource usage
    • Variables backup
    • Modbus Configurator
    • Comparison of local and remote project
    • Syslog Protocol
    • Bulk write to variables
  • Communication protocols description

    • MQTT protocol driver
    • BACnet protocol driver
    • Daikin iTC (.NET) protocol driver
    • Hauser (.NET) protocol driver
    • IEC 60870-5-104 protocol driver
    • IEC 62056-21 protocol driver
    • K-Bus protocol driver
    • Modbus protocol driver
    • M-bus protocol driver
    • SoftPLC Link protocol driver
    • SSCP protocol driver
    • Text Parser (.NET) protocol driver
    • wModbus protocol driver
  • Project
    • New project
    • Variable definition
    • Autogen - Automatic mapping of variables
    • FUPLA editor
    • ST editor
    • Watch
    • Variable browser
    • Charts
    • Port Monitor
    • Results
    • Output
  • HMI editor
    • Description of HMI editor
    • Binary function
    • Work in Simple mode
    • Work in Full mode
    • User policy
    • HMI text editor objects
    • Definition of LCD menu for PLC
    • Terminal text menu definition
    • HMI graphical objects
    • Terminal graphic menu definition
    • Creating styles
    • Web server
    • Service web
    • Controller as external webserver
    • Domat Visual
  • Software
    • New Solution
    • New Solution in Simple mode
    • Programming languages
    • Access to inputs/outputs of inner block
    • Initial values
    • Common elements

      • Identifiers
      • Keywords
      • White space
      • Comments
      • Literals
      • Variables
      • Constants
    • Data types

      • Elementary data types (BOOL, INT, REAL, STRING, etc.)
      • Generic data types
      • Derived (user) data types
      • Implicit conversions for elementary types
      • Inference rules for overloaded functions selection
    • Object oriented programming (OOP)
      • Pointer data type
      • Reference data type
      • Namespace
    • Program organisation unit (POU)
      • Functions
      • Standard functions
      • Function blocks
      • Standard function blocks
      • Programs
    • ST language (Structured Text)

      • ST editor
      • ST language commands
      • ST language operators
      • ST drivers
    • FUPLA language (FUnction PLAn)

      • FUPLA editor
      • FUPLA wires
      • Visibility of inputs and outputs at a function block
    • Libraries

      • Creating a new library
      • Creating user library
      • Library prototypes
      • Basic Analogue Boxes

        • Composition / Decomposition

          • Bit Composition (BD18)
          • Bit Composition 8bit (BD18)
          • Bit Decomposition (BD19)
          • Bit Decomposition 8bit (BD19)
          • Int Composition (BD55)
          • Int Decomposition (BD54)
        • Controllers

          • Direct Acting (cooling)

            • On-Off Control - Cooling (B30)
            • P-Controller - Cooling (B32)
            • PI-Controller - Cooling (B34)
            • PID-Controller - Cooling (B36)
          • Reverse Acting (heating)

            • On-Off Control - Heating (B31)
            • P-Controller - Heating (B33)
            • PI-Controller - Heating (B35)
            • PID-Controller - Heating (B37)
          • Helpers

            • Helper: Multi In Bool
            • Helper: Multi In Bool 8
            • Helper: Multi In Lint
            • Helper: Multi In Real
            • Helper: Multi Out Bool
            • Helper: Multi Out Bool 8
            • Helper: Multi Out Lint
            • Helper: Multi Out Real
        • Mathematics

          • ABS
          • ADD
          • AVG
          • CEIL
          • DIV
          • FLOOR
          • MAX
          • MIN
          • MOD
          • MUL
          • Smart Average (B48)
          • SUB
          • TRUNC_DINT
          • TRUNC_INT
          • TRUNC_LINT
          • TRUNC_SINT
          • TRUNC_UDINT
          • TRUNC_UINT
          • TRUNC_ULINT
          • TRUNC_USINT
          • Compare Functions

            • EQ
            • GE
            • GT
            • LE
            • LT
            • NE
          • Logarithm / Exponential Functions

            • EXP
            • EXP10
            • EXP2
            • EXPT
            • LN
            • LOG
            • SQRT
          • Specials

            • ISINFINITY
            • ISNAN
            • ISNEGATIVEINFINITY
            • ISPOSITIVEINFINITY
          • Time

            • ADD_DT_TIME
            • ADD_LDT_LTIME
            • ADD_TOD_TIME
            • ADD_LTOD_LTIME
            • CONCAT_DATE_TOD
            • DIVTIME
            • MULTIME
            • SUB_DATE_DATE
            • SUB_DT_DT
            • SUB_DT_TIME
            • SUB_TOD_TIME
            • SUB_TOD_TOD
          • Trigonometric Functions

            • ACOS
            • ACOSH
            • ASIN
            • ASINH
            • ATAN
            • ATANH
            • COS
            • COSH
            • SIN
            • SINH
            • TAN
            • TANH
        • Sources

          • B3 Sine Wave Generator
          • B4 Saw Wave Generator
        • Specials

          • Analogue Incremental Counter (B107)
          • Analogue Memory (B105)
          • Analogue Shift Register (B110)
          • Integer Memory (B106)
          • Integer Shift Register (B111)
          • Integrator (B113)
          • RAND
        • Switches

          • Analogue Demultiplexer (B10)
          • Integer Demultiplexer (B12)
          • MUX
          • SEL
        • Time Blocks

          • GETDELTATIME
          • GETDELTATIME4
          • GETDSTOFFSET
          • GETEVALTIME
          • GETEVALTIME4
          • GETLOCALTIME
          • GETTIMEZONEOFFSET
          • GETUTCTIME
          • PLC Time (B99)
          • SETSYSTEMTIME
          • Time+Date to Total Seconds (B97)
          • Total Seconds to Time+Date (B98)
          • Conversions

            • COMPOSEDATETIME
            • CONVERTTOLOCALTIME
            • CONVERTTOUTCTIME
            • DATETOTALDAYS
            • DATETOTALHOURS
            • DATETOTALMILLISECONDS
            • DATETOTALMINUTES
            • DATETOTALSECONDS
            • DECOMPOSEDATE
            • DECOMPOSETIME
            • Time Conversion (B100)
            • TIMETOTALDAYS
            • TIMETOTALHOURS
            • TIMETOTALMILLISECONDS
            • TIMETOTALMINUTES
            • TIMETOTALSECONDS
        • Time Dependent

          • Filter (B86)
          • Pulse Width Modulation (B87)
          • Slew Rate Limit (B84)
          • Variable Slew Rate Limit (B85)
        • Transfer Function

          • LIMIT
          • Limits (B82)
          • Linear Interpolation (B83)
          • Two-Point Function (B80)
          • Four-Point Function (B81)
        • Type Casts

          • BCD_TO_UDINT
          • BCD_TO_UINT
          • BCD_TO_ULINT
          • BCD_TO_USINT
          • DT_TO_DATE
          • DATE_TO_LDATE
          • DATE_TO_DT
          • DATE_TO_LDT
          • DATE_TO_LTOD
          • DATE_TO_TOD
          • DT_TO_LDT
          • DT_TO_LTOD
          • DT_TO_TOD
          • LDATE_TO_DATE
          • LDATE_TO_DT
          • LDT_TO_DATE
          • LDT_TO_DT
          • LDT_TO_LDATE
          • LDT_TO_LTOD
          • LTIME_TO_TIME
          • LTOD_TO_DT
          • LTOD_TO_LDT
          • LTOD_TO_TOD
          • TO_BCD_BOOL
          • TIME_TO_LTIME
          • TO_BCD_BYTE
          • TO_BCD_DWORD
          • TO_BCD_LWORD
          • TO_BCD_WORD
          • TO_BYTE
          • TO_DINT
          • TO_DWORD
          • TO_INT
          • TO_LINT
          • TO_LREAL
          • TO_LWORD
          • TO_REAL
          • TO_SINT
          • TO_STRING
          • TO_UDINT
          • TO_ULINT
          • TO_USINT
          • TO_WORD
          • TOD_TO_LTOD
      • Basic Digital Boxes

        • Counters

          • Pulse Counter (BD30)
          • Down

            • Counter DINT (IEC 61131)
            • Counter INT (IEC 61131)
            • Counter LINT (IEC 61131)
            • Counter UDINT (IEC 61131)
            • Counter ULINT (IEC 61131)
          • Up

            • Counter DINT (IEC 61131)
            • Counter INT (IEC 61131)
            • Counter LINT (IEC 61131)
            • Counter UDINT (IEC 61131)
            • Counter ULINT (IEC 61131)
          • UpDown

            • Counter DINT (IEC 61131)
            • Counter INT (IEC 61131)
            • Counter LINT (IEC 61131)
            • Counter UDINT (IEC 61131)
            • Counter ULINT (IEC 61131)
        • Logical Operations

          • AND
          • NEG
          • NOT
          • OR
          • ROL
          • ROR
          • SHL
          • SHR
          • XOR
        • Sources

          • Pulse Generator (BD2)
        • Specials

          • Alarm Memory Ext. (BD57)
          • Boolean Memory (BD51)
          • Falling Edge Detection (IEC 61131)
          • Flip Flop (BD52)
          • Latch Flip Flop (BD53)
          • Multiple Alarm Memory (BD50)
          • Rising Edge Detection (IEC 61131)
          • RS FlipFlop (IEC61131)
          • Single Alarm Memory (BD49)
          • Single Alarm Memory w. Delay (BD56)
          • SR FlipFlop (IEC61131)
          • Toggle
        • Switches

          • Digital Demultiplexer (BD11)
        • Time Dependent

          • Digital Filter (BD15)
          • Monostable FlipFlop
          • Monostable FlipFlop (Non Resetable)
          • Pulse Encoder (IEC 61131)
          • Switch-Off Delay (BD13)
          • Switch-Off Delay (IEC 61131)
          • Switch-On Delay (BD12)
          • Switch-On Delay (IEC 61131)
          • Switch-On/Off Delay (BD14)
        • Type Casts

          • TO_BOOL
      • Basic String Boxes

        • BYTES_TO_STRING
        • CONCAT
        • DELETE
        • INSERT
        • FIND
        • LEFT
        • LEN
        • LINT_TO_STRING
        • LREAL_TO_STRING
        • MID
        • REPLACE
        • RIGHT
        • STRING_TO_BYTES
        • TO_STRING
      • Communications

        • Emails

          • Send Mail
          • Send Mail Triggered
          • Send Mail Custom
        • Input / Output Functions

          • Close Port
          • Get Port Status
          • Open Port
          • Read Port
          • Write Port
        • SMS

          • Receive SMS
          • Send SMS
          • Send SMS Triggered
      • HVAC

        • Boiler Shifts

          • Bit Rotation (T14)
        • Others

          • E-max - Load shedding (T34)
          • Heat / Cool Recovery Block (T39)
          • Heating Curve (T1)
          • Min / Max Controller (T33)
          • Operating Hours (T32)
          • Power Meter (T36)
          • Pump Switch (T35)
          • Average Power Meter (T37)
        • Physics

          • Dew Point (T28)
          • Enthalpy (T29)
          • Solar Calculator (T40)
        • Time Programs

          • Bool Scheduler (T17)
          • Bool Scheduler Basic (T17)
          • Integer Scheduler (T19)
          • Integer Scheduler Basic (T19)
          • Real Scheduler (T18)
          • Real Scheduler Basic (T18)
        • Valve Controls

          • Three Point Control - Feedback (T6)
          • Three Point Control (T2)
          • Three Point P-Controller (T8)
      • System Function

        • Get Event Trigger Variable
        • Get Exception Error Code
        • Get Startup Flags
        • Mutex Lock
        • Mutex Unlock
        • Resume Normal Tasks
        • Stop Interface Entry Point
        • Alarm Functions

          • Acknowledge Alarm
          • Alarm State Machine
          • Reset Alarm
        • Dynamic Parameters

          • HwConfiguration

            • DateTime Settings
            • Domat DB Parameters
            • Networking
            • Proxy Parameters
            • Restart PLC
            • SSCP Parameters
            • Storage
            • Users Definition
          • Image

            • Alarm

              • GSM
              • SMTP
            • Device

              • BACnet Client Device
              • BACnet Server Device
              • Daikin iTC Device
              • Mbus Device
              • Modbus RTU Device
              • Modbus TCP Device
              • SoftPLC Link Device
              • SSCP TCP Device
            • Channel

              • Serial Channel
              • TCP/UDP Channel
  • Domat devices
    • PLC

      • mark130.2
      • mark220
      • mark220LX
      • mark320
      • mark320LX
      • mark520
      • markMX
      • markMX.2
      • markMX.3
      • markMXL
      • Windows RT
      • ICIO205.2
      • IMIO105.2
      • IMIO110.2
      • w750-8101
      • w750-8102
      • w751-9301
      • wCIO
      • wCIOcom
      • wMX
      • wMXcom
    • Operator units

      • HT102
      • HT104
      • HT200
      • HT3xx
    • Device

      • ECIO2 - Compact I/O module, Ethernet
      • EPC102 - Heating controller
      • FC010 - Communicative fan coil controller
      • FC013 - Communicative room temperature controller for heating and cooling panels and VAV damper
      • FC015 - Communicative room temperature and CO2 controller for heating and cooling panels and VAV damper
      • FC020 - Communicative fancoil controller
      • FCR010 - Communicative fan coil controller
      • FCR011 - Communicative fan coil controller, powered 230 VAC
      • FCR013 - Communicative room temperature controller for heating and cooling panels and VAV damper
      • FCR015 - Communicative room temperature and CO2 controller for heating and cooling panels and VAV damper
      • M090 - Modbus TCP / DALI converter
      • M100 - Temperature sensor
      • M200 - 4 digital outputs
      • M215 - 8 digital outputs with manual intervention
      • M300 - 8 digital (open collector) output module
      • M312, M313 - Triac output module, PWM
      • M315 - 8 SSR outputs, manual intervention
      • M320 - 16 digital outputs module
      • M325 - 16 digital outputs module, manual intervention
      • M400, M401, M410, M411 - Digital input modules
      • M420 - 16 digital inputs module
      • M430 - 32 digital inputs module
      • M500 - 8 analogue inputs module
      • M504 - Analogue input module
      • M560 - Universal analogue input module
      • M580 - String DC current measuring module
      • M610 - Analogue output module
      • M620 - Analogue 4 current loop output module
      • M710 - Pulse counter module, 4 inputs
      • MC102 - Heating controller
      • MCIO2 - Compact I/O module, Ethernet
      • MLIO - Small distributed I/O module
      • MMIO - Small compact I/O module
      • MT020 - Alarm and fault indicator
      • MTala010 - Alarm indicator
      • MW100 - RFID card interface
      • MW240, MW240-B, MW241 - Small I/O module for lights and sunblind control
      • MW501 - Analogue input module
      • MXIO - Compact I/O module
      • R060 - Converter Modbus TCP, RTU/MP-Bus
      • R065 - Converter Modbus TCP/DMX512
      • R091 - Modbus TCP/DALI convertor
      • R220 - 12 digital outputs
      • R312, R313 - Triac output module, PWM
      • R320 - 16 digital outputs module
      • R330 - 32 digital outputs module
      • R420 - 16 digital inputs module
      • R430 - 32 digital inputs module
      • R500 - Universal analogue input module
      • R560 - Universal analogue input module
      • R610 - Analogue outputs module
      • R710 - Pulse counter module, 4 inputs
      • R800 - 8 AI and 8 AO module
      • RCIO - Compact I/O module, Ethernet
      • RMIO - Small compact I/O module
      • RXIO - Compact I/O module
      • Stelix DIP200 - Motion and light sensor
      • UC102 - Communicative heating controller
      • UC120 - Communicative heating controller, output 0..10V
      • UC150 - Communicative heating controller, Ethernet
      • UC200 - Communicative heating and cooling controller
      • UC210 - Communicative heating and cooling controller
      • UC211 - Communicative heating and cooling controller
      • UC220 - Communicative heating and cooling controller, outputs 0...10V
      • UC250 - Communicative heating and cooling controller, Ethernet
      • UC300 - Communicative floor heating controller
      • UI0xx - Room operation unit
      • UI0xxBL Room operation unit with display backlight
      • UI3xx - Room operation unit
      • UI410 - Module for measuring and monitoring
      • UI415 - Solar irradiation integrator
      • UI5xx - Room operation unit, Ethernet
      • UI6xx - Room operation unit, Ethernet, PoE
      • US100 - Communicative heating controller with sunblind control
      • UX0xx - Communicative room units with sunblind control
      • UI9xx Room operation unit with CO2
      • UI9xxBL Room operation unit with CO2 and display backlight
      • GW-wModbus
      • GW-wModbus Pro
    • Sensors

      • UT090 - Room temperature and CO2 sensor
    • Wago modules

      • w704-2054 - 16× DI or 16× DO
      • w750-404 - 2× up/down counter
      • w750-404-000-005 - 2× 16-bit up counter
      • w750-450 - 4× AI for resistance/temperature measurement
      • w750-451 - 8× AI for resistance/temperature measurement
      • w750-453 - 4× AI for current 0...20 mA
      • w750-455 - 4× AI for current 4...20 mA
      • w750-457 - 4× AI for voltage 10...10V
      • w750-458 - 8× AI for thermocouples
      • w750-459 - 4× AI for voltage 0...10V
      • w750-471 - 4-channel analog input; Voltage/Current
      • w750-496 - 8× AI for current 0...20mA, 4...20mA or 3.6...21mA
      • w750-497 - 8× AI for voltage 0...10V DC or ±10V DC
      • w750-511 - PWM signal generator
      • w750-515 - 4× relay module
      • w750-517 - 2-channel relay output
      • w750-530 - 8× DI
      • w750-553 - 4× AO for current 0...20mA
      • w750-555 - 4× AO for current 4...20 mA
      • w750-556 - 2× AO for voltage ±10 V
      • w750-559 - 4× AO for voltage 0...10V
      • w750-597 - 8× AO for voltage 0...10 V and ±10 V
      • w750-600 - bus termination module
      • w750-602 - internal bus power supply module, 10 A
      • w750-613 - internal bus power supply module, 2 A
      • w750-627 - termination module for bus extension
      • w750-628 - bus extension module
      • w750-638 - binary pulse counter
      • w750-642 - EnOcean radio receiver
      • w750-652 - RS-485, RS-422 or RS-232 module
      • w750-960 - PROFIBUS industrial bus connector
      • w750-1400 - 16× DI
      • w750-1405 - 16× DI
      • w750-1406 - 16× DI

SSL communication

IDE version 2.5.0.x and above.

SSL (Secure Sockets Layer) and its successor TLS (Transport Layer Security) are network protocols for establishing of trusted and encrypted connections between two computers in a network. Although the SSL protocol went obsolete with the release of TLS, it is common to call these technologies as „SSL“ or „SSL/TLS“.

SSL protocols are used for two reasons:

  • Identification - thanks to SSL, both client and server are sure that they talk to each other and not to a third entity which claims itself to be one of the parties.
  • Encrypted communication - SSL arranges secure exchange of keys and creation of a shared secret, which both client and server use to encrypt the communication to protect the contents against reading or modification by third party..

SSL certificate

The certificates contain security elements against forging, so that every particiant of the communication can automatically verify that the certificate is valid.

Moreover, they carry information about the server they belong to - so it can be verified that the communication really follows with the server of the domain which owns the certificate. They also contain date of issue and date of validity - certificates must be renewed periodically so that they can be trusted. Last but not least, certificates also contain the public key of the owner, which allows to start the encrypted communication.

Management of SSL certificates

Certificates can be managed via "PLC Operations"->"Manage Certificates".

The certificate management dialog allows you to upload, delete, merge or download individual certificates.

Uploading is done by selecting the certificate via the dialog for selecting a file from the computer, when the "Upload" button becomes visible after selecting the certificate. Default certificate authority (CA), user CA, server certificate, server private key, web server certificate and web server certificate key can be uploaded.

RT must be restarted to apply the certificates.

We can also delete all items.

Certificates can also be downloaded directly from the website via the URL address, where we choose either to download the certificate locally to the computer, or to upload the certificate directly to the PLC.

If we need more certification authorities, then for the item default or user certificates, the merging of uploaded certificates works, when after clicking on one of the items, we can display the individual certificates again, or delete the certificates.

  • Default CA - a Domat CA certificate is uploaded in the production as self-signed, may be replaced by another certificate. Required for Proxy and Database connections, if Certificate Validation is checked.
  • User CA - empty by default, an optional certificate of certification authority added by the user can be uploaded here
  • Server private key - required for secure SSCP connection (from IDE, or other PLCs). A private key is uploaded at the production.
  • Server certificate - required for secure SSCP connection (from IDE, or other PLCs). A server certificate signed by the Domat authority is uploaded at the production.
  • Web server certificate and Web server certificate key - empty by default, required for secure web access (https://), must be provided by the domain owner of the domain where the PLC web server will be available (e.g. plc.company.com)

Note that all certificates do have limited validity in time and must be reissued and reinstalled periodically, otherwise the system functionality will be disabled - connections between PLCs and clients will not be possible to establish. The certificate management system shall be consulted with the IT manager of the network.

Current certificate information is also visible in the System Status when debugging the solution.

Setup of encrypted communication between PLC and IDE

After the Server certificate and Server private key have been uploaded to the PLC, the SSL server must be enabled in the PLC Properties in the SSCP Parameters section. Finally, upload configuration to the PLC.

Then, in the Connection parameters the TCP port 12346 must be changed to 12347 and SSL must be enabled. Then, start debugging and check that the PLC connects and the comunication with IDE works properly.

Setup of encrypted communication between PLC and PLC

Here, one of the PLCs is a server and the other is a client.

The server setup is described above, in  "Setup of encrypted communication between PLC and IDE".

In the client PLC, insert a SSCP channel, insert a device, and in the Device properties select the source PLC. Then, select one of the endpoint definitions:

  • HwConfiguration - takes over the SSL settings from "Enable SSL Server" in the SSCP parameters. "SSL Port" is not used.
  • Deploy - takes over the SSL Enable setting and certificate validation from the target PLC Connection parameters.
  • Custom -  SSL Enable setting and certificate validation can be set individually in the Device properties.

If the communication follows over a Data source, the SSL Enable setting and certificate validation is taken over the Data source properties.

Setup of encrypted communication for the database

The PC where the Domat DB is installed must be reconfigured: in the IIS Manager, change the Bindings settings:

Click the home page, and go to "Webs", select MerbonDatabaseAdapter, and in Actions go to Bindings.

Here, add a new binding of https type, a temporary port e.g. of 8687(because of http binding duplicity) and finally select the SSL certificate. If there is no company certificate available, it is possible to create a self-signed certificate. After the binding is created, it is possible to delete the old binding. Remember to change the temporary port value to 8686.

In IDE, in the PLC properties, "Domat DB Parameters" change the URL from http to https://(IP address of the DB server):8686/spdba/save and then upload the configuration to the PLC.

Setup of encrypted communication for the Proxy

In the Proxy Parameters section enter the Proxy ID, and URL as https://(proxy_ IP):12349/, certification validation if required, and upload the configuration to the PLC.

Next, in the PLC connection parameters change the type from TCP to Proxy. In the Connection parameters fill in the proxy URI as tcps://(proxy_IP):12348 and enter the Proxy ID same as in the Proxy Parameters.

Click Start debugging to connect to the PLC over a secure connetion to the proxy server.

Setup of encrypted communication for SMTP

For this, a PLC is necessary with the default certification authority uploaded from the factory, or upload your own certification authority.

Next, in the PLC in Messaging insert a SMTP alarm channel, and in its properties enable SSL, and certificate validation if required. The port may be 587 or 465 according to the SMTP server settings (must be provided by the mail service provider).

Confirm changes and upload the solution to the PLC.

Example for certificate validation for smtp.centrum.cz

We set the properties of the SMTP channel.

To download the SMTP certificate, we can use e.g. OpenSSL, which we need to download and install.

After installation, we open "Win64 OpenSSL Command Prompt"

We enter the command: openssl s_client -connect smtp.centrum.cz:465

Here we will be mainly interested in the server certificate, which we will copy and paste into a notepad or Notepad++. We then save this file, for example, as smtp_centrum.cer.

After opening the certificate, we click on the "Certification Path" tab, here we are not interested in the end address, but only the path to the certification authority, in this case "Sectigo RSA Domain Validation Secure Server CA".

Click on "View Certificate"

Switch tab to "Details"

Click on "Copy to File..."

It will open for us "Certificate Export Wizard". Click on "Next"

We select format "Base-64 encoded X.509 (.CER)" and click on "Next".

We name the certificate with the certification authority and click on "Next".

We check the certificate export settings and click on "Finish".

Finally, we should see a dialog about the successful export of the certificate.

We will then upload this exported certificate to the PLC as certification authority.

Setup of HTTPS for the web server

To change the web server from HTTP to HTTPS, you need to perform the following actions:

  • Upload the web server certificate and its key to the PLC via the "Upload certificates" dialog.

  • Install a certificate authority for the web server certificate among "Trusted Root Certification Authorities".

    • We'll start by right-clicking on the Certificate Authority certificate for the web server certificate and selecting "Install Certificate".

    • Next, select the storage location (Current User/Local Machine) and click on "Next".

    • Here we select the option "Place all certificates in the following store", where after clicking on "Browse..." we select "Trusted Root Certification Authorities" and then click on "Next".

    • Finally, click on "Finish".

  • In the directory C:\Windows\System32\drivers\etc\hosts add the name of the web certificate for the IP address of our PLC.

  • Upload the configuration for HTTPS to the PLC.

  • Upload web server to PLC.

After successful setup, we should be able to access the website via the link https://"web certificate name" (e.g. "https://web_cert.domat.cz").

The default HTTPS port is 443; if another port number shall be used, a rule must be added to the firewall settings in the PLC (use WinSCP and edit the Linux firewall configuration file).

The web server in the PLC runs in the following modes:

  • Disabled - no web service allowed
  • HTTP - unsecured connection
  • HTTPS - secured connection only
  • HTTP + HTTPS - both connection types available
  • HTTPS + HTTP redirect - if a http connection is attempted, the browser is automatically redirected to https (recommended).
Remember to upload the configuration to the PLC after all settings are done.
Prev
Access to variables of another PLC
Next
Modbus server setup