Alarm journal table update data every 20 seconds now() command

hi guys please help me, i want to update my alarm journal table every 20 seconds. the now(20000) commands is not working. Is there other way to solve this? thanks! when there’s new alarm it always show up on alarm journal after 1 second.

Edit, different method coming

I want a alarm journal that updates every 20 seconds at once, example theres new alarm at 9:15:10 and another new alarm at 9:15:15 on 9:15:20 the both alarm will show on my alarm journal.
i’ll try this 1, thanks!

Yeah I edited my post while you were typing, let me get back to you…

So you want it to update 3 times a minute, no more (or less)?

Yeah, but it depends if there’s new active alarm poped.

So if in a given minute there are no new alarms, don’t refresh at all?

i tried this command, but it didnt work. i guess i want to refresh the alarm journal every 20 second even without new alarm. is that possible?

What if there are 10 alarms every 2 seconds in that 20 second window?

they will show simultaneously at the 20 second mark. example if they’re active at 9:15:02, 9:15:04,9:15:06 and etc. on 9:15:20 they will show on alarm journal.

OK; so the pseudo code is:

If seconds == 00 or 20 or 40:
   Refresh the alarm journal table

i see, if it works and do refresh the alarm journal every 20 seconds im fine with that. So how do i write the script? can you give me an idea buddy? thanks!

Try this;

im getting this error. \

Is your system V7.9 or 8.0?

It’s not select from group_table in 7.9… do you have multiple databases?

its 8.0, i only have 1

OK. At the top of this window is says ignition79, that means 7.9. Please select Ignition80 for future threads on 8.0

I only have one 8.0 instance. I will have to get back to you later.

okay thanks for all the help buddy.

Try this expression for EndDate:

toDate(dateFormat(now(), 'yyyy-MM-dd HH:mm:' + toStr(toInt(floor(getSecond(now())/20)*20))))
2 Likes