S7-300 subritune

Join Date
May 2007
Location
giza
Posts
154
Hello every body

I implement fc which count delay time to start motor and another delay to off the motor

this subroutine function not include any timer or counter just adder which increment MW by 1 every second.

I should called this function 32 time for 32 motor into OB1.

But it works for first network and the other 31 not even response

function.jpg
 
A #START
S #SIGNAL
A #STOP
R #SIGNAL
NOP 0

A "1 Sec"
A #SIGNAL
= #L000
FP #MON
JNB _00b
L #On_delay_time
L 1
+I
T #On_delay_time
_00b: NOP 0


L #On_delay_time
L #SeConds_to_on
>=I
S #CMD


A "1 Sec"
AN #SIGNAL
= #L001
FP #MOFF
JNB _00A
L #Off_delay_time
L 1
+I
T #Off_delay_time
_00A: NOP 0


L #Off_delay_time
L #seconds_to_off
>=I
R #CMD
 
I think you should be calling FC timers with the S5TIME data values and not with Memory Words. Also, I would make these changes, save them onto eprom and do a cold restart, then try them.
Also press Ctrl Q on your screen and then paste the logic here.
 
Use an FB instead of a FC.
Then use multi instance calls to the IEC ondelay and offdelay timers (SFB4 and SFB5)
 
You cannot use temp variables in an FC to store data between calls, your FP #MON instruction being a case in point. Use an FB and declare the variable in the STAT section.
 

Similar Topics

Dear All, Currently i'm working with Endress Hauser flowmeter and AB PLC and try to integrate with 2 items. Flow meter spec using is Promass...
Replies
6
Views
192
in allen bradley kinetix 300 drive first E31 error shows after resting drive E11 error occurs need solution to reset E11 fault code
Replies
4
Views
188
Hi, I'm setting up a modbus master on an S7-300. It seems to work in OB1 but not when I use it in OB35. Does anyone have any ideas why? Could...
Replies
10
Views
154
So basically i have 2 queries : 1. I have a program file of S7-300 PLC which i want to migrate in RSLogix500.In short i want to convert my simatic...
Replies
15
Views
328
Back
Top Bottom