STL Help again!!

S5 since 1988 and S7 since 1998.


Pre-88 I was a 100% AB guy (y)


Should note I work on a contract (freelance) basis and use different PLC's, recently mainly S7 and Modicon.
 
FUNCTION "3rd test" : VOID
TITLE =VERSION : 0.1
VAR_INPUT
Timeout : INT ;
Alarm_DB : WORD ;
DB_Alarm_Range_Start : DWORD ;
END_VAR
VAR_IN_OUT
Fault_Timer : INT ;
Index_Value : INT ;
Index_History : INT ;
END_VAR
VAR_TEMP
Temp_DB_Original : WORD ;
Temp_DB_Alarm : WORD ;
Temp_TL_Index_No : DWORD ;
Temp_Alarm_Offset : DWORD ;
END_VAR
BEGIN
NETWORK
TITLE =
L #Alarm_DB; // DB for Alarm generation
T #Temp_DB_Alarm;
OPN DB [#Temp_DB_Alarm];
L #DB_Alarm_Range_Start;
SLD 3; //byte offset 40.0
T #Temp_Alarm_Offset; // Total Offset
LAR2
NETWORK
TITLE =
L #Index_Value;
L #Index_History;
==I ;
JC TOUT;
L L#0;
T #Fault_Timer;
T DBD[AR2, P#0.0];
T DBD[AR2, P#4.0];
T DBD[AR2, P#8.0];
T DBD[AR2, P#12.0];
T DBD[AR2, P#16.0];
NETWORK
TITLE =Generate Time//
TOUT: L #Fault_Timer;
L #Timeout;
>=I ;
JC ALM; // Increment the timer
L #Fault_Timer;
INC 1;
T #Fault_Timer;
JU NW5;
NETWORK
TITLE =Timeout time exceeded
ALM: L #Temp_Alarm_Offset;
L #Index_Value;
+D ;
T #Temp_Alarm_Offset; // Total Offset
SET;
S DBX [#Temp_Alarm_Offset]; // Write Alarm Bit
NETWORK
TITLE =Prepare ready for next call // Update History
NW5: L #Index_Value;
T #Index_History;
END_FUNCTION

With alarm clearing. Writen in haste, may be with bugs. Check it.
 
I seen. But for traceability may be better to use 1 alarm message at moment. For example, system waits for sensor 2, after that for sensor 5, then more for sensor 2. If alarm 2 wasn't cleared, operator cann't see all waitings.
 
I felt AB PLC5's were better than S5, but feel S7 is better than Control Logix.


A lot of the draw backs, especially comms, have been sorted with S7
 
Quantums and Momentums, did a little with concept but mainly proworx. [Concept - uuugh orrible orrible thing. Nice ideas but awfully put together.]

Over a year now since I used them though. I don't answer many questions on modicon as I dont posses the software anymore, it belonged to the client.
 

Similar Topics

Hi, I need to create a FC/FB to sort through DB error messages and prioritise them in the order of Importance. the values generated(x5)...
Replies
15
Views
4,513
Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
321
Hi! I am working on a project were we will be replacing an 300 CPU with a 1500 CPU and we are working on migrating / converting code. There is a...
Replies
9
Views
1,079
Hello everyone, friends. I asked a similar question before, and you helped, but I'm very weak in STL and I'm having trouble learning it. What I...
Replies
2
Views
742
i hope you could help me to convert the network Stl to lad it's apart from program of machine and i try to find solution for the reason of error...
Replies
10
Views
1,934
Back
Top Bottom