Siemens SINUMERIK 840Di Function Manual page 1209

Basic machine
Hide thumbs Also See for SINUMERIK 840Di:
Table of Contents

Advertisement

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 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 MakeSeriesstart-up(FileName As String, Option As Long, Container As
S7Container) As Long
"Option" parameter:
0:
Bit 0 = 1:
Bit 1 = 1:
Return parameter value:
0
-1
-2
-4
-5
-6
-7
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
Cont = Nothing
Next
Error = S7Ext.MakeSerienIB("f:\dh\arc.dir\PLC.arc", 0, Cont)
' Now error analysis
PLC Basic Program Solution Line (P3 sl)
Function Manual, 08/2005 Edition, 6FC5397-0BP10-0BA0
Normal series start-up file with general reset
Series start-up file without general reset. When project contains SDBs, this option is
inoperative.
A general reset is then always executed.
Series start-up file with PLC restart
= OK
= Function unavailable, call Magic function beforehand
= File name cannot be generated
= Container parameter invalid or container block empty
= Internal error (memory request rejected by Windows)
= Internal error (problem in STEP 7 project)
= Write error when generating series start-up files (e.g. disk full)
Detailed Description
2.4 Starting up the PLC program
2-15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents