Assistance with a basic ST function

techkarlsson

Member
Join Date
Jun 2013
Location
Stockholm
Posts
2
I'm currently working on a centralized water system in an industry and I figured this could be a good moment to practise some ST with arrays.

The system consist of 7 refillvalves which opens on command from a level sensor. A flow sensor confirms the function of the valves.
What I'm trying to write with ST is a function that triggers an alarm if one valve is commanded open and another flow sensor also senses flow. The output needs to be an array of all 7 valves/sensors in order to reduce troubleshooting time.

Summary: During refilling of one water tank two (or more) flow sensors registers flow, a fault (valve specific alarm) will be sent and the system shuts down.

Please ask if I've missed out some important parts...
 
for valvenumber 1 to 7;
if level(valvenumber) = low then valve(valvenumber):= open
else valve(valvenumber):=close;
end_if

for flowsensornumber 1 to 7;
if flowsensor(flowsensornumber)<> valvenumber do
if flowsensor(sensornumber)= flowing then alarmtrigger on.
end_if
end_if
end_for
end_for

here comes the alarmtrigger and reset



something like this?
i know you write in codesys so fill in the extra tokens.
 

Similar Topics

Hi, I am looking for a website to learn C++ and visual basic. Does anybody have a suggestion? Thanks.
Replies
5
Views
3,222
The idea here is to provide for a brief rapid influx of message codes while preventing sequentially repeating the same message. i.e. if two...
Replies
23
Views
674
Hi All, This is my first PowerFlex 755 drive setup and I am having an issue with when I start the drive it runs at my minimum speed 5Hz, but...
Replies
10
Views
420
We're upgrading an old PLC-2 system programmed in ICOM. We have the files, the PLC logic is in a .LAD format. Does anyone have working...
Replies
4
Views
422
I am a complete newbie to this stuff and wanted to try this out and was looking for any information on how I can complete this by Wednesday...
Replies
19
Views
12,731
Back
Top Bottom