ModBus TCP connection between Siemens CP443-1 and VBA Excel => Using TIA Portal

YELO GSD

Member
Join Date
Apr 2015
Location
Antwerp
Posts
3
Hellow,

I would like to build a MODBUS TCP connection between a Siemens CP443-1 (or a Siemens CP343-1) card and Visual Basic Application on Microsoft Excel. Probably reading data to Excel VBA would be the complex part of the problem. Thereout I would be a step forward if someone help me to get ModBus addresses from Siemens.

I know that you have to purchase blocks if you’re working in S7. If you want a ModBus TCP connection via CPU you’ve to apply the following package from Siemens ‘2XV9 450-1MB02’. Do you want to communicate via CP card you should use the '2XV9 450-1MB00' package.
If you switch to TIA Portal then these blocks are automatically integrated. This is also the reason why I’m using TIA Portal. I find nowhere a detailed manual where you get an explanation how to work out the ModBus TCP communication via CP card (443-1 or 343-1) using TIA Portal.

It would pleasure me, if someone can solve my problem.

Grt, YELO
 
Why Modbus?
Why not just regular TCP/IP?
AG_SEND/AG_RECV in the PLC with TCP socket comms on the PC?

Because my partner system can only communicate with modbus and this are also the specs. Naturally are the AG_SEND/AG_RECV blocks much easier, but it have to go about modbus.

grt,
 
VBA doesn't have a native Modbus interpreter.
You'll either have to find one on the net, or purchase one.
If you're feeling particlarly adventurous, you could make your own.

THIS has a very nice explanation of Modbus TCP. It also shows the amount of work it'll take to write your own interpreter.

That being said, Siemens doesn't work with the native Modbus addressing.
It uses a single DB and then uses the offset received from the client to get the data in said DB.
THIS has been somewhat useful to me.

If the VBA needs to talk to the Modbus system, then you're going to have to do it the hard way. But if the Modbus system only talks to the Siemens, then there's really no reason at all why you should be forced to stick to Modbus, when neither system natively supports it.
 
Hellow,

I would like to build a MODBUS TCP connection between a Siemens CP443-1 (or a Siemens CP343-1) card and Visual Basic Application on Microsoft Excel. Probably reading data to Excel VBA would be the complex part of the problem. I would be a step forward if someone help me to get ModBus addresses from Siemens.

I know that you have to purchase blocks if you’re working in S7. If you want a ModBus TCP connection via CPU you’ve to apply the following package from Siemens ‘2XV9 450-1MB02’. Do you want to communicate via CP card you should use the '2XV9 450-1MB00' package.
If you switch to TIA Portal then these blocks are automatically integrated. This is also the reason why I’m using TIA Portal. I find nowhere a detailed manual where you get an explanation how to work out the ModBus TCP communication via CP card (443-1 or 343-1) using TIA Portal.
r
It would pleasure me, if someone can solve my problem.

Grt, YELO


Hi!

Check this Step7 Classic STL code from one of the sps-forum members - Lars Weiss.

I run it on an S7315/CP343 as a server (slave). It works OK for me.

The driver points to a data area - normally a DB, and Modbus register 0(1) would be the first DW in this data area. So all status/values you want to communicate must be transferred to or from this area by your own coding - simple!



http://www.sps-forum.de/simatic/14182-modbus-tcp-funktionbausteine-step-7-a-2.html#post230244

Kalle
 
YELO GSD, try to describe what the various communications partners really are, and what this whole thing is supposed to achieve functionally.

Is the specification that there must be a Modbus TCP connection to a VBA "application" in Excel ?
That sounds very strange indeed.
What this is supposed to achieve can probably be done without Modbus TCP.
In any case, an "application" made with VBA in Excel does not sound good to me.
 

Similar Topics

Hello gentlemen, Im working on a small project on TIA Portal, about establishing a Modbus TCP connection between my ET200SP plc and a socomec...
Replies
11
Views
244
Hello, I'm gonna try to make this as clear as possible. For a project, we have 3 Unitronics PLC's controlling each a machine. The company that...
Replies
8
Views
3,390
I have a new 1211C to play with so I decided to test its Modbus TCP instruction. I have followed the guide below but it seems that I can't...
Replies
4
Views
3,572
Dear experts I have a great problem in terms of connection between PLC and vision software through Modbus TCP. Roborealm (vision software) is...
Replies
0
Views
2,445
If a device has Modbus RTU over serial and Modbus RTO over TCP and Modbus TCP then there is a difference between Modbus RTU over TCP vs Modbus TCP...
Replies
7
Views
441
Back
Top Bottom