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 !!
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 !!