Coding Motor Connection Check

I’m only really knowledge able on how to use block code but am willing to use text if someone would be willing to help me out. I’m trying to code a full system connection check display screen, where the user can check and see what motors or sensors are connected and display their output and change a label color to red if their disconnected and green if connected. Does anyone know how you could accomplish this via block code, could help me with a place to start for switch blocks, or give me some pointers on how best to go about this. Thank you.