PN4-GW2FP is a Solidot integrated gateway module for PROFINET to Free port (serial) conversion. In serial communication, the Free port protocol data transmission methods can be mainly divided into two categories: continuous sending and command-based sending (question-and-answer). This document describes in detail the configuration and application steps for the PN4-GW2FP module in different scenarios.

1. Preparation
Download the Solidot PN4-GW2FP configuration software "SDOT-FREEPORT" and create a new project. Set mode selection to "Producer-Consumer Mode". Select the physical standard according to the actual situation. In this example, a USB-to-RS232 serial cable is used, so select "RS232".

For the "Subnet", configure the parameters of the connected serial device, such as baud rate, data Bits, parity, and stop Bit. Other parameters can be left at their defaults.

2. Producer mode configuration
The producer, also called a request, is an output for the module. It transmits the specified data from the fieldbus network (PROFINET) to the serial device.
Right-click "Subnet" and add a "Node". Then right-click "Node" and add a "Producer". Keep the slave address at the default value of 1 (currently inactive).

example: Producer mode Application Scenario (1)
Continuously send (output) data at the configured cycle time

Send mode selection: Cyclic. Data frames are sent periodically at an interval set by the Send Delay time (10 ms). For example, with the default value of 100, the corresponding interval time is 100 x 10 = 1000 ms, and data is sent cyclically at this interval.
Send delay (10 ms): 100. Data is sent cyclically at an interval time of 100 x 10 = 1000 ms.
Trigger byte Memory Mapping start address: Default is 1500. When the send mode is "Cyclic", this parameter is invalid.
Right-click "Producer" and add "Variable" data.


The data conversion between the PROFINET network and the serial port of the PN4-GW2FP is established through a "mapping" relationship. The PN4-GW2FP has two data buffers: one is the input buffer (1500 bytes) with an address range of 0-1499, and the other is the output buffer (1500 bytes) with an address range of 1500-2999.
Memory Mapping start address: 1500, which corresponds to the start address of QB on the TIA Portal side. In this example, it is QB100 on the TIA Portal side.
Maximum data length: 10 bytes, which corresponds to TIA Portal addresses QB100-QB109 (note: If the Memory Mapping start address is configured as 1502, the corresponding TIA Portal addresses are QB102-QB111. Important: The address length allocated on the TIA Portal side can be greater than or equal to the maximum data length in the configuration software).
Data object definition: The end byte is invisible to the subnet.
Download configuration: Configuration - Communication configuration - network - Search - After the module is found, double-click it and then click "Yes".


Configuration - download configuration.

Monitoring: Data is sent cyclically at the configured interval time of 1000 ms.

example: Producer mode application scenario (part 2)
Send (output) data once upon command

Send mode selection: change of state on trigger; data is sent once each time the trigger byte data in the Memory Mapping address changes.
Send delay (10 ms): 100; after the trigger byte data changes, data is sent after a delay of 100 x 10 = 1000 ms.
Trigger byte Memory Mapping address: default 1500, which corresponds to the QB start address on the TIA Portal side; in this example it is QB100.
Right-click "Producer" and add "Variable" data.

Memory Mapping start address: 1501 (must not conflict with the trigger byte Memory Mapping address set above), i.e. it corresponds to the QB address on the TIA Portal side; in this example it is QB101 on the TIA Portal side.
Maximum data length: 10 bytes, i.e. it corresponds to TIA Portal addresses QB101-QB110.
Data object definition: end byte is not visible on the subnet.
The configuration download method is the same as above.
Monitoring: change the value of QB100 (0 - > 1) to send data once.

Change the value of QB100 (1 - > 2) to send data again.

Each time the value of the trigger byte Memory Mapping address changes, data is sent once.
3. Consumer mode configuration
The consumer, also called response, is an input for the module; it transmits the specified data from the serial device to the fieldbus network (PROFINET).
Right-click "Subnet" and add a "Node", then right-click the "Node" and add a "Consumer"; keep the slave address at the default 1 (currently has no effect).

example: Consumer mode application scenario (1)
Only receives (inputs) data

Subnet offline action: select the data to be sent to the fieldbus after the subnet goes offline.
Clear: after the subnet goes offline, clear the data at the PROFINET-side IB address.
Hold: after the subnet goes offline, hold the data at the PROFINET-side IB address.
Timeout (10 ms): specifies the maximum permissible time between two Receive data operations. If this time is exceeded, the subnet is considered offline and the configured subnet offline action is executed; for example, if set to 100, the timeout is 10 x 100 = 1000 ms.
Trigger byte: not enabled.
Trigger byte memory mapping address: default 0. This parameter is invalid when the trigger byte is "not enabled".
Right-click "Consumer" to add "Variable" data.


Memory Mapping start address: 0, i.e. the start address of IB on the TIA Portal side; in this example it is IB100 on the TIA Portal side.
Maximum data length: 5 bytes, i.e. corresponding to TIA Portal addresses IB100-IB104 (note: if the Memory Mapping start address is configured as 4, the corresponding TIA Portal addresses are IB104-IB108; special note: the address length allocated on the TIA Portal side may be greater than or equal to the maximum data length of the configuration software).
Data object definition: no data length byte and no end byte.
The configuration download method is the same as above.
Monitoring:

example: Consumer mode application scenario (2)
Responsible for receiving (input) data and recording the number of times data is received

Subnet offline action: after the subnet goes offline, select the data that affects transmission to the fieldbus.
Clear: after the subnet goes offline, clear the data at the IB address on the PROFINET side.
Hold: after the subnet goes offline, retain the data at the IB address on the PROFINET side.
Timeout time (10 ms): specifies the maximum permissible time between two receptions of data. If this time is exceeded, the subnet is considered offline and the configured subnet offline action is executed. For example, if set to 100, the timeout time is 10 x 100 = 1000 ms.
Trigger byte: enabled. When the trigger byte is enabled, the byte position must be specified in "Trigger byte memory mapping address". If enabled, a new change byte is added when a data response is received, which can be used by the serial module to count the number of times data is received.
Trigger byte memory mapping address: 0, corresponding to the IB start address on the TIA Portal side; in this example it is IB100.
Right-click "Consumer" to add "Variable" data.

Memory Mapping start address: 1 (must not conflict with the Trigger byte memory mapping address set above), i.e. corresponding to the IB address on the TIA Portal side; in this example it is IB101 on the TIA Portal side.
Maximum data length: 5 bytes, i.e. corresponding to TIA Portal addresses IB101-IB105 (note: if the Memory Mapping start address is configured as 4, the corresponding TIA Portal addresses are IB104-IB108).
Data object definition: no data length byte and no end byte
The configuration download method is the same as above.
Monitoring: send data once from the serial assistant. IB100 counts the Receive data count as 1, and IB101-IB105 contain the Receive data.

Send data seven times from the serial assistant. IB100 counts the Receive data count as 7, and IB101-IB105 contain the Receive data.

This concludes the introduction to multi-scenario applications in PN4-GW2FP producer-consumer mode. Thank you for watching!