as far as i know there is no simple way to tell what software is using com port. if you only have serial port and you try to use it both for plc and hmi programming but have no pass through connection configured, you will have to go offline or close port (or application) that uses port before you can use another one. some applications like to monopolize com port and some of them can be easily tamed (like rslinx), others not so (like activesync etc.).