s5 instructions

LIR will load the content of the memory address in accumulator 1 to the register n

TIR will transfer the contents of he register to the memory address in Acc 1 from the register 0,1,2 etc.

i.e. LIR 1 to the memory pointed to in Acc 1 if my memory serves me right
L kh 0D00
LIR 1
will load the value in memory address KH0D00 into register 1
This is direct read of the plc internal memory & there is no function as far as I know in S7
Chances are these are blocks written by siemens or someone who really knows the system
the memory is split into areas like DB's System data, Fb's Timers Counters so the chances are they are either reading directly a word in a DB that is greater than 255 (you can create DB's longer than 255 words but only read them in normal s5 code upto 255)
They will point to the start of the DB area list, find the start address of say DB10, then create a pointer to a word (1004 for example) & load it into the register
I have seen code that looks at words in a DB, gets the hex code & uses it as a MC5 instruction i.e. 7500 Hex is the MC5 instruction for JU PB so 75A5 = JU PB165
example
get start of DB area
Add offset for word 1
Load word 1 into System Data 0 (75A5)
DO the system data word (DO RS0) = JU PB165

so if you are trying to convert this you will need to understand what is going on
 
The LIR/TIR instructions can be used to access data block values greater than 255 for example, as well as other memory areas (e.g. program blocks ). You will need to post the code stating the CPU involved so it can be assessed.
 

Similar Topics

Hi everyone, I have a series of 8 or 9 subroutines that are not in the main program file (File 2)..they are all consecutively placed in Ladder 11...
Replies
8
Views
400
Hi, We have a machine with 9 servo motors and Kinetix 5100 drives. The controller is L33ER and there is no motion control in the project. The...
Replies
8
Views
1,203
Hello All, New to this forum. I'm reviewing two programs from two different integrators we have used. Both are using Guardlogix 5094-IB16S/A...
Replies
7
Views
1,505
Hi All, I have programmed some MSG instruction in SLC5/05 64k CPU series D FW 13 brand new cpu. 2 of the MSG instructions are direct IP to other...
Replies
3
Views
977
I've uploaded a raw program from an old Hitachi EC-40HARP that is to be replaced by something else. I have to do some reverse engineering as the...
Replies
1
Views
422
Back
Top Bottom