S7-300 subritune

Join Date
May 2007
Location
giza
Posts
153
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

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
9
Views
58
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
13
Views
117
Hi i using Kinetik 300 2097 driver control by EIP with using move absolute and incremental for motion , but i want to add same driver and motor as...
Replies
0
Views
56
Hey all, first time poster here. I am wondering if anyone has tried using a Keyence SR-X300 barcode scanner to a Micrologix 1400. Keyence sent...
Replies
0
Views
48
Hi Siemens guys! I am experiencing SF fault on our S7-300 (6ES7 315-2AH14-0AB0) CPU from time to time. I've checked the diagnostic buffer and...
Replies
13
Views
184
Back
Top Bottom