s5 to s7 conversion

axialpg

Member
Join Date
Mar 2007
Location
uttoxeter
Posts
4
hi all,

i am currently in the process of converting an s5 program to s7 and i have come accross a tir command in the s5 in stl.

does anyone know of an equivalent in s7.

im a bit of a noob to this so please go easy :)

thanks in advance...Mike
 
You need to understand what the TIR instruction is doing in the Step 5 implementation - maybe its moving data around. You can use indirect addressing in Step 7 or the block move sfc.
 
axialpg said:
hi all,

i am currently in the process of converting an s5 program to s7 and i have come accross a tir command in the s5 in stl.

does anyone know of an equivalent in s7.

im a bit of a noob to this so please go easy :)

thanks in advance...Mike
Hi

'Load indirect register'

There is an equivalent in S7 but you cannot convert it ...this part of the software you will have to find out exactly what it does and rewrite the software in S7.Have a look at the type of CPU ( in S5) because some special functions use LIR en TIR , also some communication software ( which you also have to rewrite)

Eric
 
i think that is the problem, because i am so new to plcs, i dont know what the tir command does to be able to convert it or write the equivalent in step 7.


i have searched high and low on here and google to no avail :(

thanks for your response, i will keep looking.
 
aikona said:
Hi

'Load indirect register'

There is an equivalent in S7 but you cannot convert it ...this part of the software you will have to find out exactly what it does and rewrite the software in S7.Have a look at the type of CPU ( in S5) because some special functions use LIR en TIR , also some communication software ( which you also have to rewrite)

Eric

thanks alot, i read somewhere else that indirect addressing can be a problem with converting to s7.

i now have a starting point...thanks:)
 
What is the Step 5 CPU model number - you need to refer to the programming manual for that CPU
 
axialpg said:
i think that is the problem, because i am so new to plcs, i dont know what the tir command does to be able to convert it or write the equivalent in step 7.


i have searched high and low on here and google to no avail :(

thanks for your response, i will keep looking.

Hi

You sure picked the most obscure statements in the whole book

here are some links : forumSiemens and anotherone also try this and search for LIR and TIR

gives use the the few lines of code before and after the lir/tir and then we try to figure it out, also the CPU type

Greetings Eric
 
aikona said:
Hi

'Load indirect register'

Eric

Is of course LIR ;)

TIR is transfer indirect register


one loads a value into the accumulator from an indirect address pointed to by the contents of one of the accumultors, whilst the other transfers data from an accumulator to an address pointed to by one of the accumulators.

If I remember right, they would look like LIR 1, LIR 2 etc. Long time since I played with these.
 
S5-95U to S7-300 (Lir/Tir)

Hi

I've problem about converting two instruction in Simatic S5(95U) to Simatic S7-300. What the Similar Instruction in Simatic S7 for converting TIR and LIR instruction in Simatic S5. Like this:

C DB 181
L KH 7E00
T DW 5
L DW 1
SLW 1
L DW 5
+F
LIR 0
T DW 6
L KF +0
T DW 8

What is the equivalent of this part in S7?
Please help me...

Thanks
Avatar
 
Hi

I've problem about converting two instruction in Simatic S5(95U) to Simatic S7-300. What the Similar Instruction in Simatic S7 for converting TIR and LIR instruction in Simatic S5. Like this:

C DB 181
L KH 7E00
T DW 5
L DW 1
SLW 1
L DW 5
+F
LIR 0
T DW 6
L KF +0
T DW 8

What is the equivalent of this part in S7?
Please help me...

Thanks
Avatar


Code:
C DB 181    //Call DB181
L KH 7E00   //Load offset to DB Address list 
T DW 5      //Store in DW5
L DW 1      //Load DW1
SLW 1       //Double it
L DW 5      //Load DW5 again (unnecessary)
+F          //Add (=(DW1*2)+KH7E00) 
LIR 0       //Load Pointer to DB Start Area (DB number = DW1) value
T DW 6      //Transfer pointer to DW6
L KF +0     
T DW 8      //Transfer 0 into DW8

So obviously this is not the end, maybe this is setting up the start of a block transfer (is there a TNB instruction somewhere) or possibly an indirect offset for single word transfer.

So the word held at absolute memory address KH7E00 is a pointer to the start address of DB0, KH7E02 is the start address of DB1, etc. So whatever number is in DW5 of DB181 is the DB to which this is code is pointing, if DW5 held the value 20, then this bit of code would be setting up a pointer to the start of data of DB20.

To convert this to Step 7, you would need to know -- what happens next?

What you have shown is half the story.
 
It is next instruction :

;
C DB 181 //Call DB181
L KH 7E00 //Load offset to DB Address list >>DB0
T DW 5 //Store in DW5
L DW 1 //Load DW1
SLW 1 //Double it
L DW 5 //Load DW5 again (unnecessary)
+F //Add (=(DW1*2)+KH7E00)
LIR 0 //Load Pointer to DB Start Area (DB number = DW1) value
T DW 6 //Transfer pointer to DW6

L KF +0
T DW 8 //Transfer 0 into DW8... (DB..???)

L DW 4
L KF +0
><F
O(
L DW 1
!=F
)
JC =M001

M001: JU =M004

M004: ***

Thanks for the help :)
avatar
 

Similar Topics

I have a machine which is undergoing upgradation. As part of the process two SEW drives are being replaced., existing Gen B with new Gen C. The...
Replies
3
Views
197
Currently I’m using ESA model VT155W0000 HMI and it’s communicate with Fanuc PLC. Can any one suggest can I convert ESA model to EXOR HMI eSMART07M
Replies
0
Views
88
hi... i have an issue in s7 300 plc, while we run the machine(in idle there is no fault) , plc cpu goes in SF mode, after restart the power cycle...
Replies
2
Views
117
I have a Type C to RS485 adapter connect to my Siemens RWF55. I use modscan to scan it to get a value from the Siemens controller. In the...
Replies
4
Views
102
Hi all, I'm in the process of upgrading a PanelView1200 HMI program to be developed in FactroyTalk View Studio. The filetype for PanelView 1200...
Replies
7
Views
280
Back
Top Bottom