Question converting S5 to S7

Mr.Eddy

Member
Join Date
May 2013
Location
Limburg
Posts
1
Hello,

I'm fairly new with Siemens PLC and I'm converting a S5-95U to a S7-300 with a 313C CPU.
I have some issues with the conversion.
On the old 95U there was an encoder connected to the onboard counter from the CPU (24v DC COUNTER 5/2kHz INTERRUPT). The incrementel encoder 'detects' the height of the product when the machine is lowered.
You also can change the product height on the controlpanel.
The s5 programm says the following:

FB 66:
NAME: HIGHDETEC
AWL
U(
O A 8.0
O A 8.5
O E 3.5
)
UN M 49.0
R M 27.0
U E 35.0 // if the counter has reached its comparison value, this becomes '1' and OB3 gets triggered. (OB3 stops the machine from lowering any further)
S M 27.0
NOP 0
AWL
ON E 3.5
O M 49.0
O A 8.1
BEB

L DW 44 // I guess this puts the comparison value of the counter in?
T PW 36
U M 0.1
R E 35.0
BE

The value of DW 44 is transferred in FB22:

L KF +3
T DR 14

L KF +1
T MW 102
B DW 41
SLW 0
T MW 102
AWL
U M 72.0
SPB = M001

L KF +1
L DL 6
>< F
SPB =M001

L DW 40
T MW 190

A DB 41
B MW 190
L DW 0
A DB 50
T DW 41

A DB 43
B MW 190
L DW 0
A DB 50
T DW 43

L DW 41
T MW 190

A DB 44
B MW 190
L DW 0
A DB 50
T DW 44
M001:
AWL
UN M 72.0
BEB

L KM 00000000 10000011
T DR 14
AWL
A DB 50
L DW 40
T MW 190

A DB 50
L DW 41
A DB 41
B MW 190
T DW 0

A DB 50
L DW 43
A DB 43
B MW 190
T DW 0
AWL
A DB 50
L DL 6
L KF +10
<F
BEB

A DB 50
L DW 41
T MW 190

L DW 44
A DB 44
B MW 190
T DW 0

BE



I'm planning to use the fast counter (30KHz) of the 313C but I have read that you need to use SFB47 but I have no clue how to programm this in s7.
Hope someone can help ?
Thanks in advance !! ;)
 

Similar Topics

I have a 3-axis sensor that I'm working on integrating with a Micrologic PLC. The sensor has a RS-422 output and I'm using an RTA Automation PLC...
Replies
5
Views
3,256
Hello all! I Have an issue with four new machines that were just installed in our plant. The PLC is a 1769-L32 compact logix. Iam new to 5K. no...
Replies
2
Views
2,237
Hi all I'm currently converting an S5 program to S7. I've come across the following code and I have a few questions that I thought you may be...
Replies
11
Views
3,914
I have a 120V relay, 120V DI card and a analog input. I was wanting to know if i could put a 24V DI and well as a 120V DI card on the same plc...
Replies
1
Views
78
Hello again..trying something on an existing poorly written program and just wanted to double check something system is an A-B MicroLogix 1200 In...
Replies
5
Views
192
Back
Top Bottom