Home AMX User Forum NetLinx Studio

Sending digital channel numbers to AQUOS displays?

Trying to send a few digital cable channels to aquos displays. API states digital cable channel commands are either "DC2U***-" (upper half) and "DC2L***-" (lower half) for 2-part numbers, -or- "DC10****" or "DC11****" for one-part numbers (below or above 10000 respectively).

On the remote, I select the channel numbers by entering values like 81.1, 83.11, 87.13, etc. But I have yet to find any serial command to the displays that responds with anything besides ERR.

Anyone know the trick to this?

Comments

  • matt95gsrmatt95gsr Posts: 165
    It's been a couple of months since I worked on this, but here's a code snippet out of what I ended up with:
    send_string dvMdlMonitor,"'DC2U',PadWithZeros(3,ITOA(nMajorChan)),' ',$0D"
    send_string dvMdlMonitor,"'DC2L',PadWithZeros(3,ITOA(nMinorChan)),' ',$0D"
    

    So, it looks like what I ended up having to do was "'DC2U081 ',$0D", followed by "'DC2L011 ',$0D" for your 81.11 example. I don't remember having that trailing space, but it's in there so I'll assume it's needed because I know the system works. Could be that's the issue for you? Also, I remember there was a bit of weirdness, like if there wasn't anything on 81.1, it wouldn't go to 81.2, plus it did rearrange some of the channels (based on the MPEG channel tagging or whatever, I guess). Long story short, the above code is what I found to work after a bit of frustration and testing.
  • matt95gsr wrote: »
    send_string dvMdlMonitor,"'DC2U',PadWithZeros(3,ITOA(nMajorChan)),' ',$0D"
    send_string dvMdlMonitor,"'DC2L',PadWithZeros(3,ITOA(nMinorChan)),' ',$0D"
    

    That looks exactly right according to the API, trailing space and all. You say this works, so I'll assume I'm just experiencing my own little bit of weirdness (Aquos are good for that :-) or, even more likely, my own stupid mistake. I'm sure I'll get it working tomorrow.

    Thanks!
  • The "'DC2U',chan[disp_id].major,' ',$0D" and "'DC2L',chan[disp_id].minor,' ',$0D" worked perfectly when I re-tried them. Not sure why it didn't work the first time. Oh wait, yeah I do - stupidity.

    Thanks!
  • TurnipTruckTurnipTruck Posts: 1,485
    Rather than padding with zeros, you can use the FORMAT command which will send a defined number of decimal places as ASCII representations of an integer value as configured in the example below.
    SEND_STRING dvDevice, "FORMAT('%03d',nValue)"
    

    In the above example, if nValue=5, the device will see '005'
    If nValue is worth 202, the device will see '202'
  • Rather than padding with zeros, you can use the FORMAT command which will send a defined number of decimal places as ASCII representations of an integer value as configured in the example below.
    SEND_STRING dvDevice, "FORMAT('%03d',nValue)"
    

    In the above example, if nValue=5, the device will see '005'
    If nValue is worth 202, the device will see '202'

    Wow! Totally forgot about that - thank you for reminding me. Leave it to me to reinvent the wheel from time to time. I'm sometimes amazed at the things I can forget.... Now, if I can remember to use that next time I need it that would be great.
  • ondrovicondrovic Posts: 217
    Will this work doing something like this:
    Send_Command dvDevice,"'CP',FORMAT('%03d',nValue)"
    
    

    TIA
Sign In or Register to comment.