ADICON Support Forum Applied Digital, Inc.
Page 1 of 1 1
Topic Options
#21616 - 02/05/10 12:42 PM Scenes with IR codes
Ariel Offline
newbie


Registered: 09/12/07
Posts: 23
Loc: Argentina
Hi,

I am programming a scene that includes lights and two devices controlled by IR commands. I have not a SECU16IR module, so I need to control the two devices from the IR ouput on the Leopard. I am going to use two SECU16 relays to select from the software which device the correct IR command must be sent to. The question is, will I need to use timers to introduce delays between IR transmissions to each device? What would be the best way this scene to succeed?

Thanks a lot.

Top
#21617 - 02/05/10 04:45 PM Re: Scenes with IR codes [Re: Ariel]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
You could do that and yes, you would use a timer. If you want to make a IR macro that sends commands to both devices with just one trigger, you need to evaluate how much time is needed to send to the first device and add a bit of extra time before sending IR to the second one because sending a command to switch a SECU16 relay can take from 0.5 to about 1.5 seconds, depending on bus latency, etc. You would code it like this:

IF (triggering event)
THEN Timer #1 = 1 //start the timer
THEN Transmit IR #1 //IR macro for first device
THEN Transmit IR #2

IF Timer #1 becomes > 3 //after a couple of seconds
THEN Module #1 SECU16 Relay #8 Turn ON //turn on relay
THEN Module #1 SECU16 Relay #9 Turn OFF //turn off other relay

IF Timer #1 becomes > 5 //2 seconds after switching relays
THEN Transmit IR #3 //IR macro for second device
THEN Transmit IR #4

IF Timer #1 becomes > 8 //after macro is finished
THEN Module #1 SECU16 Relay #8 Turn OFF //set relays back to default
THEN Module #1 SECU16 Relay #9 Turn ON
THEN Timer #1 = 0 //and stop timer
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#21618 - 02/06/10 07:05 AM Re: Scenes with IR codes [Re: Guy Lavoie]
Ariel Offline
newbie


Registered: 09/12/07
Posts: 23
Loc: Argentina
Guy,

perfect! in the example, you are supposing that at first relay #9 (attached to the 1st device) is turned ON and relay #8 (attached to the 2nd one) is turned OFF, isn't it?

Another question... it would not be necessary to add timers between the transmition of consecutive IR commands to the same device? I mean, a timer just before line "THEN Transmit IR #2" and another timer just before "THEN Transmit IR #4".

Thanks again!

Top
#21619 - 02/06/10 07:15 AM Re: Scenes with IR codes [Re: Ariel]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
Yes, I was presuming that relay #9 was already turn on (and left on as a default).

The timer is only used to give the system time to change relays. If you're sending consecutive IR commands to the same device, then just put them one after the other (like with IR #1,2) and they will be queued for output in the Leopard, and sent one after the other.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
Page 1 of 1 1


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie, Bobkat 
Hop to:
Who's Online
0 registered and 62 anonymous users online.
Recent Posts
Ocelot not working
by JPO
11/08/17 06:02 AM
Shout Box

Newest Members
brigiel, vevevie, zhutree, 416, saiqul
3003 Registered Users
Forum Stats
3003 Members
19 Forums
4004 Topics
23442 Posts

Max Online: 132 @ 11/13/16 10:07 AM
November
Su M Tu W Th F Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30