Trying to connect serial device with UART comms protocol to Siemens S7-1500 plc

stayclashy80

Member
Join Date
Jul 2020
Location
raleigh
Posts
76
Hello, this is a brand new task for me. I recently bought a particulate sensor and it communicates with UART protocol or I2C protocol. It came with a cable with a USB plug on the end of it and I can connect it to my laptop and use the software. The problem is I want to wire it up to my Siemens S7-1500 plc and read the data like an analog input. I have no idea what to do. Any help would be greatly appreciated. Thanks
 
Hello, this is a brand new task for me. I recently bought a particulate sensor and it communicates with UART protocol or I2C protocol. It came with a cable with a USB plug on the end of it and I can connect it to my laptop and use the software. The problem is I want to wire it up to my Siemens S7-1500 plc and read the data like an analog input. I have no idea what to do. Any help would be greatly appreciated. Thanks


I've never heard of any way to connect UART directly to a PLC, but you might be able to do it via some kind of dongle: UART to Ethernet or UART to RS232 or something.
 
UART as far as I know is not a protocol.
An UART is usually part of an RS232, RS422 or RS485 port, which in turn can be used to send data by means of a protocol.

What protocols do the UART/serial port support ?
You can add a serial card to the S7-1500 that supports Modbus RTU or ASCII.

If it is some other protocol, then there are vendors of gateways that sends data back and forth between various protocols, including Profinet which is the most obvious choice for an S7.
 
So just looked for different particulate matter sensors that have analog and found this one.

https://downloads.greystoneenergy.com/Submittals/PS-PMRMCXXX.pdf

Thanks for the advice DanW. If there is not an easy way to get my current one to communicate I think I will get this new type sensor that is setup for analog. Seems like the I2C protocol is for hooking up to Arduino. This is something I have no knowledge about yet. I emailed the company to see if they offer a gateway device to communicate to my plc.
 
If you really need a PLC, the simplest I can see is a raspberry pi running codesys. :/ It supports I2C, but you'll need to code the interface unless someone already did it.

Otherwise, I'd look at an industrial sensor.
 

I'd say with this sensor it should be possible with a S7-1500 and a RS232 card which supports 115,2 kBit/s (you'd need the HF one), but you would need a level converter from TTL to RS232 levels like a MAX232. As you can select between UART/I2C via connecting the SEL pin to ground. The described UART protocol should be possible to implement in software of the 1500.

But I think for an industrial application it's not the right device, as you have to build many things around it. Also the serial cards for the 1500 are relatively expensive, so I'd spare the money for a more industrial-style device.
 
Oh wow, that definitively answers my question. Thanks Thomas. I will get a different sensor. Luckily it was only $140 so wasn't a huge waste and I was able to prove the concept so we can go forward with this project. I will remember this for next time. I never even thought about different types of communication protocols to connect to a plc. Everything I have ever used and bought easily connected to a plc. Thanks for all the help guys. I'm sure I will be on here a lot, just recently transitioned from being a normal industrial electrician to an automation technician role so I have a lot to learn.
 
I'd say with this sensor it should be possible with a S7-1500 and a RS232 card which supports 115,2 kBit/s (you'd need the HF one), but you would need a level converter from TTL to RS232 levels like a MAX232. As you can select between UART/I2C via connecting the SEL pin to ground. The described UART protocol should be possible to implement in software of the 1500.

But I think for an industrial application it's not the right device, as you have to build many things around it. Also the serial cards for the 1500 are relatively expensive, so I'd spare the money for a more industrial-style device.




You need also to count time to program coms for RS232.
As it is Siemens, even modbus isn't easy. Lot better on 1200/1500 series than 300/400 but still needs extra programming and communication blocks and testing.


Several weeks for learning and programming takes lot more money than connecting via mA, Volts or even with profibus or profinet GSD with is quite easy.
 
Bit of a dead horse (given that you are not going to use the sensor) but I2C is a synchronous protocol with a clock pulse and one data line. You won't find a way to bring this into any PLC with out a complete data conversion.
 
Thomas is correct the TTL pins just need TTL to 232 converter, I once interfaced a printer that had TTL cannot remember the chip I used this was to communicate with an S5 135 system using the 525 serial communications card.
There are a number of units just google them they range from 4-30 pounds so quite cheap, however I actually just used a IC version and jury wired it on the back of the printer. You might need to find out what the transmission protocol is probably just ASCII but some 232 sniffer on a PC will give you some idea.
 

Similar Topics

Hi All, I am trying to connect 4 serial devices to a system. I do not have enough COM ports on my PC and need some device that will allow me to...
Replies
9
Views
6,261
Hello, I am very new to Siemens but have been doing AB for many years. I don't have the information I probably need but here's the story. I have...
Replies
2
Views
1,139
Hi guys, Working on one of my client's systems with SLC processors, earlier today she called me and said she was having comms errors, had a solid...
Replies
5
Views
2,034
Hi guys, I am trying to get images taken by a Cognex Camera In-Sight 7010 with a Redlion HMI G315. I am using the Cognex In-Sight Camera Image...
Replies
3
Views
3,332
Hello everyone, We are using Cimplicty in our company to communicate with some CH200 PLC's and i've managed to connect some S7-1200 PLC's. Now...
Replies
0
Views
2,386
Back
Top Bottom