ADICON Support Forum Applied Digital, Inc.
Page 1 of 1 1
Topic Options
#2886 - 02/04/03 01:13 PM Tv channels from Ocelot
S Harrison Offline
newbie


Registered: 02/03/03
Posts: 9
Loc: Marin county, Ca
Hello folks, This is my first posting, and I apologize in advance about my lack of knowledge on this subject.
I am trying to get Ocelot to turn a TV to channel 33. I send a learned IR signal (Channel 3) twice. (through a Xantech system) It seems to work 25% of the time. Would adding a pause help? Is that done through a timer- if so how? Thank you very much for any help

Top
#2887 - 02/04/03 01:27 PM Re: Tv channels from Ocelot
John Warner Offline
old hand
*****

Registered: 01/09/03
Posts: 834
Loc: Port Perry, Ontario, Canada
I set my Sony VCR to channel 11 that way and it works 100% of the time for me. Here's the code:

[CODE]IF X10 C/2 ON Command C2 On?
AND TimeOfDay > 1859 After 7:00 PM?
THEN X10 Quick On C/1 Pseudo C1 On
THEN Xmit Local IR29 Receiver On
THEN Xmit Local IR31 TV On
THEN Xmit Local IR35 VCR On
THEN Xmit Local IR11 Send a 1
THEN Xmit Local IR11 Send another 1
THEN Xmit Local IR20 Send Enter
THEN Xmit Local IR20 Again to be sure [/CODE]As you can see, no pauses.

Also though, no Xantech (I use a Powermid as an IR blaster though) and Sony requires an "Enter" so may be less timing critical?

Top
#2888 - 02/04/03 03:26 PM Re: Tv channels from Ocelot
Yan Avery Offline
junior


Registered: 01/12/03
Posts: 47
Loc: Montreal
I think you are experiencing the same problem I am.

The Ocelot seems to be having a hard time
recognizing some of the I/R codes.

It has no problem sending I/R. This is Why
John Warner's code works. Because he uses X10
to trigger the Ocelot rather than I/R.

I wish people would post their I/R codes in the
I/R forum, indicating which ones are used as
INPUT rather then just plain OUTPUT, because this
seems to be where the problem is.

Is there a general rule of thumb to figure out
which I/R codes to use as input?

Thanks to everyone for posting their working
I/R input codes. I'll go and post the few I have
right away. These work 100% of the time, so if
you have a pronto you can use them. Check in the
I/R files forum ...

Good luck!

Top
#2889 - 02/04/03 03:37 PM Re: Tv channels from Ocelot
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
The original poster did not say anything about how he commanded his controller to send out the two "3"s so I don't think we can assume it's with an IR command. Have you tried sending the digits seperately (by using the C-Max "controller access" utilities to send each digit manually? If it becomes reliable when you do it that way then yes, maybe a delay is needed, but I would be quite surprised if that were necessary. To add a delay you would need to use a timer in a fashion like this (pseudo code):

If command to select channel 33
Then send the first "3"
Then Timer #1 = 1 //start the timer
If Timer #1 becomes >2
Then send the second "3"
Then Timer #1 = 0 //stop the timer
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#2890 - 02/04/03 04:08 PM Re: Tv channels from Ocelot
S Harrison Offline
newbie


Registered: 02/03/03
Posts: 9
Loc: Marin county, Ca
Actually, this is how my code reads (sorry about the format, as I say, I'm new to this)
I'm also amazed at the number and speed of the replies!
Thanks!

IF Receive X10, C - 9 // Camaera-1
THEN Ocelot, Zone 0 IR# 3 // MasterBed TV to channel 3(33)
THEN Ocelot, Zone 0 IR# 3 // MasterBed TV to channel 3(33)
THEN Ocelot, Zone 0 IR# 14 // Radio Shack selector-1
THEN Ocelot, Zone 0 IR# 12 // MasterBed TV mute
THEN X-10 House C / Unit 1, Turn ON // Camera #1 on

Top
#2891 - 02/04/03 04:22 PM Re: Tv channels from Ocelot
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
Does the last C/1 on command always get executed ok? Do you sometimes only see one of the two "3"s getting received by the TV ?
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#2892 - 02/04/03 04:26 PM Re: Tv channels from Ocelot
John Warner Offline
old hand
*****

Registered: 01/09/03
Posts: 834
Loc: Port Perry, Ontario, Canada
Yan:

Is there a reason why you can't learn your own input IR codes? They don't even have to be for devices you actually own. Just pick a common manufacturer (Sony works well), set up a universal remote to send Sony codes and teach them to your Ocelot?

You can then use these learned codes to trigger the actual IR output codes you need?

btw - my IR works fine even when triggered by IR inputs. This code works 100% of the time as well:

[CODE]IF Receive IR10 0?
OR Receive IR11 or 1
OR Receive IR12 or 2
OR Receive IR13 or 3
OR Receive IR14 or 4
OR Receive IR15 or 5
OR Receive IR16 or 6
OR Receive IR17 or 7
OR Receive IR18 or 8
OR Receive IR19 or 9
THEN Xmit Local IR20 Send Enter
THEN Xmit Local IR20 Again to be sure
*
IF Receive IR4 8-in-one VCR Power On/Off
THEN Xmit Local IR1 A/V On/Off
THEN Xmit Local IR2 TV On/Off
[/CODE]

Top
#2893 - 02/05/03 08:20 AM Re: Tv channels from Ocelot
S Harrison Offline
newbie


Registered: 02/03/03
Posts: 9
Loc: Marin county, Ca
Guy,
yes the last C/1 on command always get executed, but 75% of the time only one of the two "3"s gets received by the TV. That's why I thought maybe a pause would help. I tried one second, but it seems too long and the TV 'forgets' the first "3". Is there way to send fractions of a second?
Thanks again for everyones input.

Top
#2894 - 02/05/03 09:10 AM Re: Tv channels from Ocelot
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
The only way to get fractions of a second is to use a variable as a "timer" by creating a loop counter to create a delay. The time spent on each loop is dependant on the number of lines in your program but at least it will be quite consistent once you find the right value. Here is the program I suggested modified to use variable #99 as a loop counter

If variable #99 > 0 //if "timer" is started
Then variable #99 +1 //keep it incrementing on evey loop

If command to select channel 33
Then send the first "3"
Then variable #99 = 1 //start the "timer"
If variable #99 becomes >4
Then send the second "3"
Then variable #99 = 0 //stop the "timer"

You can then experiment with the "becomes >" value until it's just right. Start by making it too high, like 8 or so to see how slow that is and then keep reducing it until it works reliably.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#2895 - 02/05/03 10:42 AM Re: Tv channels from Ocelot
S Harrison Offline
newbie


Registered: 02/03/03
Posts: 9
Loc: Marin county, Ca
Guy:
Thank you, I will try that tonight, if my kids will let me have a moment alone.
I'm not sure I understand the concept of 'variables'. I wonder if you could explain them in a nutshell and how you apply them in the Ocelot.
(sorry about so many requests for information, but I think iI may be getting very interested in this whole automation business!)

Top
#2896 - 02/05/03 10:59 AM Re: Tv channels from Ocelot
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
It's not really possible to give a detailed explanation of variables in just a couple of paragraphs... but they are used pretty well like variables in any other programming language; to hold data that you can then do math with, count things, reference things like which output to activate, which IR code to transmit, etc.

In my example above, the first two lines make variable #99 act like a timer; if it's greater then zero then it will increment every time those two instructions are executed. Since the program is constantly looping at a pretty steady rate, the variable will count up essentially once per pass, that's why I referred to it as a pass counter. When the first "3" is sent to your TV, I have the program set the variable to 1 to start counting. When the count exceeds 4 four passes later, then the second "3" is sent to your TV and the variable is set to 0 to make it stop counting passes until the next time it's used.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#2897 - 02/07/03 06:38 AM Re: Tv channels from Ocelot
S Harrison Offline
newbie


Registered: 02/03/03
Posts: 9
Loc: Marin county, Ca
Adding the pause with the timer seems to have solved the problem.
Guy, could you also explain what you meant by
"Have you tried sending the digits seperately (by using the C-Max "controller access" utilities to send each digit manually?"
Thanks again

Top
#2898 - 02/07/03 06:47 AM Re: Tv channels from Ocelot
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
From the main C-Max screen: Comms --> Attach to Controller This brings you to the controller access screen that you see when you're downloading your program or using certain utilities. Then click on Infra Red --> Transmit Infra Red Command. You'll get a small window where you can enter the code number you want to send and then click on Transmit IR to send it. Make sure you don't accidently click on Clear IR Location which would erase the command...
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#2899 - 02/07/03 07:05 AM Re: Tv channels from Ocelot
S Harrison Offline
newbie


Registered: 02/03/03
Posts: 9
Loc: Marin county, Ca
Thanks, I understand now
Top
Page 1 of 1 1


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie 
Hop to:
Who's Online
0 registered and 56 anonymous users online.
Recent Posts
Comms Retry Error
by HDTVPete
09/18/17 04:04 PM
Cmax Message: Failed to set data for a 'delay'
by HDTVPete
09/16/17 04:36 PM
Shout Box

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

Max Online: 132 @ 11/13/16 10:07 AM
September
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