CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Tue Dec 18, 2018 3:54 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Aug 17, 2018 5:40 am 
Offline

Joined: Wed Nov 15, 2017 9:15 pm
Posts: 1
Hello,

First time posting. Just had a general question. Wanted to see what ideas i could get for my code.

I have the following issue:
I have a pump that i install on my system with tubing x feet long that pulses out some liquid. When i start up my system i want to run the pump for x seconds to purge out air in the line. This is only done once. This means when i first install my pump, i purge out the air in the line for x seconds and never again even if my system is rebooted (memory retained). How would you guys approach this?

You time and effort is much apprecited

-J


Top
   
PostPosted: Sat Sep 29, 2018 9:57 pm 
Offline

Joined: Wed Apr 22, 2015 1:45 pm
Posts: 15
Hello

I would do somthing like thise

Code:
PROGRAM Tempratur_320_01
VAR
   iINIT_Bac_alarm            : INT;      (*Sends values at startup, one time*)
END_VAR

IF iINIT_Bac_alarm = 0 THEN
(*Enable high og Low i tempfølere*)
ZSK300E_320_001_RT401_PV.Limit_Enable.highLimitEnable      := TRUE;

(*Set alarmtext and type in bacnet variable*)
ZSK300E_320_001_RT401_PV_H_AL.Active_Text             :='Høy alarm';
ZSK300E_320_001_RT401_PV_H_AL.Inactive_Text             :='Ikke alarm';
ZSK300E_320_001_RT401_PV_H_AL.Notify_Type             := Bacnet_alarm;

iINIT_Bac_alarm := +1 ;
END_IF



On the first run iNIT_Bac_alarm variable is 0. And the IF sentence is true.
It goes true what should be set and last sets the iNIT_Bac_alarm variable to +1. Then it would not be true before it's set to 0 the next time it's reset.

Hope it helps

Espen


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: Ties22 and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited