Unexpected return value for ModuleStates (S7-1200)

AlfredoQuintero

Lifetime Supporting Member
Join Date
Feb 2015
Location
Yokohama
Posts
1,549
Hello. I am dealing with an issue with the ModuleStates function. My program passes the value "1" to the parameter LADDR. This value "1" is set for the "Device Number" setting in the IO configuration. Nonetheless the ModuleStates function returns error code 16#8091 [Hardware identifier of the LADDR parameter does not exist. Check (for example, in the system constants) whether the value for LADDR exists in the project].
I have also tried the values shown in the system constants for this PROFINET IO device with same results. What is wrong with my use of this function, I wonder.o_O

20200923_S7-1200_ModulesStates_Return1.jpg
 
Hello. I am dealing with an issue with the ModuleStates function. My program passes the value "1" to the parameter LADDR. This value "1" is set for the "Device Number" setting in the IO configuration. Nonetheless the ModuleStates function returns error code 16#8091 [Hardware identifier of the LADDR parameter does not exist. Check (for example, in the system constants) whether the value for LADDR exists in the project].
I have also tried the values shown in the system constants for this PROFINET IO device with same results. What is wrong with my use of this function, I wonder.o_O


You don't want the device number, there. You want the HW ID, from the system constants tab. There's a bunch of them, I think you need the one for the Profinet Device.
 
Thanks very much mk42, for your advice. I have also tried the hardware identifier codes in the system constants tab. None seems to do the trick, as you can see from the below table.

20200923_S7-1200_ModulesStates_Return2.jpg
 
For the previous screenshot I used DeviceStates instead of ModulesStates, but the return values are the same for both functions. To make it even more confusing, going back to ModulesStates function, if I use HW_IF 270 the return value is normal (0) and even the counter for disconnections for this HW_ID 270 works (logic in the second rung). However, I cannot find HW_ID anywhere referenced in this project. There are only two devices in this project, the S7-1200 and this one Profinet IO device I am trying to figure out how to detect when its communication with the Profinet controller fails.:confused:

20200923_S7-1200_ModulesStates_Return3.png
 
Sorry, sorry, sorry, one thousand times over. One has to click on the device in network view to see the hardware ID. But if you double-click the device and get the property pages the hardware ID does not show up.:oops::oops::oops::oops:

20200923_S7-1200_ModulesStates_Return4.png
 

Similar Topics

[Update: fixed a typo in the image.] See the image below, especially the blue-ish annotations. The three rungs ending in output coils -( ) are...
Replies
17
Views
981
Hi all, I've run into an error I haven't seen before while attempting to download the “Programming” tab of RMCTools to an RMC200 Lite I just got...
Replies
10
Views
3,664
First, a background on the equipment so you know what is going on. I have an AB ControlLogix L63 processor controlling some Mitsubishi...
Replies
17
Views
6,020
Hi, I'm getting a bunch of these warnings when I build the program in Connected Components Workbench. The program is legacy code. The program...
Replies
5
Views
2,363
Hi, will appreciate your help with my problem. After years of usage our RSLinx starts to stop unexpectedly. It is possible to start it but it...
Replies
1
Views
1,619
Back
Top Bottom