EasyManua.ls Logo

Siemens SIMATIC S7 - Imodulecollection Class and Module Properties; The Imodulecollection Class

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
Loading...
SIMATIC Automation Tool API for .NET framework
6.8 IModuleCollection class and module properties
SIMATIC Automation Tool V2.1 user guide
Manual, V2.1.1 07/2016, A5E33042676-AC
97
6.8
IModuleCollection class and module properties
6.8.1
The IModuleCollection class
The IProfinetDevice interface provides information about any modules (signal modules,
signal boards, CMs, CPs, etc) plugged on the station. The Modules property returns a
collection of these modules.
The following code shows accessing this information, given an IProfinetDevice (created in
our earlier example).
//--------------------------------------------------------
// To ensure the information is current and complete,
// first call RefreshStatus()
//--------------------------------------------------------
Result retVal = networkDevice.RefreshStatus(new EncryptedString(""));
if (retVal.Succeeded)
{
//--------------------------------------------------------
// The Modules property returns a collection of IModule
/--------------------------------------------------------
IModuleCollection modules = networkDevice.Modules;
foreach (IModule mod in modules)
{
//-------------------------------------------------------
// Get article number for every module on central station
//-------------------------------------------------------
string displayArticleNum = mod.ArticleNumber;
}
}

Table of Contents

Other manuals for Siemens SIMATIC S7

Related product manuals