Crimson 3

monkeyhead89

Member
Join Date
Jun 2014
Location
Cardiff
Posts
5
Hi there,

I need to record a value at a specific time of day, for arguments sake say 9am and then record the value at the end of the day too.


What is the best way to go about this?


Ive been playing around with Ontick but I cant get my head around only logging this value between specific times it instead continually logs the value every second so I need some way of breaking out of this and only log once for a given time.
 
You can write a program that you call with OnTick or write a script directly in the Complex Code to check the time and do a compare to set a bit for logging.

GetHour(GetNow()) - will give you the current hour;
 
In the tick if I do the following:

if(GetHour(GetNow()) == 9){

dosomething();


}

For every second of the 9th hour it will it call dosomthing() repeatedly? As I only need it do it once?
Or am I over thinking this
 
In the tick if I do the following:

if(GetHour(GetNow()) == 9){

dosomething();


}

For every second of the 9th hour it will it call dosomthing() repeatedly? As I only need it do it once?
Or am I over thinking this

I need to pull some counts around 6:45 each day so I created the tag:
GetHour(GetNow())==6 && GetMin(GetNow())==43

I then use that to trigger a log to pull the data.

Dave
 
How about this slight modification to call it just once during the 9:00 AM hour (and reset for the next 9:00 AM the rest of the time):

if(GetHour(GetNow()) == 9){

if( GotItTag == 0 ) {
dosomething();
GotItTag = 1;
}

} else {
GotItTag = 0;
}
 
Last edited:

Similar Topics

Hey guys, hoping someone here could give me a little advice. I'm working with a CR1000-04000 in Crimson 3.1 and I was interested in adding the...
Replies
4
Views
119
Hi, I'm having an issue in crimson 3.0 when I create a programme using a case statement referencing a fault word that each bit needs to change the...
Replies
4
Views
193
How do you install update on Red Lion Crimson ver 3.1. Do I just need to run the exe file on the host server?
Replies
1
Views
107
Has anyone found a way to convert/replace/update the firmware on old Parker TS80xx series HMIs (i.e. TS8010, TS8006, etc) to accept Crimson...
Replies
0
Views
91
Has anyone setup communications with Red Lion 3.0 MODBUS to Baker Hughes Centrilift GCS VFD? Thanks
Replies
0
Views
89
Back
Top Bottom