Plugin: PROFINET IO (GInsPNIODevice)

How to set up the PROFINET IO on the Q.station X PN

Introduction

The GInsPNIODevice plugin transforms the Q.station X into a PROFINET IO slave device. Measurement data can be transferred over a PROFINET network to a PROFINET IO controller and values can be written by the PROFINET IO controller to the Q.station X.

Minimum system requirements

Plugin installation

Download the correct plugin version that matches the controller firmware version from the Gantner public download area.
User: support
Password: gins

For installation instructions please refer to the page: installing a plugin.

Technical specifications

  • PROFINET device class: IO Device
    • Vendor ID: 0x04A2 (1186)
    • Device ID: 0x00AF (175)
  • PROFINET specification: V2.3 Edition 2, Maintenance Update 3 (Ed2 MU3)
  • PROFINET Conformance Class (CC): CC-A
  • PROFINET net load class: I
  • PROFINET profile: no
  • Functions and protocols
    • Cyclic Data Exchange (RT): yes
    • Isochronous Data Exchange (IRT): no
    • Acyclic Parameter Data (Record Data CR): yes
    • Device Identification(I&M 0): yes
    • Advanced Device Identification (I&M 1-5): yes
    • Device Diagnostics: no
    • Alarms: no
    • Topology information (LLDP): yes
    • Simple Network Management Protocol (SNMP): yes
    • Discovery and Basic Configuration Protocol (DCP): yes
    • Link Layer Discovery Protocol (LLDP): yes
    • Dynamic Host Configuration Protocol (DHCP): no
    • Media Redundancy Protocol (MRP): yes (client)
    • Shared Input: no
    • Shared Device: no
    • Dynamic Reconfiguration (CiR): no
    • System Redundancy (SR-AR): no
  • Cyclical Data Exchange
    • The number of cyclic input data: max. 1440 Byte
      (incl. IO Provider State and IO Consumer State)
    • The number of cyclical output data: max. 1440 Byte
      (incl. IO Provider State and IO Consumer State)
    • The number of sub-modules: max. 255 (slot 1 - 255)
    • Number of Application Relationships (AR): 1
    • Number of Communication Relationship (CR): only 1 Input-CR and 1 Output-CR supported
    • Cycle time for updating the IO data
      • min. 1 ms (:!: under certain conditions to be observed)
      • max. 1 s
  • Physical interface:
    • Ethernet controller with 2 integrated switch ports
    • Connection: 2x RJ45 jack (IP20)
    • Ethernet 100 MBit/s
    • Transmission medium: copper cable
    • Full duplex: yes
    • Half-Duplex: no; is recognized, but a connection establishment is rejected
    • Auto Negotiation: yes
    • Auto Crossover: yes

Scope of delivery

Installation

  • The installation package for the “GInsPNIODevice” plugin is provided as a ZIP archive (eg "GInsPNIODevice ## qstation-qa3-32_2.14.10.zip" for the “Q.station” with FW version “V2.14 B10”).
  • Installation is carried out using a USB stick:
    • Unzip the archive "GInsPNIODevice ## qstation-qa3-32_x.xx.x.zip" and copy the files it contains onto an empty USB stick (“FAT32” file system):
      • GInsPNIODevice.zip
      • autorun.sh
    • Plug the USB stick into one of the USB ports of the “Q.station”.
      The “GInsPNIODevice” plugin is now automatically installed and registered.
      :!: An already installed “GInsPNIODevice” plugin is automatically removed including all configuration files!
    • As a check, the file “# actual.sta” can be read from the controller (FTP connection with user name “6” and password “6”).
      If the plugin was successfully installed, there is a corresponding entry in the section “PLUGIN STATES:”; e.g .:
      PLUGIN STATES:
      Plugin 0: GInsPNIODevice Act: 1 Cycles: 15608555 Version: 0.1 Port: 1201

Start

After installing the plugin, it is only started (automatically) if the “Plugins” option for the controller is set to “activated”!

  • Configuration of the “Plugins” option (here shown for the configuration tool “test.commander”)


Functionality

  • The values of the “Process Image Variables (PI variables)” available in the “Q.station” controller are transferred in “slots” and “subslots”.
    • There are “input subslots” and “output subslots”:
      • “Input subslot”: input data (data direction “PROFINET IO Device” ⇒ “PROFINET IO Controller”)
      • “Output subslot”: output data (data direction “PROFINET IO Controller” ⇒ “PROFINET IO Device”)
    • The “subslots” are arranged in “slots”:
      • “Input subslots” are arranged in “Input slots”
      • “Output subslots” are arranged in “Output slots”
  • A PI variable with data direction “INPUT” or “INPUT/OUTPUT” can be assigned to an “Input subslot”.
    The input value of the PI variable is read and sent to the “PROFINET IO Controller”.
  • A PI variable with data direction “OUTPUT” or “INPUT/OUTPUT” can be assigned to an “Output subslot”.
    The value sent by the “PROFINET IO Controller” is written to the output value of the PI variable.
  • A PI variable with the data direction “INPUT/OUTPUT” can be assigned to both an “Input slot” and an “Output slot”.
    So it is e.g. possible to transfer the current value of a “SetPoint” variable with the data direction “Input & Output” to the “PROFINET IO Controller” and the “PROFINET IO Controller” can in turn set the value of the “SetPoint” variable.
  • The data type for a subslot is automatically selected based on the data type of the PI variable; implicit data conversion is not possible.
    For example: For a PI variable with the data type “SInt32”, a subslot with the data type “Integer32” is automatically configured.
  • The actual process data image (separate for input and output data) results from the order of the “slots” (slot number) and from the order of the variables assigned to the “subslots” (subslot number).
  • The size of the process data image results - separately for input and output data - from the number and the data type of the subslots.
    • The maximum size of a process data image is 1440 bytes: max. 1440 bytes for input and max. 1440 bytes for output data.
    • :!: The size of “IO Consumer Status” and “IO Provider Status” are included in the maximum size of 1440 bytes!
    • :!: The maximum size of 1440 bytes includes 4 bytes for the interface (“Data Access Point (DAP)” and ports)!
    • Process data image for input data
      • 4 bytes “Provider status” for the interface (“Data Access Point (DAP)” and ports)
      • + “Process data”: for each “input subslot” the number of bytes required for the data type (1..8 bytes)
      • + “Provider status”: 1 byte for each “Input subslot”
      • + “Consumer status”: 1 byte for each “Output subslot”
    • Process data image for output data
      • 4 bytes “Consumer status” for the interface (“Data Access Point (DAP)” and ports)
      • + “Consumer status”: 1 byte for each “Input subslot”
      • + “Process data”: for each “output subslot” the number of bytes required for the data type (1..8 bytes)
      • + “Provider status”: 1 byte for each “Output subslot”
  • Example:
    • Only input data and no output data are transferred.
      A maximum of 287 variables with the data type “Float 32-Bit” could be transferred.

Operation

  • The “GInsPNIODevice” plugin has its own XML-RPC interface “GInsPNIODevice/PluginAPI”.
  • The plugin is operated by calling the PluginAPI functions.
    These calls can be made with the tool “GI.monitor”:

    GInsPNIODevice Plugin-API

Configuration

  • If no configuration file is available when the plug-in is started, a configuration for the “PFORFINET IO Device” is automatically created from all PI variables available in the controller and saved.
    This default configuration can then be edited using the plugin API method "Configure".
    By calling the plugin API method "ConfigureDefault", a new “standard configuration” can be created at any time.

Configure

  • Using the “Configure” method, the functionality of the plug-in is configured with regard to “PROFINET IO”.
  • :!: A change in the configuration only takes effect after the “Stop” methods have been executed and then “Start”!
  • The configuration is saved permanently in an XML file in the installation directory of the plugin.
    • :!: When the plug-in is removed or reinstalled, an existing configuration file is deleted; the saved configuration is lost!
  • Slots and subslots
    • Each slot must be assigned a unique slot number (SlotNr = 1..255).
    • Subslots can be assigned to each slot by specifying variable names.
      The order of the subslots and the subslot number (1..255) is determined by the order of the variables.
      The data type of the subslot is determined automatically based on the data type of the variable.
    • :!: If an input slot is assigned a variable that does not have the data direction “INPUT” or “INPUT/OUTPUT”, this variable is not taken into account during configuration; no input subslot is configured for this variable!
    • :!: If a variable is assigned to an output slot that does not have the data direction “INPUT” or “INPUT/OUTPUT”, this variable is not taken into account during configuration; no output subslot is configured for this variable!
  • Network
    • Station name
      • The specification of the “StationName” is optional.
      • If no name is assigned to the station (empty field), the name of the station is created automatically:
        • “qstation-<SNR>”, SNR: serial number of the controller “Q.station” (6 digits)
        • e.g. “qstation-770849”
      • If a name is assigned to the station, the following rules must be observed:
        • 1 or more labels, separated by “.”
        • Total length is 1 to 240
        • Label length is 1 to 63
        • Labels consist of “a-z0-9-”
        • Labels do not start with “-”
        • Labels do not end with “-”
        • Labels do not use multiple concatenated “-”
        • The first label does not have the form “port-xyz” or “port-xyz-abcde” with a, b, c, d, e, x, y, z = 0…9, to avoid wrong similarity with the field “AliasName”
        • Station-names do not have the form a.b.c.d with a, b, c, d = 0…999
    • IP address
      • The specification of the “IPAddress” for the “PNIODevice” is optional.
      • If no IP address is explicitly assigned this is indicated with “0.0.0.0”.
        In this case, the IP address for the “Profinet IO Device” is assigned by the “Profinet IO Controller”.
    • Gateway
      • The specification of the IP address for the “gateway” is optional.
      • If no IP address is explicitly assigned, this is indicated with “0.0.0.0”.
    • Subnet mask
      • The specification of the “SubnetMask” is optional.
      • If no subnet mask is explicitly assigned, this is indicated with “0.0.0.0”.
  • Cycle time for updating the IO data
    • The cycle time for updating the IO data is exact or a multiple of the system cycle time (“SystemCycleTime”) of the controller, but at least 1 ms (1kHz).
    • By specifying a value greater than “1” for “SystemCycleCounter”, the cycle time for updating the IO data can be “reduced”; the cycle time is then “SystemCycleCounter * SystemCycleTime”.
    • :!: It is strongly recommended to check after every change of the configuration whether the cycle time for the update of the IO data is kept (see "Logging")!
    • :!: Compliance with a cycle time <10ms (> 100Hz) is subject to certain conditions:
      • Total utilization of the controller, which is determined by numerous factors; e.g.
        • Data transfer between controller and PC (transfer of online data or file transfer)
        • Data logging
        • Number of active plugins
      • Stability of time synchronization
        • Stability of the time signal used for time synchronization
  • Configuration example
    • Slots and subslots
      • Input slot with slot number “1” contains 4 subslots for the variables
        • “Timestamp”
        • “Variable 1”
        • “Variable 2”
        • “SetPointTest”
      • Input slot with slot number “2” contains 1 subslot for the variable
        • “Arithmetic_1”
      • Output slot with slot number “3” contains 1 subslot for the variable
        • “SetPointTest”
    • Network
      • No station name is given; the name of the station is created automatically.
      • No explicit IP address is given.
      • No explicit IP address is specified for “gateway”.
      • No explicit subnet mask is specified.
    • Cycle time for updating the IO data
      • The cycle time for updating the input and output data is ten times the system cycle time (SystemCycleCounter = 10)

        Methode "Configure"

"ConfigureDefault"

  • Using the “ConfigureDefault” method, a configuration is created from all PI variables in the controller.
  • :!: The configuration only becomes effective after the “Stop” and “Start” methods have been executed!
  • The configuration is saved permanently in an XML file in the installation directory of the plugin.
    • :!: When the plug-in is removed or reinstalled, an existing configuration file is deleted; the saved configuration is lost!
  • Slots and subslots
    • An input subslot is configured for each input variable.
      The order of the input subslots corresponds to the order of the variables configured in the controller with the data direction “INPUT”.
    • An output subslot is configured for each output variable.
      The order of the output subslots corresponds to the order of the variables configured in the controller with the data direction “OUTPUT”.
    • All input subslots are placed in one input slot.
    • All output subslots are places in one output slot.
    • :!: No further subslots are configured when the maximum utilization of the process data image has been reached!
  • Netzwerk
    • StationName = empty (the name of the station is created automatically)
    • IP Adress = 0.0.0.0
    • Gateway = 0.0.0.0
    • SubnetMask = 0.0.0.0
  • Cycle time for the update of the IO data: 10ms

"GetPNIODeviceConfig"

  • With the help of the “GetPNIODeviceConfig” method, the actual configuration and the current operating status can be determined.
  • The times “IOCycleTime” and “SystemCycleTime” are specified in “µs”.
  • :!: The configuration may possibly deviate from the configuration specified with “Configure” (e.g. specification of variables with inappropriate data direction or specification of a value for “SystemCycleCounter” which leads to the minimum permissible “IOCycleTime” being undershot)!
  • The “PROFINET IO Controller” is configured on the basis of this information and on the basis of the device description file (GSDML file) for “Q.station”.
  • Example
    • Configuration “GInsPNIODevice”

      Methode "GetPNIODeviceConfig"
    • Configuration and process data image for “PROFINET IO Controller” (“SYCON.net”)



Certification

Profinet is standardized in IEC 61158.
It is the basis for enabling devices in industrial plants to be networked with one another and for their data to be exchanged without errors.
Ensuring interoperability in automation systems requires appropriate quality assurance measures.
For this reason, the Profibus user organization has established a certification procedure in which certificates for Profinet devices are issued on the basis of test reports accredited to DIN ISO 9001.

With Profinet, all field devices must have a certificate from the Profibus user organization.
While with Profibus the certification of a field device is voluntary, the certification of a device with Profinet IO is mandatory!

The controller “Q.station” as “PROFINET IO Device” is not yet certified!
The plugin “GInsPNIODevice” should not be used in productive systems without prior consultation!

Communication LEDs

Q.station E1: LEDs

The communication LEDs “SF” (“system error”) and “BF” (“bus error”) as well as the LEDs “LINK” and “RX/TX” assume the states described below:

Monitoring the cycle time

  • The cycle time for the exchange of the IO data is monitored and logged if the value for “Log Level” is not “Log level none”.
  • Monitoring is carried out by evaluating the “V1: Timestamp” variable.
    :!: The variable “Timestamp” must contain the time since 2000-01-01 (“DCTime”).
  • In the project configuration for the “Q.station” controller, the variable “Timestamp” must be configured as follows (here shown for the tool “test.commander”)

    UNICODE��L�E�A�D� �T�e�c�h�n�o�l�o�g�i�e�s� �I�n�c�.� �V�1�.�0�1

Logging

  • When the plugin is started, a log file “ginspniodevice.log” is created in the directory /tmp/gins_tmp/ if the “LogLevel” is not “Log level none”.
    If the value for the “LogLevel” is changed to a value not equal to “Log level none” after the start of the plugin, then the log file is created automatically if it does not already exist.
  • Depending on the “LogLevel” set, entries are written to the log file.
    • The “Log Level” is set to the value “Log level none” in the delivery state or after restarting the plug-in.
    • The “log level” can be changed with the plugin API method “SetLogLevel”.
      Applicable values are “Log level none”, “Log level error” and “Log level information”.
    • :!: The “log level” is not saved in the configuration file for the plugin!
  • The log file can be read and edited (e.g. deleting the entire content) using an FTP connection (user “6”, password “6”). The log file is located in the directory /tmp/.
  • :!: The log file must not be removed (deleted)!
  • :!: When the plug-in is removed or reinstalled, an existing log file is deleted; the saved data will be lost!
  • :!: The log file is located in a temporary directory in RAM. When the controller is switched off, the existing log file is deleted!
  • :!: The log file is located in a temporary directory in RAM. The storage space provided for this is limited. So that other processes are not disturbed, the log file should not take up too much space. For continuous operation, the log level should therefore be set to “Log level none” using the “SetLogLevel” plugin API method!
  • Extract from a log file. The timestamp before each entry is “UTC” time; time zones are not taken into account.

    [12.12.2019 10:25:28] PluginInit(): begin
    [12.12.2019 10:25:28] Plugin information
    [12.12.2019 10:25:28] Plugin executable: GInsPNIODevice
    [12.12.2019 10:25:28] Plugin main thread name: "PNIOPluginMain"
    [12.12.2019 10:25:28] Plugin version: 0.1 (Dec 12 2019 10:24:01 UTC)
    [12.12.2019 10:25:28] Logging file name: /tmp/gins_tmp/ginspniodevice.log
    [12.12.2019 10:25:28] Logging level: information
    [12.12.2019 10:25:28] GLIBC version: 2.26
    [12.12.2019 10:25:28] Temporary files directory: /tmp/gins_tmp
    [12.12.2019 10:25:28] PluginInit(): end
    [12.12.2019 10:25:28] PluginMain(): begin
    [12.12.2019 10:25:28] Process information
    [12.12.2019 10:25:28] PID = 928
    [12.12.2019 10:25:28] PPID = 741
    [12.12.2019 10:25:28] Main thread ID = 928
    [12.12.2019 10:25:28] PluginMain(): SMState_NotDefined --> SMState_Init
    [12.12.2019 10:25:28] SMHandler_Init(): begin
    [12.12.2019 10:25:28] SMHandler_Init(): end
    [12.12.2019 10:25:28] PluginMain(): SMState_Init --> SMState_Idle
    [12.12.2019 10:25:32] ==> PluginStart()
    [12.12.2019 10:25:32] PluginMain(): SMState_Idle --> SMState_Start
    [12.12.2019 10:25:32] SMHandler_Start(): begin
    [12.12.2019 10:25:32] Starting PNIODevice ...
    [12.12.2019 10:25:32] Load plugin configuration ...
    [12.12.2019 10:25:32] PNIODevice: set thread real-time scheduling ...
    [12.12.2019 10:25:32] PNIODevice: real-time scheduling, policy = SCHED_RR, priority = 90
    [12.12.2019 10:25:32] PNIODevice: Thread ID = 7
    [12.12.2019 10:25:34] Driver information
    [12.12.2019 10:25:34] DriverVersion : "cifX Toolkit 1.2.0.0"
    [12.12.2019 10:25:34] BoardCnt : 1
    [12.12.2019 10:25:34] Board information for board 0
    [12.12.2019 10:25:34] BoardName : "cifX0"
    [12.12.2019 10:25:34] BoardAlias : "MyAlias"
    [12.12.2019 10:25:34] BoardID : 0
    [12.12.2019 10:25:34] SystemError : 0x00000000
    [12.12.2019 10:25:34] IrqNumber : 0
    [12.12.2019 10:25:34] IrqEnabled : 1
    [12.12.2019 10:25:34] ChannelCnt : 2
    [12.12.2019 10:25:34] DpmTotalSize : 65536[Byte]
    [12.12.2019 10:25:34] System device information
    [12.12.2019 10:25:34] abCookie : netX
    [12.12.2019 10:25:34] DpmTotalSize : 32000[Byte]
    [12.12.2019 10:25:34] DeviceNumber : 1291109
    [12.12.2019 10:25:34] SerialNumber : 20119
    [12.12.2019 10:25:34] ausHwOptions[0] : 0x0080 (ETHERNET, internal PHY)
    [12.12.2019 10:25:34] ausHwOptions[1] : 0x0080 (ETHERNET, internal PHY)
    [12.12.2019 10:25:34] ausHwOptions[2] : 0xfffb (I2C PIO INTERFACE)
    [12.12.2019 10:25:34] ausHwOptions[3] : 0xfff6 (SYNC INTERFACE)
    [12.12.2019 10:25:34] Manufacturer : 1 (Hilscher GmbH)
    [12.12.2019 10:25:34] ProductionDate : 2019/KW34
    [12.12.2019 10:25:34] ulLicenseFlags1 : 0x00000000
    [12.12.2019 10:25:34] ulLicenseFlags2 : 0x00000000
    [12.12.2019 10:25:34] NetxLicenseID : 0
    [12.12.2019 10:25:34] NetxLicenseFlags : 0x0000
    [12.12.2019 10:25:34] DeviceClass : 0x0003 (CIFIX, all PCI types)
    [12.12.2019 10:25:34] HwRevision : 1
    [12.12.2019 10:25:34] HwCompatibility : 0
    [12.12.2019 10:25:34] Channel information for channel 0
    [12.12.2019 10:25:34] BoardName : "cifX0"
    [12.12.2019 10:25:34] DeviceNumber : 1291109
    [12.12.2019 10:25:34] SerialNumber : 20119
    [12.12.2019 10:25:34] FWName : "PROFINET IO Device"
    [12.12.2019 10:25:34] FWVersion : 3.13.2 Build 0
    [12.12.2019 10:25:34] FWDate : 17.10.2018
    [12.12.2019 10:25:34] ChannelError : 0xC0000145
    [12.12.2019 10:25:34] MailboxSize : 1596[Byte]
    [12.12.2019 10:25:34] IOInAreaCnt : 2
    [12.12.2019 10:25:34] IOOutAreaCnt : 2
    [12.12.2019 10:25:34] NetxFlags : 0x00000032
    [12.12.2019 10:25:34] HostFlags : 0x00000030
    [12.12.2019 10:25:34] HostCOSFlags : 0x00000000
    [12.12.2019 10:25:34] DeviceCOSFlags : 0x00000001
    [12.12.2019 10:25:34] Starting controller interface ...
    ...