Have you looked at the implementation I posted to your previous query ?
http://www.plctalk.net/qanda/showthread.php?t=56185&highlight=FC8
Yeah that's definitely a viable option, however I think I am close to getting the original method to work. I noticed on network 3, the program is getting stuck at the divide real function (see in pic). Thats keeping the rest of the rung and the rung below from executing. Here is the latest source code:
FUNCTION FC 28 : VOID
TITLE =
VERSION : 0.1
VAR_TEMP
Return : INT ;
ReadCurrentTime : DATE_AND_TIME ;
Minute_Decimal : REAL ;
Runtime_Real : REAL ;
OEE_Temp : REAL ;
END_VAR
BEGIN
NETWORK
TITLE =
CALL SFC 1 (//Call SFC 1, "Read System Clock"
RET_VAL := #Return,
CDT := #ReadCurrentTime);
//***************************
//Load each byte of #ReadCurrentTime and transfer
//them to data bytes. This wouldn't be
//absolutely necessary, but it's nice to go online
//with the block and see what the current time is.
//Use the Siemens Help to see the "Date and Time"
//format to see why I have to SLW12 and SRW12 on LB7.
//***************************
L LB 2;
BTI ;
T DB501.DBW 0;
L LB 3;
BTI ;
T DB501.DBW 2;
L LB 4;
BTI ;
T DB501.DBW 4;
L LB 5;
BTI ;
T DB501.DBW 6;
L LB 6;
BTI ;
T DB501.DBW 8;
L LB 7;
BTI ;
T DB501.DBW 10;
L LB 8;
BTI ;
T DB501.DBW 12;
L LB 9;
SLW 12;
SRW 12;
T DB501.DBW 14;
//***************************
//Siemens uses the BCD format in the Date And Time,
//so I have to use the BTI instruction to convert
//it to an integer. In this section, I check to see
//if it is 600 hours (6AM) OR 1800 hours (6PM) . If it is not, then I don't jump
//to label "rst", and I end the block.
//***************************
NETWORK
TITLE =
A( ;
A( ;
L DB501.DBW 6;
L 10;
==I ;
) ;
A( ;
L DB501.DBW 8;
L 13;
==I ;
) ;
A( ;
L DB501.DBW 10;
L 30;
==I ;
) ;
O ;
A( ;
L DB501.DBW 6;
L 18;
==I ;
) ;
A( ;
L DB501.DBW 8;
L 0;
==I ;
) ;
A( ;
L DB501.DBW 10;
L 0;
==I ;
) ;
) ;
AN DB501.DBX 16.0;
O ;
AN DB501.DBX 16.0;
A M 2.1;
= M 2.1;
NETWORK
TITLE =
A( ;
A( ;
A( ;
A M 2.1;
JNB _001;
L DB502.DBW 2;
T DB502.DBD 4;
SET ;
SAVE ;
CLR ;
_001: A BR;
) ;
JNB _002;
L DB502.DBW 0;
T DB502.DBD 8;
SET ;
SAVE ;
CLR ;
_002: A BR;
) ;
JNB _003;
L DB502.DBD 4;
L 6.000000e+001;
/R ;
T #Minute_Decimal;
AN OV;
SAVE ;
CLR ;
_003: A BR;
) ;
JNB _004;
L #Minute_Decimal;
L DB502.DBD 8;
+R ;
T #Runtime_Real;
AN OV;
SAVE ;
CLR ;
_004: A BR;
= M 2.2;
NETWORK
TITLE =ResetComplete
A( ;
A( ;
A( ;
A( ;
A( ;
A M 2.2;
JNB _005;
L #Runtime_Real;
L 1.200000e+001;
/R ;
T #OEE_Temp;
AN OV;
SAVE ;
CLR ;
_005: A BR;
) ;
JNB _006;
L #OEE_Temp;
L 1.000000e+002;
*R ;
T DB500.DBD 164;
AN OV;
SAVE ;
CLR ;
_006: A BR;
) ;
JNB _007;
L DB502.DBW 0;
T DB500.DBW 28;
SET ;
SAVE ;
CLR ;
_007: A BR;
) ;
JNB _008;
L DB502.DBW 2;
T DB500.DBW 30;
SET ;
SAVE ;
CLR ;
_008: A BR;
) ;
JNB _009;
L 0;
T DB502.DBW 0;
SET ;
SAVE ;
CLR ;
_009: A BR;
) ;
JNB _00a;
L 0;
T DB502.DBW 2;
SET ;
SAVE ;
CLR ;
_00a: A BR;
= DB501.DBX 16.0;
END_FUNCTION