![]() |
ALPHA-VISION® content: SoftPLC7Sync.dll-Plugin |
| Command | Description | CPU must in ... |
|---|---|---|
| CMD_STOP | Stops the CPU | RUN, UNFREEZE |
| CMD_START | Warm start (OB100). Initial DBs loaded, not remanent Flags, counters and timers are set back. | STOP, UNFREEZE |
| CMD_RESUME | Resume start (OB101). DBs, Memory blocks, Counters and timers are kept unchanged. | STOP, UNFREEZE |
| CMD_COLDSTART | Cold start (OB102). Initial DBs loaded any Flags, counters and timers are set back. | STOP, UNFREEZE |
| CMD_FREEZE | Program execution is halted, including timer and IEC-timer | Doesn’t matter |
| CMD_UNFREEZE | Program execution continues, timers and IEC-timers are corrected, status continues with the state before FREEZE. | Doesn’t matter |
| CMD_LOADPROGRAM | The CPU is set back completely; the actual S7-program is loaded. | STOP, UNFREEZE |
| CMD_SAVEPERSISTENT | All variable data are saved in the persistent folder. | STOP, UNFREEZE |
| CMD_WRITESNAPSHOT | A complete image of all variable data is written to the user area of the shared memory. | FREEZE |
| CMD_RESTORESNAPSHOT | The CPU is set back completely except for the program DBs. The snapshot is restored. | FREEZE |
| 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 [HLL-Function] PY0,0=S7Sync,DoDBEExchangeSHMThe entry in section [HLL-Functions] causes that the function 'DoDBExchangeSHM' is called up inbetween any 2 OB1-cycles. On the first time only the Shared-Memory-Areas are set up. From the second time on, data for receiving are transferred from the shared memory to the DB with the number DBNumIn (resp. PI) and data from the DB with the number DBNumOut (resp. PO)are written to the shared memory for sending. A second SoftPLC7 using the same SHM-Name may receive data written that way or provide data to be read by the first SoftPLC7. Also a linking of several SoftPlc7 is imaginable. If not only DBs, but also the PI-Area is to be exchanged, it must be taken care that in this area the PI and I are synchronized by the SoftPLC7. The following entry in the SoftPlc.ini file changes: [HLL-Functions] "PY<Offset>,<Length>=S7Sync,DoDBExchangeSHM" <Offset> and <Length> define the PI-Area. If only the PO has to be handled no change is necessary. The communication is not synchronized: If after an OB1-Cycle the Shared Memory is still be written to, it is not waited, but tried to read after the next OB1-Cycle. |
| 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.
|
| Entry | Type | Description / Example | Default |
|---|---|---|---|
| DBNumIn | integer |
DB number of receiving DB. 0=peripheral input PI
|
0 |
| DBNumOut | integer |
DB number of sending DB. 0=peripheral output PO
|
0 |
| LengthIn | integer |
Length of receive buffer
|
0 |
| LengthOut | integer |
Length of send buffer
|
0 |
| OffsetIn | integer |
Offset within the receiving DB (resp. PI) for buffer start
|
0 |
| OffsetOut | integer |
Offset within the sending DB (resp. PO) for buffer start
|
0 |
| OffsetOutHandshake | integer |
Offset within the sending DB (resp. PO) for a handshake-byte.
The SoftPLC7 only writes data if the result of anding the handshake-byte
with the mask is zero. If no value, or a value smaller than 0
is inputted, writing is continued.
|
-1 |
| OffsetOutHandshakeMask | integer |
Mask to be anded with the handshake-byte
|
255 |
| SHMNameIn | string |
Name of the shared memory area for the receive buffer
|
-1 |
| SHMNameOut | string |
Name of the shared memory area for the send buffer
|
255 |