P3: Basic PLC Program for SINUMERIK 840D sl
13.5 Starting up the PLC program
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
855
Functions:
Function Magic(bstrVal As String) As Long
Function MakeSeriesstart-up (FileName As String, Option As Long, Container As S7Container) As Long
Description
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 STEP 7 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 MakeSeriesstart-up(FileName As String, Option As Long, Container As S7Container) As Long
"Option" parameter:
Return parameter value:
Use in script
0:
Normal series IBN file with general reset.
Bit 0 = 1:
Series IBN file without general reset. When project contains SDBs, this option is
inoperative.
A general reset is then always executed.
Bit 1 = 1:
Series IBN file with PLC restart
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)
If S7Ext.Magic("") < 0 Then
Wscript.Quit(1)
End If
Set Proj1 = s7.Projects("new")
set S7Prog = Nothing
Set s7prog = Proj1.Programs.Item(1) 'if there is only one program'
For Each cont In s7prog.Next
If (Cont.ConcreteType = S7BlockContainer) Then
' Check block container
Exit For
End if
Содержание SINUMERIK 828D Turning
Страница 34: ...Basic Functions 34 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 146: ...A3 Axis Monitoring Protection Zones 2 6 Data lists Basic Functions 146 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 328: ...F1 Travel to fixed stop 6 5 Data lists Basic Functions 328 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 816: ...K2 Axis Types Coordinate Systems Frames 10 9 Data lists Basic Functions 816 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1198: ...P4 PLC for SINUMERIK 828D 14 6 Function interface Basic Functions 1198 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1752: ...Appendix 20 2 Overview Basic Functions 1752 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1774: ...Glossary Basic Functions 1774 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...