4/11/2011 10:05 AM | |
Posts: 80 Rating: (2) |
Hi experts! I have2 little different questions in this topic. 1: I have FC100 with input x:pointer and FB100 with input y: pointer. In the FB"LAR1 P##y" is allowed and OKbut in the FC "LAR1 P##x"is not (Step7 makes it red). Why is that? 2: I am monitoring my program. DB1 register == 1 DB2 register == 2 My code is: L P#2.0 LAR1 ADBX[AR1, P#0.0] // <- this is DB1.DBX2.0 ADIX[AR1, P#0.0] // <- this is DB2.DBX2.0 A[AR1, P#0.0] // <- Where is this executed????? thanks!!! Splitted from register indirect addressing. |
Last edited by: O_Moderator at: 4/11/2011 10:32 AMnew subject after splitting |
|
4/12/2011 2:40 AM | |
Posts: 80 Rating: (2) |
thanks hdhosseini, but in my casethe FC hadan input variable and a pointer type Any ideas? |
4/12/2011 4:09 AM | |
Joined: 10/7/2005 Last visit: 11/7/2024 Posts: 3026 Rating: (1057)
|
Hello pici_c
You'll find the answer in the FAQ below: In the case of a function, how is the address of the ANY pointer for the elementary IN, OUT and IN-OUT parameters loaded into the address register AR1?
Its executed in an "Undefined" memory area is the simple answer. It will also probably lead to the call of an error OB as you areattempting to doindirect "area crossing" addressingwithout the declaration of a memory area in the address register and you canfind out more about this in the FAQ collection below: STEP 7 -- Creating S7 programs -- Indirect Addressing I hope this helps |
Cheers |
|
4/12/2011 11:06 AM | |
Posts: 80 Rating: (2) |
Thanks!!! |
2/4/2016 1:18 PM | |
Joined: 9/3/2014 Last visit: 3/13/2019 Posts: 4766 Rating: (122) |
New question published by IZ ALJABRE-JORDAN is split to a separate thread with the subject Difference between two instructions. Best regards |
Follow us on