The GSV (get system value) instruction in RSLogix 5000 can retrieve the status of the communication or I/O modules.
The required parameters for GSV are:
If the module status code is non - 0, then the module is not present or is in error.
MVI56, MVI56E, fault