Sign in to follow this  
Followers 0
smile

How set output by indirect command?

11 posts in this topic

I want to set output q0.0 by command indirect method. from command A I 0.0 S Q0.0 A I 0.1 R Q0.0 How change to indirect address by use pointer command ?

Share this post


Link to post
Share on other sites
If you go to the Siemens support web-site here: http://www4.ad.siemens.de/-snm-0135030360-...artNode=4000024 and input in the search box "indirect addressing examples" you'll get a whole load of examples. (You may need to click on the Englich language button to get the right version). By the way, can some kind soul tell me how I can hide a URL abomination like the above behind an underlined "here" as a pointer? Cheers Roy

Share this post


Link to post
Share on other sites
Like this (remove underscores): [_URL=http://some.net_]Some Webpage[_/URL_] Some Webpage

Share this post


Link to post
Share on other sites
Thanks Jacek, makes things look a lot better - especially with Siemens web addresses!

Share this post


Link to post
Share on other sites
I need to download in but i don't have AVC card. Who has number AVC? I need to borrow.

Share this post


Link to post
Share on other sites
smile, AVC card isn't for free. I'm afraid that lending it is not possible. However in online help for Step7 you can find answer.

Share this post


Link to post
Share on other sites
Ohhh not for free. but i need to download code example. I am the customer. I buy PLC from Siemens. Why not free? I am feel bad.

Share this post


Link to post
Share on other sites
That's the way Siemens is (and all other big players). We have to live with that.

Share this post


Link to post
Share on other sites
Cut from the Step 7 manual A pointer is used to point to an address. The advantage of this type of addressing is that you can modify the address of the statement dynamically during program processing. Pointer for Memory-Indirect Addressing Program statements that work with memory-indirect addressing are made up of an instruction, an address identifier, and an offset (the offset must be given in square brackets). Example of a pointer in double word format: L P#8.7 Load the value of the pointer into accumulator 1. T MD2 Transfer the pointer to MD2. A I [MD2] Query the signal state at input bit I 8.7 and = Q [MD2] assign the signal state to output bit Q 8.7. Pointer for Area-Internal and Area-Crossing Addressing The program statements that work with these types of addressing are comprised of an instruction and the following parts: address identifier, address register identifier, offset. The address register (AR1/2) and the offset must be specified together in square brackets. Example for Area-Internal Addressing The pointer contains no indication of a memory area: L P#8.7 Load the value of the pointer into accumulator 1. LAR1 Load the pointer from accumulator 1 into AR1. A I [AR1, P#0.0] Query the signal state at input bit I 8.7 and = Q [AR1, P#1.1] assign the signal state to output bit Q 10.0. The offset 0.0 has no influence. Output 10.0 is calculated from 8.7 (AR1) plus the offset 1.1. The result is 10.0 and not 9.8, see pointer format. Example for Area-Crossing Addressing In area-crossing addressing the memory area is indicated in the pointer (in the example I and Q). L P# I8.7 Load the value of the pointer and the area identification in accumulator 1. LAR1 Load memory area I and the address 8.7 into AR1. L P# Q8.7 Load the value of the pointer and the area identification in accumulator 1. LAR2 Load memory area Q and the address 8.7 into AR2. A [AR1, P#0.0] Query the signal state at input bit I 8.7 and = [AR2, P#1.1] assign the signal state to output bit Q 10.0. The offset 0.0 has no influence. Output 10.0 is calculated from 8.7 (AR2) plus the offset 1.1. The result is 10.0 and not 9.8, see pointer format.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0