S7-SoftPLC:Setting the User SFC's/FC's within the PLC43.INI
In the section [SF] there is the possibility to add user defined SFC's/SFB's to S7-SoftPLC. S7-SoftPLC allows the user to use up to 100 DLLs with user defined system functions (SFC) or functions (FC). Every DLL can contain multiple SFCs or FCs. These SFC/FC can be created by the user in C++, if a certain specification is kept.
By integrating own SFC/FC, the function pool can be expanded by own application specific code parts (technology functions, know-how protection, special hardware components). If the blocks are transferred with the PU to the PLC, the PLC keeps the C++ created internal blocks.
Examples for creating own SFC/FC-DLLs are available at the IBHsoftec support.
Keyname | Value area | Default value | Description |
---|---|---|---|
SF00 | SFCnnn.DLL | --- | File name of user defined SFC/FC |
SF01 | SFCnnn.DLL | --- | File name of user defined SFC/FCC |
SF02 | SFCnnn.DLL | --- | File name of user defined SFC/FC |
... | |||
SF99 | SFCnnn.DLL | --- | File name of user defined SFC/FC |
Enable hardware ports
If a user SFC/FC accesses a hardware port of the PC directly, it has to be mentioned, that no direct access of the PC hardware is allowed with Windows® 2000 and Windows® XP. To allow direct hardware access, the drivers of S7-SoftPLC can obtain the permission from the operating system. To do so, the section [IO-PORTS] has to be added in the file PLC43.INI.
Below, beginning with the address 0x0378, normally the printer port, 4 ports are enabled for direct port access.
[IO-PORTS] 378=4
For the serial port COM1, normally at address 0x03F8 with a lenght of 8 bytes, the entry would look like this:
[IO-PORTS] 3F8=8
Alternatively the I/O-port driver (ioport.dll) can be used as well.