Which CPU, what is the firmware version and which TIA version?
If you have the original program then yes you will be able see the hardware configuration. If not then then depending on the CPU, firmware version and TIA you may be able to upload the hardware configuration.
Not sure what the second question is. Perhaps you may rephrase the question.
I believe you can get quite a bit of information directly from the program. Something with the GEO functions usually allow you to. I remember reading this before to essentially automate the ranges in the scaling block, but didn't get time to implement or dig further.
I don't know of instructions to do that, I will do a bit of research when I have time. As the hardware configuration is not going to change at runtime you may create a DB and fill it with the information you want.
Why do you want to ?
Perhaps the RD_REC and RD_DPAR instructions are a way forward?
Will check it out.Have you checked the SFC51 RDSYSST -beast?
Chapter 13.3 here: https://cache.industry.siemens.com/dl/files/604/44240604/att_67003/v1/s7sfc_en-EN.pdf
Kalle