Siemens SINUMERIK 828D Function Manual page 855

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

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:
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
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)
Use in script
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
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
P3: Basic PLC Program for SINUMERIK 840D sl
13.5 Starting up the PLC program
855

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents