S7 300 Move word Question

randy741985

Member
Join Date
Oct 2006
Location
US
Posts
154
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
 
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

:)
 
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:
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
 
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
 
RMA said:
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?
 
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.
 
L D[AR2 said:
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.
 
uptown47 said:
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.
 

Similar Topics

Hi all I currently have a system where data is scanned into a system and in the fc is a move instruction which I move a '00' on the input and...
Replies
2
Views
1,837
there is another problem when I use the Function below: there are 100 step in the DB200 there are 12 items for each step: Step 1------------...
Replies
10
Views
4,415
RE:Another Q for Move data to different address(Siemens S7-300) Thank you again for this, However I wanna to ask about: If I receive a initial...
Replies
1
Views
2,576
Thank you About L D[AR2,P#0.0] I found it very useful, and how can I make the 100 step automatic put the input value into DB200 , if I choose 1 ~...
Replies
1
Views
1,841
Hello all, If I wanna move a value (20) to DB200.DBW10, DB200.DBW20.....DB200.DBW200 how can I make it happen by using a ladder or STL ...
Replies
2
Views
1,672
Back
Top Bottom