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 March 19th, 2008, 11:24 AM   #1
randy741985
Member
United States

randy741985 is offline
 
Join Date: Oct 2006
Location: US
Posts: 142
S7 300 Move word Question

I am new to S7 300 programming, I have a program with a Integer tag "#TARGET POSITION"

My question is in ladder, I cant find anything writing a value to this tag. but my setpoints get written to it, how do I go about finding where this tag "#TARGET POSITION" gets written to?

I have about 10 ladder routines in this program, does the find function only look for the tag in the ladder routine you are currently in?


Thanks
  Reply With Quote
Old March 19th, 2008, 11:56 AM   #2
uptown47
Lifetime Supporting Member
United Kingdom

uptown47 is offline
 
Join Date: Feb 2008
Location: Over there, next to those boxes
Posts: 1,127
It sounds like #Target_Position is declared in the Variable Declaration Table at the top of the screen.

(move the mouse up the screen inside your FC until the icon turns into two parallel lines, then click left mouse button and pull down... voila! Variable Declaration Table).

If so, you need to find the calling block by clicking "Call Structure" at the bottom of the Program Elements on the left.

Then go to the calling block (say OB1) and see what value is passed into #Target_Position when its called...

Hope that helps

  Reply With Quote
Old March 19th, 2008, 11:56 AM   #3
RMA
Member
Scotland

RMA is offline
 
RMA's Avatar
 
Join Date: Sep 2004
Location: North of Hamburg, Germany
Posts: 2,052
The "#" means this is a local variable. You'll find these listed at the top of the screen and this one will probably be either under the "IN" or the "IN/OUT" category.

An easy way to find where local variables are used is to place the cursor on the variable then with CNRTL-SHIFT-B and CNRTL-SHIFT-F you can jump to the previous or next use of the variable.

The data for the variable itself is passed over as a parameter from the calling program.

The find function looks for Global variables throughout the program, but be aware that variables only accessed using indirect addressing will not show up.

Right click on the variable to call up X-Ref from inside the block. Note that if you call X-Ref up externally via Extras, so that you get all the variables in a long list, only the global variables show up, not local variables.

Last edited by RMA; March 19th, 2008 at 11:59 AM.
  Reply With Quote
Old March 19th, 2008, 01:15 PM   #4
uptown47
Lifetime Supporting Member
United Kingdom

uptown47 is offline
 
Join Date: Feb 2008
Location: Over there, next to those boxes
Posts: 1,127
Quote:
Originally Posted by RMA
An easy way to find where local variables are used is to place the cursor on the variable then with CNRTL-SHIFT-B and CNRTL-SHIFT-F you can jump to the previous or next use of the variable.
Never knew that!! Great tip RMA, thanks.

  Reply With Quote
Old March 19th, 2008, 01:38 PM   #5
randy741985
Member
United States

randy741985 is offline
 
Join Date: Oct 2006
Location: US
Posts: 142
Thanks That Helped...
  Reply With Quote
Old March 19th, 2008, 02:56 PM   #6
randy741985
Member
United States

randy741985 is offline
 
Join Date: Oct 2006
Location: US
Posts: 142
If so, you need to find the calling block by clicking "Call Structure" at the bottom of the Program Elements on the left.

Then go to the calling block (say OB1) and see what value is passed into #Target_Position when its called...


I understand what your saying here I just havent seen any tag information when I look through the Call Structure...

Maybe Im misunderstanding how to use the call Structure.

Thanks
  Reply With Quote
Old March 19th, 2008, 03:00 PM   #7
uptown47
Lifetime Supporting Member
United Kingdom

uptown47 is offline
 
Join Date: Feb 2008
Location: Over there, next to those boxes
Posts: 1,127
The call structure is just a list of all the blocks and where they are called from such as..

OB1
---- FC1
---- FC2
------FC3

In the above instance OB1 calls FC1 and FC2. Then FC2 calls FC3

See where your block is being called from and then you can find out the value or address of the #local_variable
  Reply With Quote
Old March 19th, 2008, 03:25 PM   #8
randy741985
Member
United States

randy741985 is offline
 
Join Date: Oct 2006
Location: US
Posts: 142
OK Thanks
  Reply With Quote
Old March 20th, 2008, 01:54 PM   #9
randy741985
Member
United States

randy741985 is offline
 
Join Date: Oct 2006
Location: US
Posts: 142
Quote:
Originally Posted by RMA
An easy way to find where local variables are used is to place
Right click on the variable to call up X-Ref from inside the block. Note that if you call X-Ref up externally via Extras, so that you get all the variables in a long list, only the global variables show up, not local variables.
Is it not possible to use The Goto Function While you are Online and monitoring the ladder?
  Reply With Quote
Old March 20th, 2008, 02:16 PM   #10
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,526
I originally thought not, but yes you can. When offline, if you right click over the address, the goto location comes up. Using the same approach does not work whilst monitoring - you have to left click on the address first, and then right click to get the goto location option.
  Reply With Quote
Old March 20th, 2008, 02:52 PM   #11
randy741985
Member
United States

randy741985 is offline
 
Join Date: Oct 2006
Location: US
Posts: 142
Quote:
Originally Posted by L D[AR2,P#0.0]
I originally thought not, but yes you can. When offline, if you right click over the address, the goto location comes up. Using the same approach does not work whilst monitoring - you have to left click on the address first, and then right click to get the goto location option.

I am using Step7 VER.5.3 Revision Level K5.3.0.1
It doesnt work with this Version Maybe you have a newer Ver.
  Reply With Quote
Old March 20th, 2008, 03:52 PM   #12
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,526
Yes, I'm running V5.4
  Reply With Quote
Old March 21st, 2008, 05:39 AM   #13
uptown47
Lifetime Supporting Member
United Kingdom

uptown47 is offline
 
Join Date: Feb 2008
Location: Over there, next to those boxes
Posts: 1,127
On mine (v5.4) when I right click on a local var and Go To Location it says no cross reference available....

??
  Reply With Quote
Old March 21st, 2008, 06:33 AM   #14
Jeebs
Member
Belgium

Jeebs is offline
 
Join Date: Feb 2007
Location: Leuven
Posts: 1,010
Quote:
Originally Posted by uptown47
On mine (v5.4) when I right click on a local var and Go To Location it says no cross reference available....

??
For a local var, you can only: Go To > Local application.
  Reply With Quote
Old March 21st, 2008, 07:55 AM   #15
randy741985
Member
United States

randy741985 is offline
 
Join Date: Oct 2006
Location: US
Posts: 142
Thanks For The Help Everyone,
  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
s7 300 FC's and temp variables tny LIVE PLC Questions And Answers 29 May 4th, 2016 10:15 AM
Redundancy on S7 300 PLCs Eduardo Pelegrin LIVE PLC Questions And Answers 11 August 18th, 2008 03:58 AM
Extracting bits out of a double word with Siemens S7 kemppioy LIVE PLC Questions And Answers 4 November 5th, 2007 08:47 AM
S7 question DeHulk LIVE PLC Questions And Answers 3 April 7th, 2003 12:35 AM
very newbie question about simatic S7 PLCs HG37 LIVE PLC Questions And Answers 5 January 7th, 2003 11:36 AM


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


.