Signal Bridges
A bridge moves signal values from one interface to another inside the gateway. No PLC program or script is needed. CONNECT offers two kinds:
| Mirror | Mapping (1:1) | |
|---|---|---|
| Scope | All signals of an interface, or those matching a pattern | One signal to one signal |
| Target | An MQTT or shared memory (SHM) interface only | Any other interface |
| Names | Kept unchanged | Source and destination names are chosen by you |
| Type handling | None, the value is passed as it is | Strict or Coerce, or a conversion: INT ↔ BOOL, bits from or into a word, scaling, inversion |
Use a mirror to republish a whole controller to a broker or to a simulator that attaches through shared memory. Use a mapping to feed one value into another system, for example a robot status into a PLC input.
Mirror an interface
Section titled “Mirror an interface”The quickest route is the interface card:
- Open the CONNECT panel.
- Open the ⋮ menu of the source interface.
- Choose Mirror to MQTT… (enter an optional topic prefix, then Mirror) or Mirror to SHM (shared memory).
CONNECT creates the target interface if needed and adds the rule.
For full control, use the Bridges section below the interface list:
- Click Mirror.
- Pick the Source… interface and the Target (MQTT/SHM)… interface.
- Optionally change the pattern (default
*, all signals).*and?work as wildcards, for exampleAxis*. - Click Add.
MQTT publishes one topic per signal. A topic prefix such as rv/ is placed in front of the signal name. Shared memory exposes the mirrored signals in its header, fixed when the interface connects.
Map one signal to another
Section titled “Map one signal to another”- In the interface’s signal list, click the bridge icon of the signal (tooltip: Bridge to another interface (1:1 signal mapping)). The Bridge Signal dialog opens with Source signal filled in. Alternatively click Mapping in the Bridges section and type the source yourself.
- Enter the Destination signal. It must be a signal that another interface already provides. Both fields suggest known signal names.
- Choose the Conversion (see below). The dialog shows only the options the chosen conversion uses.
- Click Add Bridge.
Every bridge appears in the Bridges (n) list with an enable switch, an edit button and a delete button. Mirrors are tagged mirror. Mappings are tagged with their conversion: 1:1, 1:1 coerce, the mode name, or for bit mappings the mode and bit, for example BitToWord bit 3. The edit button opens the same dialog with the mapping filled in; Save Bridge replaces it. A rule the gateway considers invalid is refused and the reason is shown in the section.
Plain 1:1 with Strict or Coerce
Section titled “Plain 1:1 with Strict or Coerce”The conversion 1:1 (coercion) copies the value as before:
- Strict (default) requires source and destination to have the same value type.
- Allow coercion (Coerce) additionally allows
bool↔intandint→float. - Conversions with no clear meaning are rejected:
bool↔float,float→booland anything to or from text.
Mappings saved before conversions existed keep exactly this behaviour.
Conversions
Section titled “Conversions”The other conversions need a CONNECT version that supports them; with an older CONNECT the dialog offers only 1:1 (coercion). They are the modes of the Signal Connector component. A mapping and a connector with the same mode and options compute the same value, because both use one shared conversion core.
| Conversion | Mode | Source → destination | Options |
|---|---|---|---|
| Copy | Copy | BOOL → BOOL, INT → INT, REAL → REAL, INT → REAL | Invert negates a BOOL |
| INT → BOOL | IntToBool | INT → BOOL | Condition: NotZero (default, negative values count as true), Equals or GreaterOrEqual with Compare value; Invert |
| BOOL → INT | BoolToInt | BOOL → INT | TRUE value (default 1), FALSE value (default 0) |
| Bit from word | BitFromWord | INT → BOOL | Bit, Width, Invert |
| Bit to word | BitToWord | BOOL → INT | Bit, Width, Signed, Invert |
| Scale | Scale | INT or REAL → INT or REAL | Factor (default 1), Offset (default 0), Rounding (Round or Truncate), Width, Signed |
Width is Byte (8 bit), Word (16 bit, default) or DWord (32 bit). It sets the range of Bit (0–7, 0–15 or 0–31), how Scale reads an INT source and the range an INT destination is limited to. Signed (default on) decides whether that INT is read and written as signed. An option you leave out takes its default.
The number rules are those of the Signal Connector: INT values are 32-bit signed, REAL values are 32-bit floats (16777217 arrives as 16777216), Round rounds halves away from zero, and Scale into an INT is limited to the range of Width and Signed. A result that is not a finite number, such as a value beyond the float range, is not written; the destination keeps its last value and the log shows a warning.
One bit per mapping
Section titled “One bit per mapping”A mapping handles one bit. To read eight bits of a status byte, add eight Bit from word mappings with the same source and different Bit values. To build a word from eight BOOLs, add eight Bit to word mappings with the same destination.
The Bit to word mappings of one destination build the whole word together:
- The word holds exactly the bits of these mappings. Bits that no mapping writes are 0. The gateway never reads the word back.
- If the mappings of one word use different settings, the widest Width applies, and the word is signed only when all of them are Signed.
- When you disable or delete one of them, its bit becomes 0. When the last one goes, the word is set to 0 once.
Fan-in rule
Section titled “Fan-in rule”A destination that is written by a Bit to word mapping belongs to the bit mappings of that word. The gateway refuses a configuration in which
- the same bit of a word is written twice,
- one source feeds two bits of the same word, or
- another mapping (any other conversion) also writes that word.
Two ordinary mappings onto the same destination are allowed, as before, and listed as a fan-in warning: the last change wins. The gateway checks all of this when a mapping is saved, through the dialog, MCP, REST or a configuration change. A mode that does not fit the two signal types, such as BOOL → INT onto a REAL signal, or a Bit outside its Width is refused the same way. The type check needs both signals in the interface configuration; for a signal an interface only provides while it runs, a mismatch shows up as a warning in the log instead, and nothing is written.
Loop protection
Section titled “Loop protection”A value written by a mapping is tagged with its origin, and mappings ignore tagged changes. Two opposing mappings (A → B and B → A) therefore cannot ping-pong. The same tag means that mappings do not chain: when A → B and B → C exist, a change of A reaches B but not C.
Renaming signals
Section titled “Renaming signals”Renaming a signal in CONNECT updates every mapping that uses it, as source or as destination, and keeps its conversion and all options.
Model connector or gateway mapping?
Section titled “Model connector or gateway mapping?”The same conversions exist in two places. Pick by where the coupling belongs:
| Signal Connector (in the model) | Mapping (in CONNECT) | |
|---|---|---|
| Lives in | The model file, saved with the machine | The CONNECT configuration of this gateway |
| Runs | In the browser simulation, also without CONNECT (virtual PLC, robot simulation), and with CONNECT | In the gateway, also without any model or open browser |
| Chains | A → B → C passes on | Does not pass on (see loop protection) |
| Shows problems in | The Problems panel of the model | The Bridges section, bridge_list and the gateway log |
- Use a Signal Connector when the coupling is part of the machine: it travels with the model, works in the pure simulation, and is commissioned together with the model.
- Use a mapping when the coupling is part of the plant wiring between real controllers, and it has to work while no model or browser is running.
- Do not use both for the same destination signal. While the browser is connected to CONNECT, the model reports a connector and a mapping that write the same signal as
signal-connector-fan-in.
Writing to a real controller
Section titled “Writing to a real controller”A mapping that targets a signal of a real PLC or robot controller is a write from the gateway to the machine. It only reaches the controller if the destination interface has Allow Web → PLC writes switched on (interface dialog, off by default). See write access to the controller.
Example: robot position into a PLC
Section titled “Example: robot position into a PLC”A robot interface provides Robot1.TCP_Z (float). The PLC expects a float input PLC_RobotHeight.
- Check that the PLC interface has Allow Web → PLC writes enabled.
- In the signal list of the robot interface, click the bridge icon of
Robot1.TCP_Z. - Enter
PLC_RobotHeightas Destination signal, keep 1:1 (coercion) without coercion (both are float) and click Add Bridge.
Every change of Robot1.TCP_Z is now written to the PLC.
Example: robot status bits into a PLC word
Section titled “Example: robot status bits into a PLC word”The robot reports RobotReady and RobotFault as BOOL outputs. The PLC expects both in one status word Rob_Status (INT): bit 0 ready, bit 1 fault.
- Click the bridge icon of
RobotReady, enterRob_Status, choose Bit to word, leave Width at Word and set Bit to 0. Click Add Bridge. - Do the same for
RobotFaultwith Bit 1.
Rob_Status is now 1 while the robot is ready, 2 on a fault, 3 for both, and 0 otherwise.
Other ways to configure bridges
Section titled “Other ways to configure bridges”MCP. AI clients connected to CONNECT use bridge_list to read all rules plus the current config revision, and bridges_apply to change them in one all-or-nothing batch. The operations are mirror.upsert, mirror.remove, mapping.upsert and mapping.remove. A mapping is identified by its pair of sourceSignal and destSignal. Its conversion is given as mode (Copy, IntToBool, BoolToInt, BitFromWord, BitToWord, Scale) plus the options condition, compareValue, trueValue, falseValue, bit, width, signed, factor, offset, rounding and invert. bridge_list lists a mapping in exactly this form and only with the options that are set, so a listed mapping can be sent back unchanged. bridges_apply needs MCP write access and the expectedRevision from bridge_list; a stale revision is refused.
{ "op": "mapping.upsert", "mapping": { "sourceSignal": "RobotFault", "destSignal": "Rob_Status", "mode": "BitToWord", "bit": 1 } }REST. GET and PUT on /config/mirrors and /config/mappings, and the same operations as MCP on POST /config/ops. Invalid rules are answered with 400 and are not saved.
Config file. In connect-config.json, options are written only when they are set:
"Mirrors": [ { "SourceInterfaceId": "plc", "TargetInterfaceId": "mqtt", "SignalPattern": "*", "TopicPrefix": "rv/" }],"Mappings": [ { "Enabled": true, "SourceSignal": "Robot1.TCP_Z", "DestSignal": "PLC_RobotHeight", "Coercion": "Strict" }, { "Enabled": true, "SourceSignal": "RobotFault", "DestSignal": "Rob_Status", "Coercion": "Strict", "Mode": "BitToWord", "Bit": 1 }]Limits
Section titled “Limits”- Mirror targets are MQTT and shared memory only.
- The destination signal must already exist on another interface.
- Byte or word swapping, edges, delays and filters are not available.
See also
Section titled “See also”- Signal Connector: the same conversions as a component in the model
- Configuring interfaces
- Supported protocols
- REST and WebSocket API