Overview Network Bridge

With this function block a connection to another controller is established. This allows several controllers to be merged into one project. For example, to connect several standalone controllers to a central visualization.

With a connection, not all variables are transmitted, but only those main groups which have been specified in the parameter Filter.



Outputs

ST
Status
Status of the connection:
  • 0: Not connected
  • 1: Connected
  • 2: Connected and authenticated
  • -1: Network error
  • -2: Connection error (e.g.: IP address wrong)
  • -3: Authentication error (password wrong)
  • -4: The address of the remote station could not be resolved (DNS name unknown or invalid entry)
VB
Connected
1 when connected and authenticated otherwise 0.
TI
Received
Received telegrams
TO
Sent
Sent telegrams
WC Watchdog Counter Display Watchdog Counter. To monitor the connection, the remote station cyclically sends a keep-alive message. The counter is incremented for every keep-alive message received. If the counter does not change several times in a row, there is a problem with the connection and the connection is reset.

Parameters

Filter MG
In this parameter at least one main group must be specified as a filter. Only variables from this main group are transmitted. Several main groups can be specified separated by semicolon (";"). The filters are always specified without offset MG.

The filter is communicated to the remote station when the connection is established. From then on the remote station only sends the requested main groups, so that values which are not needed are not transmitted over the network at all. This also applies to the synchronisation when the connection is established.

Important: If the remote station is an older controller, it does not yet know this message and continues to send all values. In that case the filter works locally only, as before: only the telegrams that are passed to the runtime / logics are filtered.
Offset MG
Offset main group. When a variable is received, this offset is added to the main group, and subtracted when sending. When several controllers are connected, an individual main group can be defined for each controller via this offset; the main groups at the connected controllers can always remain the same.

For example, on the central controller the main groups 100,101,102 etc. are created, 100 is the first controller, 101 the second. On the connected controllers only the main group 100 is created. For the first controller offset 0, for the second 1 etc. is specified, so the projects at the connected controllers can always be the same.
Filter time Filter time in seconds. With this parameter telegrams are passed on with a delay. If an address changes several times within this time, only the last telegram is passed on. This parameter can be used if variables change very often in order not to overload the controller. Important: The filter does not limit the data actually transmitted over the network. Only the telegrams that are passed to the runtime / logics are filtered.
Direction
  • Bidirectional: The transmission takes place in both directions. With this setting, care must be taken that no loops arise, for example master sends a variable, slave changes it and sends, master changes and sends again etc.. Such errors can be recognized via the outputs TI/TO when an excessive number of telegrams is displayed here in a short time.
  • Send: Only variables are sent.
  • Receive: Only variables are received.
IP address
IP address of the controller to which the connection is made. DNS names and port can also be specified, for example xy.dyndns.org:2000 if the forwarding of the default port is not possible. Without a port the default port is used.

Important: A network bridge over the internet is explicitly not recommended. Such a connection is not fail-safe: the provider usually performs a forced disconnection, the address of the remote station changes in the process, and name resolution can fail temporarily. For a connection over the internet a VPN is the right way, within the building a dedicated network.

If the address cannot be resolved, the controller does not block. In this case the output ST shows -4 and the function block retries at increasing intervals.
Synchronisation when the connection is established
Defines which values are synchronised once when the connection is established. Afterwards every change is transmitted as usual.
  • Off: Nothing is synchronised. Useful for very slow connections.
  • Receive: The values of the remote station are requested and adopted. This is the default and the previous behaviour.
  • Send: The own values are sent to the remote station. This way the remote station does not work with outdated values after a reconnection.
  • Bidirectional: First the values of the remote station are adopted, then only those addresses are sent which the remote station did not report. For addresses present on both sides the state of the remote station therefore wins. If the own state should win, select Send.
Important: The direction limits the synchronisation. Whatever the direction does not allow is not synchronised either - with direction Receive nothing is sent.
Password
Password, this is the password that is specified when setting up a connection to the controller.


See also common parameters of all function blocks.