TCP/IP communication with the Siemens CP343-1 Lean, SF light on

hprosjplc

Member
Join Date
Feb 2008
Location
Oslo
Posts
18
Hi!
Right now wo are trying to establish communication between two Siemens CP 343-1 Lean Ethernet modules with CPU314 IFM. The problem is that none of the two modules will go into run-mode.(SF and STOP light on).
Currrently we have:
- Set diffrent adresses (192.168.0.1 and 192.168.0.2).
- Made sure the connection is present in netpro.
- Used both a twisted, and untwisted TP cable between the modules.
- We have entered some data to be sendt in DB blocks.
- Used the adress from netpro in LADDR(110)
- Used ID=1

I get the error code: 8183 wich i think is "module not configured, or configured wrong".

We use blocks AG_SEND and AG_RECV.

We appreciate any help! :)
 
Did you compile and download to both stations from NetPro ?

Is LADDR=110 in hex ? 110 corresponds to 272 as the decimal i/o address you can see in the HW Configuration.

You can also look into the diagnostics buffer in the CP343-1 module.
 
We use two different PC`s to configure the separate modules, so we have compiled and downloaded to both:)

LADDR is 110 in hex. In netpro i can see an illustraion of a block with the 110 address. In netpro and Cp 343 properties the S7 subnet ID is 001A - 0008 if this is important?

The diagnostic buffer on the send module gives me te error code 8183 (se previous post).
 
Any ideas? I have now tried both passive and active connection establisghment on both CP modules. Double checked the IP adress, and the LADDR adress. Still it switches between error code 8181 and 8183.
 
hprosjplc said:
We use two different PC`s to configure the separate modules, so we have compiled and downloaded to both
I dont particularly like that. Why do you not configure one STEP7 project with both stations ?

hprosjplc said:
LADDR is 110 in hex. In netpro i can see an illustraion of a block with the 110 address.
Then that part should be OK.

hprosjplc said:
In netpro and Cp 343 properties the S7 subnet ID is 001A - 0008 if this is important?
If both have the same settings it should be OK. Still, I prefer to configure a connection in one STEP7 project. There is no reason to split it up unless you cannot share code with a 3rd party for example.

hprosjplc said:
Still it switches between error code 8181 and 8183.
8181 is normal "job active".

These two tips from online support helps maybe:

"In the S7-300 and S7 400 CPUs, the communication block FC5/50 AG_SEND/AG_LSEND at the input parameter ACT is started with High pulse. Then the block must run through with "Low" at the ACT input until the asynchronous communication job has been completed with the output parameter DONE or ERROR."

"As long as a connection has not been set up or has been interrupted, this is reported on the block with output parameter ERROR=1 and STATUS=0x8183 or 0x8304. Then there must be a delay of approx 1 second before the block is called again!"

Be sure to make ACT an impulse via a one-shot, and that it is not retriggered before 1 sec after DONE or ERROR is TRUE.
 
By the way. If the SF is ON on the CP343-1, then you can also investigate the diagnstics buffer on the CP. Normally you get an error description in clear text.
 
8181 means that the job is active and sending data aka working. One cp should be active connection partner and the other passive. You could go online in netpro to check that the connections are active. After you have set up the connections in netpro you could rightclick agsend and agreceive and choose connections that way S7 will enter the correct parameters for you. Also if you have tcp connections swith to iso on tcp because that protocol has better handling of telegram lengths.

Double post Jesper is fast :)
 
JesperMP said:
I dont particularly like that. Why do you not configure one STEP7 project with both stations ?

Then that part should be OK.

If both have the same settings it should be OK. Still, I prefer to configure a connection in one STEP7 project. There is no reason to split it up unless you cannot share code with a 3rd party for example.

I totally agree and even if there is a third party involved i usually add a dummy cpu. The dummy contains the correct cpu of the third party and the cpcard nothing else. The dummy cpu in my opinion makes it easier troubleshot and configure connections than using an unspecified connection
 
I have a feeling that the explanation of 8183 is mistranslated in an english STEP7 version. "No configuration or the service (?) has not yet started on the Ethernet CP."
Can someone with a german STEP7 tell me what is says in the original text ? (Roy ?).
 
After reading the texts in the online help and the tips from support again and again, I have come to the conclusion that 8131 means that there is no connection to the partner CP. Either because is hasn't been configured, or there is an error in the configuration, or because there is no physical connection.

So I suggest this:
Create ONE STEP7 project with both PLCs.
Setup the connection and download from NetPro to both PLCs.
Use the sample project as template for the code.
Connect both CPs and your configuring PCs to the same switch. Make sure that you can ping both CPs from the PC.
If the connection still fails with SF on the CP343-1 modules, then investigate the CP diagnostics buffer.
 
Thank you! Now we have created one project, and also tried to create dummy CPU`s in separate projects. The problem although was that the CP module had compability issues with the CPU. Fortunately we hade some spare CPU315-2 DP.

Now all the errors are gone, we have active connection, but we still haven`t accomplished to send any data. In the recieve block we used DINT length, and in the send block just INT. We did this because INT didn`t seem long enough to hold the entire message. Is this due to tcp/ip head and tail message lenghts? or should we be able to just use word?
 
Right now we have the error code 8184 in the AG_SEND block, wich i have looked up, but can`t seem to find the error.

Correction: The master CPU has the error 8185, and the slave has 8184.
 
Last edited:
hprosjplc said:
Thank you! Now we have created one project, and also tried to create dummy CPU`s in separate projects. The problem although was that the CP module had compability issues with the CPU. Fortunately we hade some spare CPU315-2 DP.

Now all the errors are gone, we have active connection, but we still haven`t accomplished to send any data. In the recieve block we used DINT length, and in the send block just INT. We did this because INT didn`t seem long enough to hold the entire message. Is this due to tcp/ip head and tail message lenghts? or should we be able to just use word?

The meaning of [INT] as the LEN-parameter is only to display the programmer the length of received data, not to store it. To store the data which is being transfered (for example) place :

RECV:=P#DB152.DBX0.0 BYTE 40
=>(description), [DB152] as the Datablock where to store received data with a length of 40 bytes (create a DB152 with a length of 40 bytes)

I hope this helps you out !
 
Hello Oslo,

I suggest you should check out the siemens example that Jesper posted a link to.

I used the same site when I did a ethernet connection with 343's and 315-2 DP for the first time. It is very easy to see how it works if you go through that example first. That is to clear up everything regarding LEN, ACT etc...

reg
Andreas
 

Similar Topics

I am trying to establish communication between Siemens PLC 1500 and Matlab. I followed a tutorial on youtube at this link: But when I got to the...
Replies
0
Views
361
Hi All, I am trying to communicate siemens PLC with FESTO Servo & 3 Festo make Steppers on FHPP Modbus Protocol. Sometimes, I face Modbus...
Replies
0
Views
1,343
I have been working on communicating with Siemens KTP600 Basic PN HMI from my microprocessor. The main communication protocol that HMI uses with...
Replies
2
Views
12,607
Hi, I Have a TSX Premium with ethernet card and a Siemens PLC with a CP343-1 ethernet card. Both can speak Modbus. Anyone who have done this...
Replies
5
Views
5,293
Hello, We have a client where we must replace an old Omron PLC with new Siemens S7 PLC. The Omron PLC is connected through a RS232 connection...
Replies
6
Views
21,565
Back
Top Bottom