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

gents, I am trying to configure communication with EMERSON PK300 controller through port A1 using generic ethernet communication module . I could...
Replies
0
Views
29
Dear sir, I am using SIMATIC 300, CPU 315-2DP , (6ES7 315-2AF03-0AB0) VIPA 603-1CC21 A1.0 RAM 32KB, Firmware=V4.0.8 The problem Im using MPI...
Replies
1
Views
71
Hello. I have a few machines that use Kinetix 300 (each machine has two drives). Both drives on one of the machine keep losing IP address. They...
Replies
2
Views
75
Folks, I have a client with an old ABB Advant / MOD300 system (v14.4). Around y2k I installed the ABB Industrial IT MOD300 OPC Server 1.1/2...
Replies
0
Views
68
Hi, I received this SIMATIC S7-300 training kit for maintenance. When I power it up, the PLC doesn't go to RUN mode and the STOP mode led is...
Replies
7
Views
261
Back
Top Bottom