old s5 converting 95u-cpu

Ricardo Carmo

Member
Join Date
Apr 2017
Location
coimbra
Posts
32
L "MW 180" // Weiterschaltbedingung//register 1
L "MW 140" // alte Schrittnummer uebergeben//register 2
UC "FB 230" // Schrittkette auswerten//pass register 1 and 2

T "MW 140" // neue Schrittnummer uebernehmen//comes out fb 230//goes in fb 229
SET
= "Tag_44" // Keine Aenderung in SK
UC "FB 229"
T "DB 11".D_175 //result from fb 229

i had this code in tia portal 14 you can activate parameters passing via registers and inside the function the first instruction it was a load to a %mw

does any one knows if you pass parameters by registers the fb will recive them?

i altered the funtions to have input and output parameters but i had to change the uc to a call does it chages the way it works??

:p pls help i'm geting headaches
 
OK, for FB230, MW140 is being transferred to "Tag_2" (line 0003)
It is being XOW'ed (Exclusive Or) with MW180 (line 0004) etc...

To follow this, every L (Load) instruction places the value in ACCU1 (accumulator 1), and the value that was in ACCU1 goes to ACCU2. Every T instruction (Transfer) takes the contents of ACCU1 to the memory location (or Tag).

Therefore when entering FB230, MW180 is in ACCU2 and MW140 is in ACCU1.

Line 0001 always jumps to line 0003.

In Line 0003 the contents of ACCU1 (MW140) is transferred to Tag_2

XOW is performed on ACCU1 (MW140) and ACCU2 (MW180), and the result is stored in ACCU1 (line 0004)

The L Tag_2 in line 0005 reads it into ACCU1 and the result of the previous XOW is in ACCU2.

XOW is again executed between Tag_2 and the previous XOW result and the new result is in ACCU1 and then transferred to Tag_19.

Same methodology is applied to FB229. MW140 is being transferred to Tag_2.
The T "DB 11".D_175 will depend on the condition of the AN Tag_x conditions.

Example Line 0002, if AN Tag_6 is false, it will not jump, and a value of 1 is loaded (L 1), and BEU exits the block, and this value of 1 will appear in DB 11".D_175
 
hi again, do you know any form to translate the lir instruction?
in this plc they use

l 6500

lir 0

i have no idea where its supose to go i read the siemens info it dint help much
 
This is a tricky one...

L 6500 - this is loading a value of 6500 into ACCU1.

LIR 0 - Load Register 0 ACCU1-H (bits 16-31) with the contents pointed to by ACCU1 (in this case 6500)

I need to know your original S5 CPU part number, and a printout of the block in which it is being used in order to explain better.
 
NAME: SCHRITTK

JU =M000
NOP 0
M000: T FW 250 ;alte Schrittnummer uebernehmen
XOW
L FW 250 ;schneller Akkutausch
XOW
T FW 252 ;Weiterschaltbedingung uebernehm.
L KH 0000
!=F ;wenn Weiterschaltbed. = 0
JC =M001 ;dann zur Ausgabe
A F 252.0 ;wenn Resetmerker gesetzt
BEC ;dann 0 ausgeben und Ende
L FW 252 ;Weiterschaltbedingung als
T FW 250 ;neuer Schritt uebergeben
S F 250.0 ;Merker Verriegelung SK setzen
AN F 250.0 ;VKE auf Null setzen
M001: L FW 250 ;neue Schrittnummer laden
BEU ;und Ende
AW
L FW 250
OW
TAK
XOW
L KH 6500
LIR 0
JU =M002
L KH 6500
 

Similar Topics

Anyone able to convert an older MER file to open in FatoryTalk View Studio V7 on Win-7 64 bit system? The zipped file is too large to upload to...
Replies
3
Views
2,905
Hi all, I have a couple of projects that I created using Step 7 v5.5. We recently upgraded our software to v11, and I don't have access to the...
Replies
1
Views
1,735
I have a GE 90-30 that has LM90 on it. I dont have LM90 so was wondering if i can convert the LM90 to Cimplicity. Thank You
Replies
6
Views
1,839
This is admittedly a pretty obscure problem, but maybe someone else has run into it, or at least something similar. For reasons I won't get into...
Replies
3
Views
133
Does Rockwell still offer reset codes for old school Master Disk floppy's? In a bind and need to reset the activation disk soon and to be pointed...
Replies
9
Views
230
Back
Top Bottom