Siemens S7-200 and RS232 Printer

zer0net

Member
Join Date
Jul 2011
Location
canada
Posts
24
Hello,
I have an issue with the printer.
I have a S7-200 PLC with 2 ports (Port1 and Port 0).
Port 1 is connected to HMI through profibus (HMI is 12-15m away from PLC)
Port 0 is connected to PC/PPI cable which is connected to 5V RS232 printer (also sitting 12-15m away from PLC)

so.. rough illustration

PLC>>PC/PPI>>long serial cable I made >>printer

It is not printing when far away, when I move it next to PLC it works fine.

So, is there a way I can fix this?

My initial thought is that, since S7-200 communicates using RS485. Is there a way where i can connect 2 wires to whichever pins that S7-200 uses and run it to a bi-directional RS232 to RS485 converter or to a PC/PPI cable sitting beside the printer. Can that not work

S7-200 >> 9pin=============== RS485 converter or PC/PPI cable>>Printer

any help will be greatly appreciated.

Thank you
 
I dont understand

Ok so i tried connecting a straight (1 to 1, 2 to 2...etc) serial cable directly to PLC port0 and then other end connecting to PC/PPI cable and then printer

PLC>>serial cable>>PC/PPI>>Printer

sometimes it prints few words, sometimes it prints half, but never complete.
Because the signal is too weak.

But what I dont understand is, that PLC uses RS485 which can transmit over long distances. So if i'm bringing the RS485 signal 15 meter right next to the printer and then converting it to RS232, why isnt it working?

any thoughts?

thank you
 
Noise?

May be grounding noise or crosstalk from other cables.
Is your cable properly grounded? You should use shielded cable with with grounding in one end only.
 
May be grounding noise or crosstalk from other cables.
Is your cable properly grounded? You should use shielded cable with with grounding in one end only.

Thank you for reply,
It is a shielded 10wire serial cable, I have a spare wire inside the cable should i connect that to the body of the connector at both ends?

Thank you
 
No, you can leave the other wires. Just make sure that they are cut short and not coild up with long ends that can act like an antenna. Serial cables often have wires in twisted pairs. If available use a twisted pair for the RS485 connection.
 
No, you can leave the other wires. Just make sure that they are cut short and not coild up with long ends that can act like an antenna. Serial cables often have wires in twisted pairs. If available use a twisted pair for the RS485 connection.

It is cut short, however, I was asking because you mentioned that it should be grounded properly, so i asked if i should connect it to the body of the connector to ground it.

I've also read here http://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/serial-distance.html
that CAT5 cable might work better because it has lower capacitance, but it is unsheilded.
 
Hello,
I have an issue with the printer.
I have a S7-200 PLC with 2 ports (Port1 and Port 0).
Port 1 is connected to HMI through profibus (HMI is 12-15m away from PLC)
Port 0 is connected to PC/PPI cable which is connected to 5V RS232 printer (also sitting 12-15m away from PLC)

so.. rough illustration

PLC>>PC/PPI>>long serial cable I made >>printer

It is not printing when far away, when I move it next to PLC it works fine.

Which side of the PC / PPI cable are you extending, it sounds to me that you are extending the PC (rs 232) side and thats why you are having problems. I would suggest you extend the PPI side (the end that plugs to the PLC port 0. This would ensure that the PPI side (RS485) is about 15 m and the PC (rs 232) is short at 2 m.

Are you using the free port mode? In free port mode the PC / PPI works pretty much like a RS485 converter.
 
Which side of the PC / PPI cable are you extending, it sounds to me that you are extending the PC (rs 232) side and thats why you are having problems. I would suggest you extend the PPI side (the end that plugs to the PLC port 0. This would ensure that the PPI side (RS485) is about 15 m and the PC (rs 232) is short at 2 m.

Are you using the free port mode? In free port mode the PC / PPI works pretty much like a RS485 converter.

I have done that as well thats when the cable started to work. but still doesnt print everything, sometimes 1 word sometimes half.. never entire print.
 
OK so, I have ruled out the com signal as a problem. The problem seems to be the power. If i extend the +5V and -5V power cables to 15m the printer stops working near the end, but if I bring the printer close to the source it works fine.
I have used the multimeter to test the power it is a constant supply of 5.8V.

I am super confused... Why does it not work when the correct amount of power is there.
 
There may be an excessive voltage drop.
either
1. try doubling up the cable (temporarily) or increasing the SWG size.
2. slow the baud rate down to 9600 or slower
The 5 V rail is a supply line the 2,3 connections use this voltage in comms signal switching at the baud rate.
 
There may be an excessive voltage drop.
either
1. try doubling up the cable (temporarily) or increasing the SWG size.
2. slow the baud rate down to 9600 or slower
The 5 V rail is a supply line the 2,3 connections use this voltage in comms signal switching at the baud rate.

but i checked with the multimeter the voltage was 5.8V constantly except when it started printing it went down to 4.8 but then came back up.
The power to the printer is not always on, it is turned on through a relay when its time to print, for the 30 second that it is on it stays 5.8V. I even increased the time to 60sec, still the same problem.
 
I was refering to the comms speed and cabling not the supplied voltage.
changing the time from 30 s to 60 s is not the comm speed
 
I was refering to the comms speed and cabling not the supplied voltage.
changing the time from 30 s to 60 s is not the comm speed

Comms is ok there is no problem with the signal as I originally thought it was. I had ruled that out the other day.

I've narrowed it down to power. Please see the picture attached.

When printer is sitting far away from the power source even though the supplied voltage is 5V it still doesnt print entire printout. However when I take the printer closer to power source and doubling the communication wire, it prints just fine.

so i'm confused...

serial printer.jpg
 
one test, as obvious as it may seem, is to keep the long cable connected and bring the printer closer. (I am assuming you have not done this)
For the Printer not to print correctly it must be receiving hash.
For the comms to fail with the higher gauge wire you must have some form of interference or induced voltage.
The only other chance may be the CTS or RTS or both signals need to be connected. check the manual.
this may require the PLC comms setup to be changed to (flow or Xon/Xoff) not sure what settings are available.
 
Last edited:

Similar Topics

Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
230
commentaire communiqué siemens s7-1200 avec vfd delta ? (cablage et sur tia portal )
Replies
0
Views
122
Hi, I have a 1214 on ip 192.168.0.100. This is connected to other modules through a switch on same network. I need to connect this to a company...
Replies
1
Views
172
Hi Experts, I would like to make firmware upgrade from v3.0 to v4.5 (S7-1200 CPU 1215C). Can I do it from v3.0 to v4.5? Do I need to take some...
Replies
6
Views
277
Hi Guys, I am trying to establish communication over profinet between Siemens S7-1200 PLC as IO device and codesys plc as IO controller. But I am...
Replies
43
Views
2,831
Back
Top Bottom