![]() |
ALPHA-VISION® content: SoftPlc7Net.dll |
| Module | Function name | Send/Recv Interface | SHM Interface | UDP Interface | Replaces the default in a SoftPLC7 |
|---|---|---|---|---|---|
| FC5 | AG_SEND | yes | yes | yes | no |
| FC6 | AG_RECV | yes | yes | yes | no |
| FC50 | AG_LSEND | yes | yes | yes | no |
| FC60 | AG_LRECV | yes | yes | yes | no |
| SFB12 | BSEND | yes | yes | yes | yes |
| SFB13 | BRCV | yes | yes | yes | yes |
| SFB14 | GET | yes | yes | no | yes |
| SFB15 | PUT | yes | yes | no | yes |
| SFB22 | STATUS | yes | yes | no | yes |
| SFB23 | USTATUS | yes | yes | no | yes |
In principle any (S)FC and (S)FB can be replaced by any HLL-Function with appropriate parameters. The settings therefore are made in the SoftPLC7.ini file. If entry’s for SFBs are missing the standard functions of SoftPLCNet.dll are used as a default. The functions FC5, 6, 50 and 60 will not be replaced automatically, since they not necessarily comply with the PLC functions. In that case a manual entry must be made.
The connections for communication between the original Simatic S7 must be
investigated and the SoftPLC7s must be set up accordingly.
The parameters must be defined in the SoftPLCNet.ini
file.
For the connections it must be distinguished between the standard send/receive
interface, the special SHM-Interface and the UDP-Interface. To use the
send/receive interface “ISO Ind. Ethernet” must be defined as the interface to be used.
After restoring a snapshot all connections are resetted.
Contrary to the functions PLC_(L)SEND, PLC_(L)RECV or BSEND,BRCV the functions GET, PUT, STATUS and USTATUS has to be executed asynchronously. In the remote PLC there is no equivalent to the call PLC_(L)RECV or BRCV; incoming telegrams are analyzed and answered telegrams are send back, on which the local PLC reacts. To start the server functionality the SoftPLC7.ini file must be amended in the section [Plugin-Functions] - see below.
For simulation of a CP341 the HLL-Functions “PRCV_RK” and P_SND_RK” are available to replace
FB7 and FB8 out of the SIMATIC-Library “CP Ptp”.
The only driver supported is the ASCII-driver. No control signals like RTS/CTS are send,
the end of a telegram is recognized by an adjustable ‘no data’ gap.
Communication is done via a RS-232-Interface. To use a RS-485-Interface an
Interface-Converter is needed; it must be configured for 2 wires and self-controlling.
Via the pull-down menu ‘Extras’, item ‘Connections..’ all connections defined for the SoftPLC7 can be inspected. The last 2 columns show the total amount of send and received bytes since program start and they are still updated when watching.
When using the SHM-Interface, also redundant connections can be created.
Example:
CPU1 and CPU2 got 2 CPs each. The addresses are 0x1000, 0x1100 (CPU1) and 0x2000, 0x2100 (CPU2).
Data should be send redundant by FC50 from CPU1 to CPU2.
The SoftPlcNet.ini configurations of the SoftPLC7s might look alike:
[Settings] LAddr1=1000 LAddr2=1100 [SR-Connections] Con_1=(1;2;AG1;AG2;n;1; ;2000) Con_2=(1;2;AG1;AG2;n;2; ;2100)
[Settings] LAddr1=2000 LAddr2=2100 [SR-Connections] Con_1=(1;2;AG2;AG1;n;1; ;1000) Con_2=(1;2;AG2;AG1;n;2; ;1100)
Packages send by CPU1 via AG_LSEND(ID=1, LADDR=W#16#1000) are received by
CPU2 via AG_LRECV(ID=2,LADDR=W#16#2000).
Packages send by CPU1 via AG_LSEND(ID=1, LADDR=W#16#1100) are received by
CPU2 via AG_LRECV(ID=2,LADDR=W#16#2100).
Sending packages via a connection with a remote LAddr<>0 defined are
accepted remotely only if there no LAddr-Index is specified, or the
specified one match's the ‘remote LAddr’ exactly.
Sending packages via a connection with no specific remote LAddr (LAddr=0)
defined are accepted at the remote end if just the local Conn_Id match's.
If the functions GET, PUT, STATUS and USTATUS to be used on redundant
communication with a remote LAddr defined, the corresponding Server-Connections
pointing to that LAddr must be created.
On CFB, BSEND and BRCV the remote LAddr is not checked, since the R_ID is unique.
| Entry | Type | Description / Example | Default |
|---|---|---|---|
| Window | integer |
Defines whether an Info Window should be opened
|
0 |
| ComDriverCount | integer |
Number of used CP 341
|
0 |
| Entry | Type | Description / Example | Default |
|---|---|---|---|
| SR-Entrypoint | integer |
Access point for the connection
|
|
| LAddr | integer |
Board identifier according to the settings of the SIMATIC Manager. Value=hex-format
|
0 |
| AG_Typ | integer |
AG-Typ i.E. 300, 318, 400, 416 etc
|
400 |
| SR-Entrypoint<n> (1 <= n <=4) |
integer |
4 access points for hardware connections
|
|
| LAddr<n> (1 <= n <=4) |
integer |
4 board identifier for hardware connections according to the settings of the SIMATIC Manager.
Value is written in hex-format.
|
| Entry | Type | Description / Example | Default | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Count | integer |
Number of connections
|
99 | ||||||||||||||||||||||||||||||||||||
| Conn_<n> | string |
For the send/rec-Interface (ISO):
(<localConn-Id>;<MAC-Address>;<local TSAP>;<remote TSAP> ;<link connection>;<LAddr-Index>;<ServerConn>) For the send/rec-Interface (ISO over TCP / RFC 1006): (<localConn-Id>;<IP-Address>;<local TSAP>;<remote TSAP> ;<link connection>;<LAddr-Index>;<ServerConn>) For SHM-interface: (<localConn-Id>;<remoteConn-Id>;AG<local AG-Number>;PLC<remote AG-Number> ;<link connection>;<LAddr-Index>;<remote LAddr>;<fast connection>) For UDP-interface: (<localConn-Id>;UDP=[<local IP-Address>:]<remoteIP-Address> ;<local Port>;<remote Port>;<LAddr-Index>) For TCP/IP-interface: (<localConn-Id>;TCP=[<local IP-Address>:]<remoteIP-Address> ;<local Port>;<remote Port>;<link connection>;<LAddr-Index>)
|
|||||||||||||||||||||||||||||||||||||
| UDPMax | integer |
The maximum of UDP-packages that can be gathered in the buffer (per connection)
|
1024 |
| Entry | Type | Description / Example | Default |
|---|---|---|---|
| Trace | integer |
Archiving of debug information
|
0 |
| InfoMask | integer |
The mask defines which messages are displayed in the window.
'-1' allows any message to be displayed. |
0 |
| ListBox | integer |
defines whether messages are displayed in the window, '0' - no messages
|
| Entry | Type | Description / Example | Default |
|---|---|---|---|
| SendReceive | string |
Name of a DLL for the Send/Recv-Interface.
The Send/Recv-Interface is used to set up ISO-on-TCP connections between SoftPLC7s. |
s7_sr.dll |
| SharedMemory | string |
Name of a DLL for the SHM-Interface.
The SHM-Interface is user-specific and not at common disposal. For any package send a shared-memory-area is allocated that is made available for other SoftPLC7s. |
schshm.dll |
| Entry | Type | Description / Example | Default |
|---|---|---|---|
| ComPort | integer |
Used COM-Port. Possible values: 1-4 for COM1 – COM4
|
1 |
| LAddr | integer |
LAddr on the CP. (value in hex)
|
0 |
| DelayTime | integer |
'no data'- gap depends on the baud rate also
|
4 |
| MaxTeleCount | integer |
Max. Number of buffered telegrams (1-250)
|
250 |
| PreventOverwriting | integer |
Overwrite old telegrams? 0=no; 1=yes ;(for MaxTeleCount=1 only)
|
1 |
| BaudRate | integer |
Baud rate: 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 76800
|
9600 |
| DataBits | integer |
Number of data bits: 7 or 8
|
8 |
| StopBits | integer |
Number of stop bits: 1 or 2
|
1 |
| Parity | string |
Parity used: N=no, O=odd, E=even
|
E |
| Entry | Type | Description / Example | Default |
|---|---|---|---|
| (FB |FC |SFB |SFC )<num> | string |
Defines the DLL-Function that replaces the Program-Module
with the following syntax: <dll, function>
Example
FC13=MyDll, MyFunction For "P_SND_RK and P_RCV_RK" the entries must look like: [HLL-Function]
FB7=SoftPlcNet,P_RCV_RK FB8=SoftPlcNet,P_SND_RK |
| Entry | Type | Description / Example | Default |
|---|---|---|---|
| Func<n> | string |
Activates Plugin-Functions of the SoftPLC7.
Example
Func1=S7Sync,S7SyncControl Note:
This function is called up by the same fixed cycle that the OBs
are synchronized with. It waits for the token, hands over the
control to the S7-threads and on cycle end it passes on the token.
For server connection [Plugin-Functions]
Func1=SoftPlcNet,ProcessSharedMemory ;if shared memory interface is used or Func1=SoftPlcNet,ProcessSendRecv ;if Send/Recv interface is used
Both interfaces may be used concurrently; in that case different function
numbers have to be used. |