Detailed description
2.4 Starting up the PLC program
Basic logic functions: PLC Basic program powerline (P3 pl)
Function Manual, 11/2006, 6FC5397-0BP10-2BA0
27
Functions
The following functions are available for this expansion:
The functions (shown here in VB script) are not available until server instantiations and
Magic have been called:
Functions:
Const S7BlockContainer = 1138689, S7PlanContainer = 17829889
Const S7SourceContainer = 1122308
set S7 = CreateObject("Simatic.Simatic.1")
rem Instance command interface of STEP7
Set S7Ext = CreateObject("SimaticExt.S7ContainerExt")
Call S7Ext.Magic("")
Function Magic(bstrVal As String) As Long
Call gives access to certain functions. The function must be called once after server
instantiation. The value of bstrVal can be empty. This initiates a check of the correct Step7
version and path name in Autoexec. The functions are enabled with a return parameter of 0.
Return parameter (-1) = incorrect STEP 7 version
Return parameter (-2) = no entry in Autoexec.bat
Function Magic(bstrVal As String) As Long
Function MakeSeriesStartUp(FileName As String, Option As Long, Container As
S7Container) As Long
"Option" parameter:
0:
Normal series startup file with general reset
Bit 0 = 1:
Series startup file without general reset. When project contains SDBs, this
option is inoperative.
A general reset is then always executed.
Bit 1 = 1:
Series start-up file with PLC restart
Return parameter value:
0
= OK
-1
= Function unavailable, call Magic function beforehand
-2
= File name cannot be generated
-4
= Container parameter invalid or container block empty
-5
= Internal error (memory request rejected by Windows)
-6
= Internal error (problem in STEP 7 project)
-7
= Write error when generating series startup files (e.g., diskette full)
Summary of Contents for SINUMERIK 840D sl
Page 282: ...Index Basic logic functions Acceleration B2 64 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 388: ...Basic logic functions Travel to fixed stop F1 Function Manual 11 2006 6FC5397 0BP10 2BA0 52 ...
Page 962: ...Index Basic logic functions Emergency Stop N2 20 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 1704: ...Constraints Basic logic functions Spindles S1 94 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 1716: ...Index Basic logic functions Spindles S1 106 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 1996: ...Index Basic logic functions Tool Offset W1 208 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 2150: ...Table of contents Basic logic functions Appendix 4 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...
Page 2184: ...Glossary Basic logic functions Appendix 38 Function Manual 11 2006 6FC5397 0BP10 2BA0 ...