Pi #B+ connected via ethernet cable to router

I can access my printer via ethernet cable to router perfectly.everything works including usb camera.My question is how to assign a static ip address for this type of connection.

Just did it 2 days ago:

Edit /etc/dhcpcd.conf and add the following to the end of the file:

interface eth0
static ip_address=10.1.1.30/24
static routers=10.1.1.1
static domain_name_servers=10.1.1.1 8.8.8.8

Replace 10.1.1.30 and 10.1.1.1 with your actual static IP and gateway IP.

After saving the file reboot RPI.

For what it's worth, I think it's characteristic to indent the commands under the initial entry (only). It creates paragraphs for the service to parse.

Is this done in putty or on sd card.

You can update it via Putty or directly on RPI, if you connect monitor and keyboard to it.

OK,I did what U said.How to I know that the ip is static?
I ran ipconfig/all and it doesn't show my ip address I assigned.
Although it has been 2 days and I can still use octoprint fine.
Thanks for your help..

Paste the configuration changes that you have made.

Not to be redundant,The PI is connected directly to my router.It does not show up in network configurations.all ethernet ports show not connected.On my router on port it shows octopi.

Sorry, that was port 3.