Uploaded code from IDE and now I can not connect via TCP from PLC IDE

I was able to connect via PLC IDE TCP port to hardware but after using IDE and downloading a simple program to the hardware now my PLC IDE ethernet connection does not work. This is because the hardware is not picking a DHCP anymore as I can see in the router.

Why is that happening? How to avoid this?

Thanks.