Hi Nasir,
In order to help give accurate info which PLC and terminal are you using?
But yes... Check out the CX-Programmer Help topic "Protection" and see CX-Programmer menu PLC->Protection. Both Program and/or any Function Blocks can be password protected to prevent uploading (without the password).
There are also other techniques too I think for older PLCs that I've seen documented here:
How Do I Protect A Password - CX-Programmer? (just for your information)
Regards,
Bertie