MODBUS Communication Between S7 PLC and National Instrument Master Software

R

Thread Starter

rnarias

i'm trying to communicate a master software (from National Instrument) on PC with a s7 200 Siemens PLC using MODBUS RTU. the problem is that cannot get it. the s7 200 has the libraries installed. i bought a rs232 to 485 converter but the master software say "the port is busy" and not connected. what kind of cable do have to use? between converter and PLC. UTP? profibus? other?
 
You bought an RS-232/485 converter for a reason. Presumably the S7 has a Modbus slave port that talks on RS-485.

What kind of cable? Most Modbus RTU RS-485 links are 2 wire, half duplex. If yours is too, use twisted pair copper wire cable and wire + to + and - to -, or A to A and B to B; and a 3rd wire signal ground should be connected to each other, too.

You'll have to read the documentation for connecting the converter to the PC/NI serial port, if it didn't come prewired with a DB9 for a PC serial port.

If the master reports that its port is busy, you need to look for other applications or services that take over a serial port. What other serial communications drivers has that PC had installed? Some other app is hogging the serial port.

If you can't find what is taking over the port, then get a USB/RS-232 or USB/RS-485 converter which will install on a virtual port that you can then point the NI Modbus to.
 
grateful for your reply.

yes, the S7 has a Modbus slave port that talks on RS-485 in DB9. it is due to the Siemens PLC has some libraries for this purpose.

well, the PC has installed Step 7 and this program has serial communications drivers that i'm using to program the PLC with the PPI/PC cable, but just for that. once I have programmed the PLC, close the Step 7 and the port is released (i guess). when the converter is not connected the software says "not connection"

why profibus cable does not work for this communications? neither ppi/pc cable?
 
1) Profibus cable
Profibus PA is not RS-485. Profibus DP is RS-485. I don't know whether Profi DP is full duplex or half duplex or whether a Profibus DP connector match your RS-232/485 converter is an unknown. You'll have to research the details. It could work, or might require a wiring adapter.

I have no idea what a ppi/pc cable is. Look up its wiring and see how it matches the S7 RS-485 port.

2) port busy/no connection
The message "port is busy" is from the PC Modbus master. It's nice that the S7 says 'no connection', but that doesn't tell anything about the RS-232 port on the PC. Some application has the taken over the RS-232 port on the PC and apparently it isn't the NI Modbus master.
 
If the serial port is indeed unable to connect, either through an application or driver problem, then there are options, like using an RS-485 to USB converter, like this one from ICP:

http://www.icpdas-usa.com/tm_7561.html

This unit has a standard 10-pin terminal block. You said that your Siemens PLC uses a DB9 connection. Are there any other serial port options? Also, what was your operating system on you PC? Not all converters are compatible with every Windows OS.

The folks at ICP can actually match up the specs of your PLC to your PC to see if there are other compatibility issues with your configuration and to make any additional recommendations.
 
"You said that your Siemens PLC uses a DB9 connection. Are there any other serial port options?"

R: my PC has one db9 port available, the PLC has port 0 and port 1, both db9, its use rs485 to communicating.

"Also, what was your operating system on you PC? Not all converters are compatible with every Windows OS".

R: the converter is a generic converter pro model 485A; my OS is windows XP

"The folks at ICP can actually match up the specs of your PLC to your PC to see if there are other compatibility issues with your configuration and to make any additional recommendations"

R: well, i'm from Venezuela and in this moment is some difficult to achieve that type of specialized device so i would have to do a circuit that simulates the ICP.
 
Is your serial port visible on LabVIEW VI? Be careful with time in loops, maybe something is causing timeouts. Are you using LabVIEW Modbus Libraries? LabVIEW 2014 have some bugs on this, we are running a modbus apply with NI hardware (cRIO 9075) and my partner got no results with this library and he finally develop modbus poll through VISA readings & writings. Maybe you should try also communication between your PLC and Modbus Poll software (free trial, 7 days), and check if your port still busy.

Regards,
Alberto

>i'm trying to communicate a master software (from National
>Instrument) on PC with a s7 200 Siemens PLC using MODBUS
>RTU. the problem is that cannot get it. the s7 200 has the
>libraries installed. i bought a rs232 to 485 converter but
>the master software say "the port is busy" and not
>connected. what kind of cable do have to use? between
>converter and PLC. UTP? profibus? other?
 
Top