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 September 5th, 2019, 06:32 AM   #1
bmw_apprentice
Member
United Kingdom

bmw_apprentice is offline
 
bmw_apprentice's Avatar
 
Join Date: Jun 2007
Location: Oxford, UK
Posts: 149
S71500 Dynamic Pointer for S7400 interface

Hi All,


Long time gap between visits again, but this is the only place to come for PLC advice. So I am here.


I have come up against a problem I cant seem to solve in the Simemens range of PLCs.


I want to write an S7 GET function that will GET me any length of data I choose upone request. The GET is in a 1500 PLC (1516) and the source of the data is a 400 PLC. GETs are length limited and quite short (I need a fair bit of data). I am in no hurry so the data can be GOT in as many scans or time as required.


My idea was to write a simple manually looping function that GETs the data from the PLC automatically one max length after another by building a dynamic pointer up from component parts. I have done this in 400 PLCs before with great success. I, however, do not own this old code and also cant find a copy to *******ise.



In trying to write this new one I cant find a way to dynamically address the pointer of a 400 PLC address in a 1500 PLC and then plonk that data, dynamically, into the 1500 PLC.


I have a screenshot of my current super simple block that isnt looping at all, but simply trying to use the dynamic pointer as a one shot... it doesnt work.


Any ideas?



If have explained badly, please tell me.
Attached Images
File Type: jpg GET PIC.jpg (157 Bytes, 56 views)

Last edited by bmw_apprentice; September 5th, 2019 at 06:36 AM.
  Reply With Quote
Old September 5th, 2019, 06:37 AM   #2
bmw_apprentice
Member
United Kingdom

bmw_apprentice is offline
 
bmw_apprentice's Avatar
 
Join Date: Jun 2007
Location: Oxford, UK
Posts: 149
My image wont seem to load for me. If you cant see it let me know, or any ideas how to upload it
  Reply With Quote
Old September 5th, 2019, 07:07 AM   #3
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,852
If you have to send relatively large volumes of data, rather than creating your own based on GET, I recommend to use BSEND/BRECV. You need code in borh partners but it is better, easier an safer than GET.
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Old September 5th, 2019, 07:35 AM   #4
bmw_apprentice
Member
United Kingdom

bmw_apprentice is offline
 
bmw_apprentice's Avatar
 
Join Date: Jun 2007
Location: Oxford, UK
Posts: 149
Quote:
Originally Posted by JesperMP View Post
If you have to send relatively large volumes of data, rather than creating your own based on GET, I recommend to use BSEND/BRECV. You need code in borh partners but it is better, easier an safer than GET.
I was hoping to avoid adjusting the other end. Only because of warranty on it from the OEM, but I think I can convince the customer to let me. Havent set up a TCP connection in years in S7. Do I have to add the connection to netpro or can I do it in code. Wont have an opportunity to stop start the PLC for a few months otherwise.



I will try it.
  Reply With Quote
Old September 5th, 2019, 08:10 AM   #5
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,852
For BSEND/BRECV you have to the connection in NetPro.
If that is not acceptable, think about TCON/TSEND/TRECV. With these blocks you setup the connection in code.
But BSEND/BRECV is much easier than TCON/TSEND/TRECV. Just as easy as PUT/GET.
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Old September 5th, 2019, 09:28 AM   #6
bmw_apprentice
Member
United Kingdom

bmw_apprentice is offline
 
bmw_apprentice's Avatar
 
Join Date: Jun 2007
Location: Oxford, UK
Posts: 149
Quote:
Originally Posted by JesperMP View Post
If you have to send relatively large volumes of data, rather than creating your own based on GET, I recommend to use BSEND/BRECV. You need code in borh partners but it is better, easier an safer than GET.
Quote:
Originally Posted by JesperMP View Post
For BSEND/BRECV you have to the connection in NetPro.
If that is not acceptable, think about TCON/TSEND/TRECV. With these blocks you setup the connection in code.
But BSEND/BRECV is much easier than TCON/TSEND/TRECV. Just as easy as PUT/GET.
OK I will try and find a window to stop/start the CPU.


In any case the question stands. If I want to create a dynamic pointer in TIA that can be used in a GET, how do I do it?


If I really really really want to...
  Reply With Quote
Old September 5th, 2019, 09:40 AM   #7
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,852
Are you wanting to create the dynamic pointer because you have to span more data than 1 GET call allows, or because the data realy changes dynamically ?

If it is just a method to get more data, If it was me, then I would just program multiple GET calls, each time with the desired setup for the data to fetch at ADDR_1 and RD_1. And then I would make sure that only 1 GET was active at a time.
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Old September 5th, 2019, 09:44 AM   #8
bmw_apprentice
Member
United Kingdom

bmw_apprentice is offline
 
bmw_apprentice's Avatar
 
Join Date: Jun 2007
Location: Oxford, UK
Posts: 149
Quote:
Originally Posted by JesperMP View Post
Are you wanting to create the dynamic pointer because you have to span more data than 1 GET call allows, or because the data realy changes dynamically ?

If it is just a method to get more data, If it was me, then I would just program multiple GET calls, each time with the desired setup for the data to fetch at ADDR_1 and RD_1. And then I would make sure that only 1 GET was active at a time.
No real reason.


More an open question.



Trying to do dynamic pointers in TIA that actually works...
  Reply With Quote
Old September 5th, 2019, 09:56 AM   #9
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,852
You wont see me answer many posts about dynamic pointers. I try to avoid them.
Especially since TIA and S7-1500 has many improvements in areas were you would manually program pointers in Classic and S7-300/400. I try to program everything as symbolically as possible.
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Old September 11th, 2019, 09:30 AM   #10
bmw_apprentice
Member
United Kingdom

bmw_apprentice is offline
 
bmw_apprentice's Avatar
 
Join Date: Jun 2007
Location: Oxford, UK
Posts: 149
Quote:
Originally Posted by JesperMP View Post
You wont see me answer many posts about dynamic pointers. I try to avoid them.
Especially since TIA and S7-1500 has many improvements in areas were you would manually program pointers in Classic and S7-300/400. I try to program everything as symbolically as possible.
So I fixed my problem, even if you dont advise it. I tried it for fun.

I just fixed my DB in my TIA PLC to be manually numbered and used conventional pointers. Works great.

I am now going to investigate using OPC/UA instead.

I may start a new thread, but has anyone used OPC/UA between 2 PLCs? I know it is possible using a CP443 and a 400 PLC, but have never seen it.
  Reply With Quote
Old September 11th, 2019, 09:35 AM   #11
mk42
Member
United States

mk42 is offline
 
Join Date: Jun 2013
Location: MI
Posts: 2,182
Quote:
Originally Posted by bmw_apprentice View Post
So I fixed my problem, even if you dont advise it. I tried it for fun.

I just fixed my DB in my TIA PLC to be manually numbered and used conventional pointers. Works great.

I am now going to investigate using OPC/UA instead.

I may start a new thread, but has anyone used OPC/UA between 2 PLCs? I know it is possible using a CP443 and a 400 PLC, but have never seen it.

S7-1500's with the latest firmware can be both OPC UA clients and servers. Activating the server is pretty much just checking a box, but the client side is a bit more complicated.


See app example from support site:
https://support.industry.siemens.com...view/109762770
  Reply With Quote
Old September 11th, 2019, 12:24 PM   #12
bmw_apprentice
Member
United Kingdom

bmw_apprentice is offline
 
bmw_apprentice's Avatar
 
Join Date: Jun 2007
Location: Oxford, UK
Posts: 149
Quote:
Originally Posted by mk42 View Post
S7-1500's with the latest firmware can be both OPC UA clients and servers. Activating the server is pretty much just checking a box, but the client side is a bit more complicated.


See app example from support site:
https://support.industry.siemens.com...view/109762770
I just tried it. Even with the excel tool from siemens it works.



I like it a lot I4.0 is here... wonder if the company firewall will let me use it to a server. Doubt it...
  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
Rockwell BOOTP/DHCP Server on Windows 7 kdcui LIVE PLC Questions And Answers 19 April 25th, 2019 12:05 PM
S7: Add offset to Any Pointer for BLKMOV Mark Whitt LIVE PLC Questions And Answers 3 June 5th, 2015 02:53 PM
Help: Looping a pointer to ANY-var in Step7 Balagos LIVE PLC Questions And Answers 5 January 21st, 2009 06:29 AM
Step7 - BLOCK_DB and ANY parameters RMA LIVE PLC Questions And Answers 10 June 17th, 2007 08:06 AM


All times are GMT -5. The time now is 12:25 AM.


.