1/26/2017 10:27 AM | |
Joined: 7/9/2015 Last visit: 4/19/2024 Posts: 3809 Rating: (554) |
Hi, I just checked the LAR1 instruction -> this can only used in STL. Please check page 29 in the following link. SIMATIC S7-1200 / S7-1500 Comparison list for programming languages based on the international mnemonicsI can also give you a Getting Started for SCL - please check this: https://support.industry.siemens.com/cs/de/de/view/18735131 Regards, Towome |
|
|
1/26/2017 2:28 PM | |
Joined: 12/9/2010 Last visit: 10/8/2022 Posts: 623 Rating: (76) |
Hi drozerce, Ur task can be solved even without comparing array bits. But see how it can be done. Define i as integer and use FOR loop FOR i = 0 to 15 By 1 Do If BitArr[i] = 1 Then #Stopconditions_active := 1; Endif; End_for; |
If you like the comment, rate it (right top) or thank it (left bottom). |
|
This contribution was helpful to1 thankful Users |
1/26/2017 3:16 PM | |
Posts: 5225 Rating: (1185) |
SOMEWHAT OFF TOPIC
Not sure - drozerce was probably talking of Step7 Classic. smiffy - you do not have to deselect the code block from optimized.
|
1/27/2017 10:45 AM | |
Joined: 9/23/2005 Last visit: 4/19/2024 Posts: 4519 Rating: (698) |
The SCL for S7-300/400 supports AT overlay. Manual. Chapter: 8.4. |
Regards, |
|
This contribution was helpful to1 thankful Users |
1/27/2017 5:34 PM | |
Joined: 12/9/2010 Last visit: 10/8/2022 Posts: 623 Rating: (76) |
Hi drozerce, U can also write:- For i:=1 to 16 by 1 do if ( #stopconditions[i] AND NOT #stopactive) then #stopactive:=1; End_if; End_for; U can test logic by changing if conditions. Hope this helps!!!!!!!!!!!! As u defined array of 16 bits, u don't need AT instruction. AT instruction allows u to visualize and manipulate the variable by different datatype. |
Last edited by: Sachinpatke at: 1/28/2017 7:46:34 AMIf you like the comment, rate it (right top) or thank it (left bottom). |
|
This contribution was helpful to1 thankful Users |
3/10/2017 1:05 PM | |
Joined: 6/3/2009 Last visit: 9/14/2022 Posts: 118 Rating: (2) |
Hi, I'm I wrong or not, but I think that DWORD has 32 bits, not 64. WORD=2BYTES DWORD=4BYTES BYTE=8 bits |
3/10/2017 2:22 PM | |
Joined: 6/3/2009 Last visit: 9/14/2022 Posts: 118 Rating: (2) |
So, anyone to have a solution for my problem? Thanks |
Follow us on