EasyManuals Logo

Siemens SIMATIC S7 User Guide

Siemens SIMATIC S7
134 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #75 background imageLoading...
Page #75 background image
SIMATIC Automation Tool API for .NET framework
6.5 The Network class
SIMATIC Automation Tool V2.1 user guide
Manual, V2.1.1 07/2016, A5E33042676-AC
75
6.5.3
SetCurrentNetworkInterface method
Return type
Method name
Result
SetCurrentNetworkInterface
Parameters
Name
Data type
Parameter type
Description
strInterface
string
In The name of the network interface to use.
Normally this will be one of the names
returned from the
QueryNetworkInterfaceCards method.
To use one of the identified network interface cards to access the industrial network, it is
necessary to "set" this interface. The following code shows how to assign one of the
identified network interfaces for API operations. In this example, the code selects to use the
first network interface card identified in the previous example.
Result retVal = myNetwork.SetCurrentNetworkInterface(interfaces[0]);
if (retVal.Succeeded)
{
//------------------------------------------------
// The action succeeded. Continue with operations.
//------------------------------------------------
}
6.5.4
CurrentNetworkInterface property
This property is provided to query for the currently-selected network interface. This property
is read-only. The following example shows the usage of this property.
string currentInterface = myNetwork.CurrentNetworkInterface;
Note
This property will return an empty string if no network interface was selected by a previous
call to the SetCurrentNetworkInterface
method.

Table of Contents

Other manuals for Siemens SIMATIC S7

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SIMATIC S7 and is the answer not in the manual?

Siemens SIMATIC S7 Specifications

General IconGeneral
BrandSiemens
ModelSIMATIC S7
CategoryController
LanguageEnglish

Related product manuals