Hi Everyone,
I'm trying to get to grips with siemens Statement List, basically im trying to display the contents of Memory bits M300.0(Step 0) to M305.7(Step 47)in DB or Memory Byte to display on a Simatic HMI. So when say m300.1 is displayed 1 is entered in the Storage Byte etc, as the current step active.
This is the current Code in the controller which seperates each Byte and increments it every Positive edge of the signal (Once energised it is latched Until end of Sequence.
What i was thinking was something along these lines using the Loop Instruction along with this Code:
Ive tried various Instructions, But im getting anywhere fast, Does anyone have any suggestions on achieving this?
Any help or critique would be gladly recieved
Thanks
I'm trying to get to grips with siemens Statement List, basically im trying to display the contents of Memory bits M300.0(Step 0) to M305.7(Step 47)in DB or Memory Byte to display on a Simatic HMI. So when say m300.1 is displayed 1 is entered in the Storage Byte etc, as the current step active.
This is the current Code in the controller which seperates each Byte and increments it every Positive edge of the signal (Once energised it is latched Until end of Sequence.
A(
A M 300.0 //Step 0
FP M 10.0
O(
A M 300.1 //Step 1
FP M 10.1
)
O(
A M 300.2 //Step 2
FP M 10.2
)
O(
A M 300.3 //Step 3
FP M 10.3
)
O(
A M 300.4 //step 4
FP M 10.4
)
O(
A M 300.5 //Step 5
FP M 10.5
)
O(
A M 300.6 //Step 6
FP M 10.6
)
O(
A M 300.7 //Step 7
FP M 10.7
)
)
JNB M001
L MW 120
L 1
+I
T MW 120
M001: NOP 0
What i was thinking was something along these lines using the Loop Instruction along with this Code:
L 5
TOP:T #LOOP_COUNT //Temp Byte
SLW 3 //Enter Byte Area
LAR1 //Load into Address Register 1
L MB[AR1,P#300.0] //Range MB305 -> MB300
// Im Stuck Here??????
//
L #LOOP_COUNT
LOOP TOP // -1 until 0 Reached
Ive tried various Instructions, But im getting anywhere fast, Does anyone have any suggestions on achieving this?
Any help or critique would be gladly recieved
Thanks