I am working with a Siemens S5 115U 944 program. I have several questions, but probably the most frustrating so far is the following code. I have a tight deadline so any help would be greatly appreciated.
Question #1:
I have researched this code for awhile and can not get a handle on what is going on here. I tried to include what I believe it is, but probably way off base.
L KH E4C8 (is this pointing to DB100??, if so, pointing to what in DB100?)
LIR 0 (Load value at location E4C8 into ACCUM1)
ADD KF127 (Add 127 to ACCUM1)
T FW250 (Move ACCUM1 value to FW250)
ADD KF16 (Add 16 to ACCUM1 = E4C8's value + 127 + 16)
T FW252 (Move ACCUM1 into FW252)
ADD KF240 (Add 240 to ACCUM1)
T FW254 (Move ACCUM1 value to FW254)
L KH EF7F (Source Addr. --Process Image?? Discrete I/O?? address)
L FW250 (Dest. Addr. -- FW186-> FW250 or FW122->FW250 ??)
TNB 128 (XFER 128 bytes)
L FW252 (Source Addr. ??)
L KH EE0F (Dest. Addr. -- FY15 -> FY31)
TNB 16 (XFER 16 bytes)
L KH EFFF (Src Addr. - FY128 -> FY255)
L FW254 (Dest. Addr. - FW190 -> FW254 ???)
TNB 128 (Xfer 128 bytes)
L KH E4CA (Src Addr. - DB101 ??)
LIR 0 (Load E4CA's value into ACCUM1)
ADD KF255 (Add 255 to ACCUM1)
T FW250 (Move ACCUM1 value to FW250)
L KH EEFF (Src Addr. - FY0 -> FY255?? What is the diff. than just above??)
L FW250 (Dest. Addr. - FW123-FW250 ??)
TNB 255
***
Question #2:
Is F200.0 & FY200 & FW200 referencing the same location in memory (i.e. if it were legal in S5 world, could it be said that F200.0 = FY200.0 = FW200.0), where the 1st item is referencing a bit in the lower byte of a memory location, 2nd item is referencing the lower 8 bits of the same location, and the last is referencing 2 consecutive bytes, one byte being the same as FY200?
Any help would be greatly appreciated.
Thanks
Question #1:
I have researched this code for awhile and can not get a handle on what is going on here. I tried to include what I believe it is, but probably way off base.
L KH E4C8 (is this pointing to DB100??, if so, pointing to what in DB100?)
LIR 0 (Load value at location E4C8 into ACCUM1)
ADD KF127 (Add 127 to ACCUM1)
T FW250 (Move ACCUM1 value to FW250)
ADD KF16 (Add 16 to ACCUM1 = E4C8's value + 127 + 16)
T FW252 (Move ACCUM1 into FW252)
ADD KF240 (Add 240 to ACCUM1)
T FW254 (Move ACCUM1 value to FW254)
L KH EF7F (Source Addr. --Process Image?? Discrete I/O?? address)
L FW250 (Dest. Addr. -- FW186-> FW250 or FW122->FW250 ??)
TNB 128 (XFER 128 bytes)
L FW252 (Source Addr. ??)
L KH EE0F (Dest. Addr. -- FY15 -> FY31)
TNB 16 (XFER 16 bytes)
L KH EFFF (Src Addr. - FY128 -> FY255)
L FW254 (Dest. Addr. - FW190 -> FW254 ???)
TNB 128 (Xfer 128 bytes)
L KH E4CA (Src Addr. - DB101 ??)
LIR 0 (Load E4CA's value into ACCUM1)
ADD KF255 (Add 255 to ACCUM1)
T FW250 (Move ACCUM1 value to FW250)
L KH EEFF (Src Addr. - FY0 -> FY255?? What is the diff. than just above??)
L FW250 (Dest. Addr. - FW123-FW250 ??)
TNB 255
***
Question #2:
Is F200.0 & FY200 & FW200 referencing the same location in memory (i.e. if it were legal in S5 world, could it be said that F200.0 = FY200.0 = FW200.0), where the 1st item is referencing a bit in the lower byte of a memory location, 2nd item is referencing the lower 8 bits of the same location, and the last is referencing 2 consecutive bytes, one byte being the same as FY200?
Any help would be greatly appreciated.
Thanks