Technical Forum

Communication / Networks

Communication with S7-1200 with PC

Thread Starter: Clecle   Started: 4/26/2012 10:20 AM   Replies: 23

« Previous thread Next thread »
123» Page 1 of 3 (24 items)
  4/26/2012, 10:20 AM
Joined 6/24/2011
Last visit: 4/30/2012
Posts: 15
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello,

I have a problem with communication to PC to SPS.

My problem is with frame



When i transmit this frame the sps don't read correctly,

Any one as a idea?

Thank
Top
  4/26/2012, 11:27 AM
Joined 11/27/2007
Last visit: 6/18/2013
Posts: 877
Rating:
Rated: Outstanding [3.84 out of 5 / rated 61 time(s)]. (61) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello Clecle,
I can't see the frame, please add it as attachment.

Regards,
Kaulquappe
Top
  4/26/2012, 11:45 AM
Joined 6/24/2011
Last visit: 4/30/2012
Posts: 15
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Kaulquappe,

the frame in HEXA

Regards

Clecle

Attachment: frame.txt - Bloc-notes.pdf  (13 Downloads)



=== Edited by Clecle @ 4/26/2012 1:18 PM [GMT ] ===



Top
  4/26/2012, 1:17 PM
Joined 6/24/2011
Last visit: 4/30/2012
Posts: 15
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
My code

Attachment: codeSPS.jpg  (16 Downloads)

Top
  4/26/2012, 1:18 PM
Joined 6/24/2011
Last visit: 4/30/2012
Posts: 15
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
My parameters

Attachment: ParametreSPS.jpg  (13 Downloads)

Top
  4/26/2012, 3:12 PM
Joined 6/24/2011
Last visit: 4/30/2012
Posts: 15
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
My question what is the end character for TRCV give OK?

Best Regard


Top
  4/26/2012, 3:31 PM
Joined 11/27/2007
Last visit: 6/18/2013
Posts: 877
Rating:
Rated: Outstanding [3.84 out of 5 / rated 61 time(s)]. (61) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello Clecle,
I'm afraid you didn't understand how TCP native works.
A TCP telegram neither includes any length information nor a fixed end character. To when you start a T_RCV for example with length 6, the CPU will get 6 byte from the CP when the CP received 6 byte. When you send only 5 byte, there will be no data in the CPU. When you then send a second telegram with 5 byte the CPU will get 5 byte from the first telegram and the first byte of the second telegram. The remaining 4 bytes are stored in the CP.
You can only receive telegrams which have all got the same length and the parameter DATA of  T_RCV must have even this length.

Regards,
Kaulquappe
Top
  4/26/2012, 3:55 PM
Joined 6/24/2011
Last visit: 4/30/2012
Posts: 15
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello Kaulquape,

Ok I understand but why but what send 8 character I see only 6.

Attachment: trcv.jpg  (12 Downloads)

Top
  4/26/2012, 4:20 PM
Joined 11/27/2007
Last visit: 6/18/2013
Posts: 877
Rating:
Rated: Outstanding [3.84 out of 5 / rated 61 time(s)]. (61) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello Clecle,
which 6 Byte do you receive?
Regards,
Kaulquappe
Top
  4/26/2012, 4:23 PM
Joined 6/24/2011
Last visit: 4/30/2012
Posts: 15
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello Kaulquappe,
The last 6 Bytes.

The original is DATATEST

Regards,
Clecle
Top
123» Page 1 of 3 (24 items)
Actions