uptown47
Lifetime Supporting Member
Hi all,
I'm stuck trying to transfer some S5 software to S7.
The S5 PLC is a 115U 943B and the S7 PLC is a 314C-2DP.
I've copied the code below and my interpretation of it but I have a couple of queries:
1) How can I find out what KH E4CA (and the other hex addresses) refer to? I've been searching this forum and google with this problem and, from what I've read, it seems that L KH E4CA is refering to a 'System address' that is specific to the S5 PLC type ?? Is this correct? Or is it just a value, like loading L 58570 in S7 ?
2) Reading the code it seems that the initial loading of the ACCU 1 is redundant as each section eventually just jumps to M003 which overwrites ACCu 1 with KH E4CA anyway? Or am I missing something here?
Any help on how I can transfer this to S7 would be greatly appreciated.
By the way DB101 (the DB that is opened initially) has 255 words in it and they all just hold arbitary values 250, 80, 25, 10 etc etc
A big thanks for any light you can shed on this.
Cheers
;-)
I'm stuck trying to transfer some S5 software to S7.
The S5 PLC is a 115U 943B and the S7 PLC is a 314C-2DP.
I've copied the code below and my interpretation of it but I have a couple of queries:
1) How can I find out what KH E4CA (and the other hex addresses) refer to? I've been searching this forum and google with this problem and, from what I've read, it seems that L KH E4CA is refering to a 'System address' that is specific to the S5 PLC type ?? Is this correct? Or is it just a value, like loading L 58570 in S7 ?
2) Reading the code it seems that the initial loading of the ACCU 1 is redundant as each section eventually just jumps to M003 which overwrites ACCu 1 with KH E4CA anyway? Or am I missing something here?
Code:
C DB 101 (OPEN DB 101)
AN F 237.2 (WITHOUT F237.2 JUMP TO THE END OF THE BLOCK)
JC =M001
AN F 91.1 (WITHOUT F91.1 JUMP TO M002)
L KH E416 (LOAD ACCU 1 WITH HEX E416)
LIR 0 (LOAD ACCU 1 WITH THE VALUE AT ADDRESS E416)
ADD KF+51 (ADD 51 TO THE VALUE IN ACCU 1 AND STORE IN ACCU 1)
JU =M003 (JUMP TO M003)
M002: AN F 91.2 (WITHOUT F 91.2 JUMP TO M004)
JC =M004
L KH E418 (LOAD ACCU 1 WITH HEX E418)
LIR 0 (LOAD ACCU 1 WITH THE VALUE AT ADDRESS E418)
ADD KF+51 (ADD 51 TO THE VALUE IN ACCU 1 AND STORE IN ACCU 1)
JU =M003
... SAME PATTERN REPEATED BUT WITH DIFFERENT HEX ADDRESSES (E41A / E41C / E41E / E420 / E422 / E424 / E426 / E428 / E42A / E42C)
M003: L KH E4CA (LOAD ACCU 1 WITH HEX E4CA)
LIR 0 (LOAD ACCU 1 WITH THE VALUE AT ADDRESS E4CA)
ADD KF+51 (ADD 51 TO THE VALUE IN ACCU 1)
TNB 50 (DOES THIS SOMEHOW TRANSFER 50 BYTES TO SOMEWHERE???)
M001: BE
Any help on how I can transfer this to S7 would be greatly appreciated.
By the way DB101 (the DB that is opened initially) has 255 words in it and they all just hold arbitary values 250, 80, 25, 10 etc etc
A big thanks for any light you can shed on this.
Cheers
;-)