Motorola DCT6200 Sending 3 Digit Channels
davegrov
Posts: 114
I am trying to send 3 digit channels (i.e. 363) to a DCT6200 and the box is only receiving the last two digits (63). I am using a numric keypad with 21 as the enter. I've the XCHM set to 1 with a CTON of 10. I've tried XCMH at 0 also. Same problem
Anybody else have the same problem?
DATA_EVENT[dvCable]
{
ONLINE:
{
SEND_COMMAND dvCable, "'SET MODE IR'"
//SEND_COMMAND dvCable, "'CARON'"
SEND_COMMAND dvCable,"'CTOF',6"
SEND_COMMAND dvCable,"'XCHM-1'"
}
}
BUTTON_EVENT[dvTP_CABLE,10]
BUTTON_EVENT[dvTP_CABLE,11]
BUTTON_EVENT[dvTP_CABLE,12]
BUTTON_EVENT[dvTP_CABLE,13]
BUTTON_EVENT[dvTP_CABLE,14]
BUTTON_EVENT[dvTP_CABLE,15]
BUTTON_EVENT[dvTP_CABLE,16]
BUTTON_EVENT[dvTP_CABLE,17]
BUTTON_EVENT[dvTP_CABLE,18]
BUTTON_EVENT[dvTP_CABLE,19]
BUTTON_EVENT[dvTP_CABLE,20]
BUTTON_EVENT[dvTP_CABLE,21]
{
PUSH:
{
LOCAL_VAR INTEGER TRACK
LOCAL_VAR INTEGER alpha
IF(BUTTON.INPUT.CHANNEL<20)
{
SWITCH(TRACK)
{
CASE 0:
{
alpha=2
nCBLCHNUM = BUTTON.INPUT.CHANNEL%10
SEND_COMMAND dvTP_CABLE,"'^TXT-1,0,',ITOA(nCBLCHNUM)"
TRACK ++
}
CASE 1:
{
nCBLCHNUM = (nCBLCHNUM*10) + (BUTTON.INPUT.CHANNEL%10)
SEND_COMMAND dvTP_CABLE,"'^TXT-1,0,',ITOA(nCBLCHNUM)"
TRACK ++
}
CASE 2:
{
nCBLCHNUM = (nCBLCHNUM*10) + (BUTTON.INPUT.CHANNEL%10)
SEND_COMMAND dvTP_CABLE,"'^TXT-1,0,',ITOA(nCBLCHNUM)"
TRACK ++
}
} }
ELSE
{
SELECT
{
ACTIVE (BUTTON.INPUT.CHANNEL==21):
{
SET_PULSE_TIME (10)
SEND_COMMAND dvCable, "'XCH',ITOA(nCBLCHNUM)"
SET_PULSE_TIME (5)
}
}
nCBLCHNUM = 0
SEND_COMMAND dvTP_CABLE, "'^TXT-1,0,'"
TRACK = 0
}
}
}
Anybody else have the same problem?
DATA_EVENT[dvCable]
{
ONLINE:
{
SEND_COMMAND dvCable, "'SET MODE IR'"
//SEND_COMMAND dvCable, "'CARON'"
SEND_COMMAND dvCable,"'CTOF',6"
SEND_COMMAND dvCable,"'XCHM-1'"
}
}
BUTTON_EVENT[dvTP_CABLE,10]
BUTTON_EVENT[dvTP_CABLE,11]
BUTTON_EVENT[dvTP_CABLE,12]
BUTTON_EVENT[dvTP_CABLE,13]
BUTTON_EVENT[dvTP_CABLE,14]
BUTTON_EVENT[dvTP_CABLE,15]
BUTTON_EVENT[dvTP_CABLE,16]
BUTTON_EVENT[dvTP_CABLE,17]
BUTTON_EVENT[dvTP_CABLE,18]
BUTTON_EVENT[dvTP_CABLE,19]
BUTTON_EVENT[dvTP_CABLE,20]
BUTTON_EVENT[dvTP_CABLE,21]
{
PUSH:
{
LOCAL_VAR INTEGER TRACK
LOCAL_VAR INTEGER alpha
IF(BUTTON.INPUT.CHANNEL<20)
{
SWITCH(TRACK)
{
CASE 0:
{
alpha=2
nCBLCHNUM = BUTTON.INPUT.CHANNEL%10
SEND_COMMAND dvTP_CABLE,"'^TXT-1,0,',ITOA(nCBLCHNUM)"
TRACK ++
}
CASE 1:
{
nCBLCHNUM = (nCBLCHNUM*10) + (BUTTON.INPUT.CHANNEL%10)
SEND_COMMAND dvTP_CABLE,"'^TXT-1,0,',ITOA(nCBLCHNUM)"
TRACK ++
}
CASE 2:
{
nCBLCHNUM = (nCBLCHNUM*10) + (BUTTON.INPUT.CHANNEL%10)
SEND_COMMAND dvTP_CABLE,"'^TXT-1,0,',ITOA(nCBLCHNUM)"
TRACK ++
}
} }
ELSE
{
SELECT
{
ACTIVE (BUTTON.INPUT.CHANNEL==21):
{
SET_PULSE_TIME (10)
SEND_COMMAND dvCable, "'XCH',ITOA(nCBLCHNUM)"
SET_PULSE_TIME (5)
}
}
nCBLCHNUM = 0
SEND_COMMAND dvTP_CABLE, "'^TXT-1,0,'"
TRACK = 0
}
}
}
0
Comments
Check out the thread listed beow and its use of the 'SP' command which is best suited for sending a single IR code. For pushing numeric buttons for direct channel selection it's best to issue the IR as each button is pushed just like the real remote. If you're trying to display a channel on a TP to store as a preset or to display on a TP and then pushing "select" or "Go To Channel" button then XCH would be fine but I think most folks here would still use the "SP" command as illustrated in the link.
http://amxforums.com/showthread.php?t=125&highlight=sending+ir
This piece of code lets me enter a know channel such, 363 (NBC Station HD) in a text box and then send the value of the text box to the Cable Box. When I enter 363 it enters the text box and when it goes to the Cable box it looses its first digit.
If I were writing this and using XCH I would get rid of all the math and do it like this:
I would also add a button to clear the text field w/o actually selecting the channel and maybe a back button. But I would only do this for preset entries while for direct channel changing I'd do a single digit at a time just like a remote control.
When command was used without the space the first number wasn't being sent out, or 0 was being sent in it's place.
--John
After reading AMX PI and looking at the instructions I realized I needed the space. ("XCH ,") I made the changes but still no luck. I searched the Forum and found John's previous post and got it working. Thank You both. Looks like there are still some IR firmware issues.
The SPACE worked also. Thank You both very much.