想从一个win应用程序直接打开step7并跳转到我需要的位置,比如FC10-NW8,看了西门子的帮助文件还是云里雾里,不太明白,不知有高人否请教一下:
我现在的问题1,如果采用这种方式启动step7 /e F:\SIEMENS\STEP7\S7proj\MyConfig\MyConfig.s7p /keep ,并不能跳转到我需要的位置,而且我试过不会报错,但是打开后项目是空白的。
问题2,这种方式不太明白前面的1,8什么意思,实际情况也打不开,从帮助看,即使打开了,也跳转不到我需要的network。
/o "1,8:MyConfig\SIMATIC 400(1)\CPU416-1\S7-Program(1)\Blocks\FB1"
以下是从帮助文件copy的
Starting STEP 7 with Default Start Parameters
From STEP 7 V5.0 onwards, you can create several symbols in the
SIMATIC Manager and specify start parameters in the call line. By doing this, you
can cause the SIMATIC Manager to position on the object described by these
parameters. This allows you to jump to the corresponding locations in a project
immediately just by double-clicking.
On calling s7tgtopx.exe,
you can specify the following start parameters:
/e <complete physical
project path>
/o <logical path of
the object on which you want to position>
/h <ObjectID>
/onl
The start parameter /onl causes the project to be opened online and the specified path to be called.
/off
The start parameter /off causes the project to be opened offline and the specified path to be called.
/keep
The start parameter /keep causes the following to occur:
If the SIMATIC Manager is open, the already displayed projects
are opened in addition to the new project to be explicitly opened by means of
the command line.
If the SIMATIC Manager is not yet open, then the new project is opened along
with the projects stored in the session memory of the SIMATIC Manager. If this
start parameter is not specified, the opened projects are closed first, the
session memory is ignored and only the one specified project is opened.
/noopen
The start parameter /noopen causes no project to be opened when
SIMATIC Manager is started.
The easiest way to establish suitable parameters is described
below.
Establishing Parameters by
Copying and Pasting
Proceed as follows:
On your desktop, create a new link to the file
s7tgtopx.exe. This file is located in the installation directory under
S7bin.
Display the properties dialog box.
Select the "Link" tab. The entry under "Target" should now
be expanded as follows.
Select the required object in the SIMATIC Manager.
Copy the object to the clipboard using the key combination
CTRL+ALT+C.
Position the cursor at the end of the "Target" entry in
the "Link" tab.
Paste the contents of the clipboard using the key
combination CTRL+V.
Close the dialog box by confirming with
"OK."
Example of
Parameters:
/e F:\SIEMENS\STEP7\S7proj\MyConfig\MyConfig.s7p /keep
/o "1,8:MyConfig\SIMATIC
400(1)\CPU416-1\S7-Program(1)\Blocks\FB1"
/h
T00112001;129;T00116001;1;T00116101;16e /keep