Ask our Experts
Didn't find what you are looking for? Ask our experts!
Launch of Consumer/Home Owner registration process! We are pleased to announce the commencement of the Consumer/Home Owner Registration Process on Community. Consumers/Home Owners may now proceed to register by clicking on Login/Register. The process is straightforward and designed to be completed in just a few steps.
Support forum for Machine and Motion Control solutions, including Lexium MC12 and robotics, PacDrive, Modicon PLCs and I/Os, EcoStruxure Machine Expert Twin, … - from design, implementation to troubleshooting and more, by Schneider Electric
Search in
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-04-23 10:49 PM . Last Modified: 2024-11-21 12:52 AM
In the following example you can see how to access the submodules of a Profinet device.
The ProfinetCommon library, which has been available since EcoStruxure Machine Expert V2.0, serves as the basis for this.
PROGRAM SR_Main
VAR
deiInfo: DED.DEVICE_INFO;
result: DED.ERROR;
nextResult: BOOL;
submodule: ProfinetCommon.SubmoduleInfo;
submodules: ProfinetCommon.SubmoduleIterator;
END_VAR
// Get the device information of your Profinet device
result := <PN-Device>.GetDeviceInfo(deiInfo := deiInfo);
// Initialize the list of submodules
IF (submodules.InitByID(deiInfo.idSystem)) THEN
// Iterate through the list of submodules
nextResult := submodules.Next(submodule => submodule);
END_IF
The object submodule contains then the information of the first submodule of the ProfiNet device. In order to get the information of all submodules, you can use FOR and the SubmoduleIterator to loop through all submodules.
Link copied. Please paste this link to share this article on your social media post.
You’ve reached the end of your document
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.