Siemens SINUMERIK 840D sl Function Manual page 830

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

Advertisement

P3: Basic PLC program for SINUMERIK 840D sl
13.7 Starting up the PLC program
-6
-7
Use in script
Program code
If S7Ext.Magic("") < 0 Then
End If
For Each cont In s7prog.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):
Program code
Var
//For Each Next
EnumVar := (S7Prog.Next._NewEnum) as IEnumVariant;
While (EnumVar.Next(1,rgvar,fetched) = S_OK) Do Begin
End;
830
= Internal error (problem in STEP 7 project)
= Write error when generating series startup files (e.g. diskette full)
Wscript.Quit(1)
Set Proj1 = s7.Projects("new")
set S7Prog = Nothing
Set s7prog = Proj1.Programs.Item(1) 'if there is only one program'
If (Cont.ConcreteType = S7BlockContainer) Then
' Check block container
Exit For
End if
Cont = Nothing
Next
EnumVar: IEnumVariant;
rgvar: OleVariant;
fetched: Cardinal;
Cont := IS7Container(IDispatch(rgvar)); // block container
Check sources
If (Cont.ConcreteType = S7BlockContainer) Then Break;
Cont := NIL;
Function Manual, 01/2015, 6FC5397-0BP40-5BA2
Basic Functions

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents