You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old February 1st, 2018, 10:07 AM   #1
Secret
Member
United Kingdom

Secret is offline
 
Join Date: Aug 2005
Location: Beds
Posts: 55
IO Comms On Profinet

Hi all,

I am trying to get my head round Profinet comms.
I need to communicate with a Robot that has a profinet card fitted.
The card is set to 32bytes in and out. IP address and name are set.
Using an S7 313C with a CP-343-1. The node is set on the profinet network in the hardware config and the CP-343 is 'seeing' the node. When the remote card is powered down the 343 -1 goes into fault and when the remote card is powered up the fault goes off.

The bit I'm struggleing with is getting the data, from looking through various manuals I believe I need to use PNIO_SEND and RECV.

What is the CPLADDR refering to?
I attach the hardware config of the rack, node and the PNIO_SEND and RECV rung.

Currently I have put 190 in the CPLADDR as it's hex for 400 which is the I/O start address of the module???

Thanks for reading, any pointers gratefully received....

SS_01.jpg

SS_02.jpg

SS_03.jpg
__________________
Life is a seris of flashing red lights + blue screens!

Love All Serve All
  Reply With Quote
Old February 1st, 2018, 01:06 PM   #2
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 5,531
It's the start address of the module as seen by the CPU. Your screen shot shows it as 368
Click on the PNIO blocks and press F1 to see the help provided.
  Reply With Quote
Old February 1st, 2018, 03:42 PM   #3
Secret
Member
United Kingdom

Secret is offline
 
Join Date: Aug 2005
Location: Beds
Posts: 55
Hi, thanks.

I looked through the help files and managed to fathom most of it. So it is the start address of the CP343-1 rather than the remote module itself?

Here's my next stupid question then....

In the CP343-1 config it says the I/O area is 16 bytes long (fixed value), therefore I assumed it was data reserved for info from the card - status etc. I assume more than 16 bytes of remote I/O or inverters etc can be gathered through the profinet....

I have used a CP343-1 before but for cpu to cpu messaging so this is new ground for me.

Thanks for the info so far....
__________________
Life is a seris of flashing red lights + blue screens!

Love All Serve All

Last edited by Secret; February 1st, 2018 at 04:28 PM. Reason: Clarity
  Reply With Quote
Old February 5th, 2018, 04:45 AM   #4
Secret
Member
United Kingdom

Secret is offline
 
Join Date: Aug 2005
Location: Beds
Posts: 55
Morning all.

Any advance on the question above re. data size. Also if you have 2 remote I/O units how does the addressing reflect this?

Cheers
__________________
Life is a seris of flashing red lights + blue screens!

Love All Serve All
  Reply With Quote
Old February 5th, 2018, 05:50 AM   #5
cardosocea
Member
United Kingdom

cardosocea is online now
 
Join Date: Nov 2016
Location: Fields of corn
Posts: 912
When you double click on the remote Node in your hardware config, usually one of the tabs will allow you to configure the words that you want to send/receive from that module (or at least it did before).

Also, W#16#190 is 190 in hexadecimal or 400 in decimal. To match your card, you should have W#16#170 instead I think.

You configure the data size on the remote node itself. Can you post what it looks like when you double click your remote node? I remember there was another way of doing this (potentially from the card itself).
  Reply With Quote
Old February 5th, 2018, 06:46 AM   #6
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,237
CPLADDR must be set to the IO addresses that the cp343-1 itself is set to.
So 368 decimal becomes 170 hexadecimal (so CPLADDR=W#16#170). Not W#16#190 !

The SEND and RECEIVE pins must be set to data block areas that covers the entire IO image that is setup on the module.
Since it starts from Byte 0, and goes to byte 431, the area must be 432 bytes in size, not the 32 bytes in the screenshot above.
Alternatively (and more sensible) change the addresses for the robot to start from byte 0 instead of from byte 400.
__________________
Jesper
3 strikes and you're out
  Reply With Quote
Old February 5th, 2018, 10:06 AM   #7
Secret
Member
United Kingdom

Secret is offline
 
Join Date: Aug 2005
Location: Beds
Posts: 55
Quote:
Originally Posted by cardosocea View Post
......

Also, W#16#190 is 190 in hexadecimal or 400 in decimal. To match your card, you should have W#16#170 instead I think.

You configure the data size on the remote node itself. Can you post what it looks like when you double click your remote node? I remember there was another way of doing this (potentially from the card itself).
Hi, thanks.
I did 190 hex as I assumed (wrongly) I was pointing at IW400 which is what the remote node is set up to write to (second pic) the node is set for 32bytes in and out 400 to 431.
__________________
Life is a seris of flashing red lights + blue screens!

Love All Serve All
  Reply With Quote
Old February 6th, 2018, 01:52 AM   #8
Secret
Member
United Kingdom

Secret is offline
 
Join Date: Aug 2005
Location: Beds
Posts: 55
Quote:
Originally Posted by JesperMP View Post
CPLADDR must be set to the IO addresses that the cp343-1 itself is set to.
So 368 decimal becomes 170 hexadecimal (so CPLADDR=W#16#170). Not W#16#190 !

The SEND and RECEIVE pins must be set to data block areas that covers the entire IO image that is setup on the module.
Since it starts from Byte 0, and goes to byte 431, the area must be 432 bytes in size, not the 32 bytes in the screenshot above.
Alternatively (and more sensible) change the addresses for the robot to start from byte 0 instead of from byte 400.
Morning and thanks.

As above for the 170 vs 190 value.

OK so that irons out how you address the next remote module, the next 32 bytes up.
However I'm still confused why the CP343-1 card is fixed at 16 bytes in the hardware config. Does it reserve the first 16bytes for status or anything?

SS_04.jpg

Cheers
__________________
Life is a seris of flashing red lights + blue screens!

Love All Serve All

Last edited by Secret; February 6th, 2018 at 01:56 AM. Reason: added screen grab
  Reply With Quote
Old February 6th, 2018, 02:14 AM   #9
cardosocea
Member
United Kingdom

cardosocea is online now
 
Join Date: Nov 2016
Location: Fields of corn
Posts: 912
Here's a stupid suggestion, have you tried accessing MIW400/MQW400 directly?

If that works you may get away with a block write instead of the PN IO functions.
  Reply With Quote
Old February 6th, 2018, 02:27 AM   #10
Secret
Member
United Kingdom

Secret is offline
 
Join Date: Aug 2005
Location: Beds
Posts: 55
Quote:
Originally Posted by cardosocea View Post
Here's a stupid suggestion, have you tried accessing MIW400/MQW400 directly?

If that works you may get away with a block write instead of the PN IO functions.
Hi whats a MIW/MQW?

I started off looking at IW400-431 as I assumed it would work in the same way as PROFIBUS I thought nothing could be so difficult as what this has turned out to be but hey ho thats Siemens for you.....
__________________
Life is a seris of flashing red lights + blue screens!

Love All Serve All
  Reply With Quote
Old February 6th, 2018, 02:59 AM   #11
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 5,531
The 16 bytes of address are used by the CPU to control the CP343 and check status of the CP343. The PNIO_SEND and PNIO_RECEIVE blocks read/write to his area.

The IO address space for the Profinet IO connected to the CP343 cannot be directly accessed by the CPU. PNIO_SEND/RECEIVE copy data to/from data blocks in the CPU to/from the CP343's I/O addresses.

In the h/w config right click on the CP343 and find the manual - there is an example in there.
  Reply With Quote
Old February 7th, 2018, 06:39 AM   #12
Secret
Member
United Kingdom

Secret is offline
 
Join Date: Aug 2005
Location: Beds
Posts: 55
Hi all,

Thanks for the help above, the comms to the robot are now happy.

Just to put a lid on this although we couldn't find much help in the manuals we found the following link on the PNIO Send + Receive blocks which others may find helpfull in the future.

https://support.industry.siemens.com...dl=en&lc=de-DE

Cheers
__________________
Life is a seris of flashing red lights + blue screens!

Love All Serve All
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
M340 NOE100 IO Scanning Modbus Comms to AB PowerFlex 753 Drive scader LIVE PLC Questions And Answers 2 February 8th, 2017 06:12 PM
Profinet IO IndraDrive timryder LIVE PLC Questions And Answers 5 September 2nd, 2016 12:39 PM
CompactLogix L43 lossing comms with IO cards zitam LIVE PLC Questions And Answers 7 May 2nd, 2015 10:18 AM
Siemens Profinet IO and Profibus DP-V1 Comms b1b LIVE PLC Questions And Answers 4 February 27th, 2015 08:02 AM
Modbus comms via Point IO (Allen-Bradley) AndrewY LIVE PLC Questions And Answers 4 January 18th, 2011 06:02 PM


All times are GMT -5. The time now is 02:05 AM.


.