Siemens SINUMERIK 840D sl Function Manual page 1297

Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

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
The For Each...Next Block programmed above can be programmed in the Delphi
programming language as follows (the programming for C, C++ programming languages is
similar).
Var
EnumVar: IEnumVariant;
rgvar: OleVariant;
fetched: Cardinal;
//For Each Next
EnumVar := (S7Prog.Next._NewEnum) as IEnumVariant;
While (EnumVar.Next(1,rgvar,fetched) = S_OK) Do Begin
Cont := IS7Container(IDispatch(rgvar)); // block container,
check sources
If (Cont.ConcreteType = S7BlockContainer) Then Break;
Cont := NIL;
End;
Basic logic functions: PLC basic program solution line (P3 sl)
Function Manual, 11/2006, 6FC5397-0BP10-2BA0
= 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
23

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840di slSinumerik 840dSinumerik 840diSinumerik 810dSinumerik 840d powerlineSinumerik 840de powerline ... Show all

Table of Contents