Problems converting S5 -> S7

R

Thread Starter

Rivaldo

I have a lot of problems converting LIR instrucction S5 for example::

LOOP :L MB 224
:SLW 1
:L KH E400
:+F
:LIR 0
:L KF +0
:!=F
:SPB =NEXT
:B MW 223
:A DB 0
:L DW 10
:T MW 244
:B MW 243

i need heeeeeeeeeeeeelp !!!!!!!!!

:)

thanks
 
D

Daniel Chartier

Hello, Rivaldo;
Sorry, I don't think anyone can help you here: LIR/TIR are non-convertible instructions of the S5 system. Here is an exerpt of Siemens' S5 to S7 conversion manual:

<<4-3
From S5 to S7, Converter Manual
A5E00069887-01

Which Parts of Your Program
Should be Reprogrammed in S 7?

In general, not all the parts of a program can be converted. Considering the following points will help you decide whether to convert your S5 program or to recreate it in S7.
_ Programs only containing digital and binary logic operations do not need to be revised.
_ Absolute addresses cannot be addressed in S7. The corresponding instructions (such as LIR, TIR, etc.) are not converted. If a program frequently works with absolute addresses, it is a good idea to rewrite these parts of the program or, if necessary, the entire program.
_ Processing functions (such as DO FW, DO DW) are partially converted; however, in this case you can save memory by reprogramming the functions in S7. This functionality can be obtained with indirect addressing.
_ The parameter values of block calls must be always be checked and adapted since the actual parameters used are transferred during conversion
without being changed.>>

If there are many such instances of LIR in your program and you have a corresponding solution in S7, you should consider writing a Macro in the converter so that all instances opf LIR are translated to your instructions. See the converter manual and online help for more details.

Hope this helps,
Daniel Chartier
 
D

Donald Pittendrigh

<P>Hi All</P>

<P>The below code is used for indirectly indexing different data blocks.</P>

<P>If you use the S7 as an S7 and not an S5, you will find working with datablocks is a whole lot easier and I suggest you consult the S7 programming instructions and the Tips and tricks section on the Siemens website to discover how this should be done using S7 and pointer addressing.</P>

<P>Please do not denigrate the S7 by reducing it to processing S5 code, it is capable of so much more and in an incomparably user friendly way. Try out the new features in S7 before you decide how much to rely on the old S5 code and you will find the type of programming below turns into something everyone can understand.</P>

<P>Cheers<BR>
Donald Pittendrigh</P>

<PRE>
> > LOOP :L MB 224
> > :SLW 1
> > :L KH E400
> > :+F
> > :LIR 0
> > :L KF +0
> > :!=F
> > :SPB =NEXT
> > :B MW 223
> > :A DB 0
> > :L DW 10
> > :T MW 244
> > :B MW 243
> >
</PRE>
 
Hi Daniel,

i know that lir instruction is no convertible.
:)
the problem was that i d'ont now what make this
instruction at this program .But i discovered the problem and the solution.
;)

the program's bit that i show you see
cycle by cycle if are o are not(lkf+0 !=F) DBX (E400h) is the head direction of db's areas in memory.
ok?
excuse me but i d'ont write very good english.

thank you
 
Top