Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CD Timer Query
#1
I have set a count down timer for example to 1 minute or 60 seconds and I have a trigger event:
EventFldEquals
Field: DevTimer.InvokeCmd
Comp Value: 0


this is to turn power off on the DevSimulator.
(Should I be specifying the timer channel in this field?(DevTimer.InvokeCmd):-?

I also have 'Send an event if this expression is true' set for IsEqual to 0 to notifiy of timer hitting 0.

Now it does work - very well indeed. However, is there a reason why sometimes it may execute say 62 seconds after being set, other times it may execute after 70 seconds after being set. I can watch the driver count down in the driver fields so it is starting on time etc. It just seems to delay so many seconds after the timer hits zero to execute the triggered action.

I have no problem with this at all. I'm thinking its probably the trade off for the stability of the system, the driver being ready etc. However its something I'd like to be aware of if im setting things up on a tight schedule.

Or maybe I'm doing something wrong!?

cheers Rob
Reply
#2
You don't want the trigger on the InvokeCmd field. That's purely for sending commands to the driver. You want the trigger on the countdown timer field and you want the event filter on the event server side looking at that also. So take the trigger off the InvokeCmd field and put it on whichever timer field you are using for the countdown.
Dean Roddey
Explorans limites defectum
Reply
#3
Dean,

I've tried this and was sure I had the issue. Power remains on for ~ 70 seconds (10 seconds after timer stops) This is my current setup

Command Button

Devices::FieldWrite(DevTimerDriver.InvokeCmd, ResetCD 1 Seconds 60, True)
Devices::TimedFldChange(DevSim.Power, True, False, 1)

Edit Event Screen

Event Fld Equals Field: DevTimerDriver.CDTimer1
Comp Value: 0


In the field browser I have the CDTimer1 field of DevTimerDriver set to send an event if the expression IsEqual to 0

I know Im doing something silly here!:-(

Thanks for the patience,

Rob
Reply
#4
What are you trying to do here with these two statements. I'm not sure what you are wanting to happen, so I'm not sure what's going wrong. If you have a triggered event on the first countdown timer, what is it doing? It shouldn't be doing anything to the DevSim.Power field, since you've already set up a timed field chagne to do somethign to it a minute from now.

brathnach Wrote:Devices::FieldWrite(DevTimerDriver.InvokeCmd, ResetCD 1 Seconds 60, True)
Devices::TimedFldChange(DevSim.Power, True, False, 1)

Keepin mind that the timed field change is not terribly accurate. It can be some amount of time before or after the actual period of time. It's not really for doing accurate stuff, but for things like turning sprinklers on for five minutes or lights on for 10 minutes or stuff like that, where being five or ten seconds either way isn't going to matter. So that may be what you are seeing.
Dean Roddey
Explorans limites defectum
Reply
#5
Sorry dean,

Instead of the TimeFldWrite I thought I had a just the write statement.

i.e. it should have been

Devices::FieldWrite(DevTimerDriver.InvokeCmd, ResetCD 1 Seconds 60, True)
Devices::FieldWrite(DevSim.Power, True, False, 1)



and then

Edit Event Screen

Event Fld Equals Field: DevTimerDriver.CDTimer1
Comp Value: 0

Actions:

Devices::FieldWrite(DevSim.Power, False, False, 1)


In the field browser I have the CDTimer1 field of DevTimerDriver set to send an event if the expression IsEqual to 0

The timer is running for me but the power doesnt get triggered off for some reason. Is my syntax/procedure correct?

Not intending to be plaguing you here dean, (even if i am!Smile ) just the timing aspect is a huge aspect of my installation.

thanks again,

rob
Reply
#6
The problem, it appears to me, is that you are doing the same thing two different ways. The timed field write is turning on the power and will turn it back off in a minute. Then you are also start a timer and using a triggered event to turn off the same field in a minute.

So I'm not understand why you are doing both those things. You could either do the timed field write, in which case it will be turned off later for you. Or you could do the timer and triggered even to do it. But you don't need to do both.

Also, keep in mind that if anything writes to the field while a timed field write is pending, the timed write will be cancelled since it's assumed that the explicitly written value has overridden the timed one.
Dean Roddey
Explorans limites defectum
Reply
#7
Dean,

I don't have any Timed Field Write on it now.

this is it:

Quote:Devices::FieldWrite(DevTimerDriver.InvokeCmd, ResetCD 1 Seconds 60, True)
Devices::FieldWrite(DevSim.Power, True, False, 1)

I know it initially looked like I was doing it two different ways but now as I see it;

Set CDTimer1 to 60 seconds
Set DevSim.Power True
CDTimer passes this event to events when it hits 0
Events checks that the field value is 0
Action: Set DevSim.Power False

Is this the correct way to go about such a request?

cheers

Rob
Reply
#8
Oops, sorry, I missed the change in the subsequent one. But anyway, yeh, that would be a reasonable way to go about it. It's not going to be like on the second accurate or anything, but it should work. Though it looks like you have an extra parameter on the second field write. I assume it's just a typo. BTW, you can copy and paste the commands to save trying to type them out. If you paste them into a text editor type window, you'll get the text version.

Assuming you have set a trigger on the first countdown timer field to go off when it hits zero, that should work.
Dean Roddey
Explorans limites defectum
Reply
#9
Is there a timer that offers on the second timing accuracy?

I know it would probably be resource heavy but the setup I'm going with a couple of seconds either way could cause the schedule to fail (between a mix of serial and IR components etc)

thanks again!
Reply
#10
brathnach Wrote:Is there a timer that offers on the second timing accuracy?

I know it would probably be resource heavy but the setup I'm going with a couple of seconds either way could cause the schedule to fail (between a mix of serial and IR components etc)

thanks again!

Not really. It's not really a real time type of product. The timer channel itself would be within a a couple seconds, but there's an accumulation of delays as the trigger propogates to the event server and gets processed, then before it get's picked up and processed. So it could always be a worst case scenario, where it can be delayed a fair bit.

What are you trying to do exactly? Maybe there's some other way to do it.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  event and subsequent countdown timer question dogman 9 5,053 05-03-2018, 06:36 PM
Last Post: dogman
  Sonos Favourites Query NightLight 17 13,501 03-30-2017, 07:15 PM
Last Post: DaveB
  Countdown Timer with Elk Zone Stipe 3 2,281 09-28-2015, 02:59 PM
Last Post: Dean Roddey
  Displaying countdown timer in clock format (not hex) ControlFreak 2 2,251 04-11-2013, 02:13 PM
Last Post: Dean Roddey
  Integra driver "Actively query" option? kcl 3 2,270 05-31-2012, 08:31 AM
Last Post: Mark Stega
  Timer eded9698 15 5,249 05-16-2009, 03:39 PM
Last Post: Dean Roddey
  countdown timer help bbienvenu 6 2,935 11-06-2007, 02:10 PM
Last Post: Dean Roddey
  Media Repo query Rolecgroup 7 2,536 12-20-2006, 09:58 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)