Home AMX User Forum NetLinx Studio
Options

Channels?

Hi all

I have a modlue for DENON DVD3910 (from AMX site)

I was trying to sent buttons ON/OFF with no success, then after I remarked this code everything is working. I asked about this code before and didn't undestand what its doing...


DEFINE_PROGRAM

// DEVICE ONLINE
[dvTP, nCHAN_BTN[DEVICE_ONLINE_BTN]] = [vdvDEVICE, DEVICE_COMMUNICATING]

// DATA INITAILIZED
[dvTP, nCHAN_BTN[DATA_INITIALZIED_BTN]] = [vdvDEVICE, DATA_INITIALIZED]

// POWER FEEDBACK
[dvTP, nCHAN_BTN[POWER_ON_BTN]] = [vdvDEVICE, POWER_FB] // DISCRETE POWER ON
[dvTP, nCHAN_BTN[POWER_OFF_BTN]] = ![vdvDEVICE, POWER_FB] // DISCRETE POWER OFF

// DISC TRANSPORT FEEDBACK
[dvTP,nCHAN_BTN[STOP_BTN]] = [vdvDEVICE,STOP_FB]
[dvTP,nCHAN_BTN[PLAY_BTN]] = [vdvDEVICE,PLAY_FB]
[dvTP,nCHAN_BTN[PAUSE_BTN]] = [vdvDEVICE,PAUSE_FB]
[dvTP,nCHAN_BTN[SLOW_FWD_BTN]] = [vdvDEVICE,SLOW_FWD_FB]
[dvTP,nCHAN_BTN[SLOW_REV_BTN]] = [vdvDEVICE,SLOW_REV_FB]
[dvTP,nCHAN_BTN[SCAN_FWD_BTN]] = [vdvDEVICE,SFWD_FB]
[dvTP,nCHAN_BTN[SCAN_REV_BTN]] = [vdvDEVICE,SREV_FB]


Also I found out the the STOP_FB and all the rest of the XXX_FB are constants that defined in the 'SNAPI.axi' file.

can someone please explain me what this code is doing?

thanks

Ady.

Comments

  • Options
    mpullinmpullin Posts: 949
    This code runs in the DEFINE_PROGRAM section (or as I like to refer to it, the idle process). It will run every tick whenever some other event is not taking place. These blocks all take channels on your touchpanel and turn them on/off depending on the value of channels on the virtual device for your DVD player.

    Feedback is all this is, this code has no effect on whether or not your DVD will turn on or off or do anything else.
  • Options
    adysadys Posts: 395
    mpullin wrote:
    This code runs in the DEFINE_PROGRAM section (or as I like to refer to it, the idle process). It will run every tick whenever some other event is not taking place. These blocks all take channels on your touchpanel and turn them on/off depending on the value of channels on the virtual device for your DVD player.

    Feedback is all this is, this code has no effect on whether or not your DVD will turn on or off or do anything else.

    thanks but this is a fact
    I checked it again, when unremarking this code, the ON OFF state on a PLAY_BTN buttons don't work and its the only change from working to non working code...

    *****Maybe I didn't explain my self so good, its the ON OFF state of the PLAY_BTN that its not working, not the command. the command is ok.

    looks like this code create a channel maaping?
  • Options
    mpullinmpullin Posts: 949
    adys wrote:
    thanks but this is a fact
    I checked it again, when unremarking this code, the ON OFF state on a PLAY_BTN buttons don't work and its the only change from working to non working code...

    *****Maybe I didn't explain my self so good, its the ON OFF state of the PLAY_BTN that its not working, not the command. the command is ok.

    looks like this code create a channel maaping?

    Like I said, the statements in DEFINE_PROGRAM control feedback. I thought you were saying that the DVD player didn't work (note, I'm defining 'work' as the device doing what it is supposed to do when given appropriate commands) with the DEFINE_PROGRAM section gone, which would make no sense. But the code
    // POWER FEEDBACK
    [dvTP, nCHAN_BTN[POWER_ON_BTN]] = [vdvDEVICE, POWER_FB] // DISCRETE POWER ON
    [dvTP, nCHAN_BTN[POWER_OFF_BTN]] = ![vdvDEVICE, POWER_FB] // DISCRETE POWER OFF
    
    turns your touchpanel channel nCHAN_BTN[POWER_ON_BTN] on or off depending on the value of the channel POWER_FB on your virtual device. So in that sense yes it does create a channel mapping.
  • Options
    adysadys Posts: 395
    mpullin wrote:
    Like I said, the statements in DEFINE_PROGRAM control feedback. I thought you were saying that the DVD player didn't work (note, I'm defining 'work' as the device doing what it is supposed to do when given appropriate commands) with the DEFINE_PROGRAM section gone, which would make no sense. But the code
    // POWER FEEDBACK
    [dvTP, nCHAN_BTN[POWER_ON_BTN]] = [vdvDEVICE, POWER_FB] // DISCRETE POWER ON
    [dvTP, nCHAN_BTN[POWER_OFF_BTN]] = ![vdvDEVICE, POWER_FB] // DISCRETE POWER OFF
    
    turns your touchpanel channel nCHAN_BTN[POWER_ON_BTN] on or off depending on the value of the channel POWER_FB on your virtual device. So in that sense yes it does create a channel mapping.

    I see, thanks.

    What is this 'SNAPI.axi' include file? its in the AMX Share directory.
    this constant is coming from this file.
  • Options
    viningvining Posts: 4,368
    adys wrote:
    What is this 'SNAPI.axi' include file? its in the AMX Share directory.
    this constant is coming from this file.

    Those constants are defined in the UI module DEFINE_CONSTANT section for that DVD player.

    These file contain constants for all the devices that I think Dave was reffering to. Basically include files of numerous DEFINE_CONSTANT sections, one for each type of device.
    C:\Program Files\Common Files\AMXShare\AXIs\G4API.axi
    C:\Program Files\Common Files\AMXShare\AXIs\SNAPI.axi
    __________________

    VAV

    It's just an include file of constants used by modules that adhere to the AMX module standards so that values that are typical across a broad range of equipment can use these global constants with out dupications.
Sign In or Register to comment.