Home AMX User Forum NetLinx Modules & Duet Modules

Adapting duet module workspace to multiple touch panels

Hi,

I have downloaded Cisco C60 duet module to use it in a two room setup with similar equipment. If I am not wrong, the touch panel design and the workspace in the module zip file are coded for controlling multiple devices from one touch panel. How can I adapt it to my needs? I have one master (NI-3150), 2 TP (Modero X), and 2 C60 Codecs.

Thanks,
Sinan

Comments

  • ericmedleyericmedley Posts: 4,177
    More than likely here is some part ofvthe UI code where you select which zone to select and control. Find that and you can either dapt that prt f the code to oly allow one TP to control one zone or whatever.
  • shr00m-dewshr00m-dew Posts: 394
    Clean your keyboard Eric. ;)


    Kevin D.
  • champchamp Posts: 261
    Just define the modules twice, once for each codec; with different device numbers of course.

    The explanation of using multiple ports for multiple codecs in the module interface specification will take longer to figure out than it will to just implement multiple modules completely separated.
  • ericmedleyericmedley Posts: 4,177
    shr00m-dew wrote: »
    Clean your keyboard Eric. ;)


    Kevin D.

    IPad typing... It's got moxie!
  • stopuzstopuz Posts: 15
    champ wrote: »
    Just define the modules twice, once for each codec; with different device numbers of course.

    The explanation of using multiple ports for multiple codecs in the module interface specification will take longer to figure out than it will to just implement multiple modules completely separated.

    Champ,

    I have no problem defining the module twice, but I thought I would not have to duplicate the Components of the module for each codec. Since I am using two separate Touch Panels I cannot figure out how I can use one Component for both of them. It would be very helpful if you could elaborate with a sample.

    Thanks,
    Sinan
  • champchamp Posts: 261
    Oh man, you want an example :(

    I've checked out the method where you only define the Component modules and variables once then change the value of nCiscoC90 to the codec you want to use but this won't allow you to have multiple touch panels controlling different codecs at the same time so is pretty useless.

    As far as I am concerned here is the only way you can use multiple codecs with multiple touch panels:
    Append almost everything with _01, then copy it and replace with _02
    If I were to do this more than once I'd put all the variables into a structure for each codec.
    All buttons on port 1 of each touch panel are for codec 1 and all buttons on port 2 of each touch panel are for codec 2
    PROGRAM_NAME='Cisco 2 codecs'
    
    (***********************************************************)
    DEFINE_DEVICE
    vdvCiscoC90_01 = 41001:1:0  // Codec 01 virtual device
    vdvCiscoC90_02 = 41002:1:0  // Codec 01 virtual device
    
    dvCiscoC90_01 = 5001:1:0 // Actual codec 01
    dvCiscoC90_02 = 5001:2:0 // Actual codec 02
    
    //Tp1
    dvCiscoC90_01_Tp1 = 10001:1:0 // Touch panel 1 - pages for codec 1
    dvCiscoC90_02_Tp1 = 10001:2:0 // Touch panel 1 - pages for codec 2
    //Tp2
    dvCiscoC90_01_Tp2 = 10002:1:0 // Touch panel 2 - pages for codec 1
    dvCiscoC90_02_Tp2 = 10002:2:0 // Touch panel 2 - pages for codec 2
    
    vdvCiscoC90_01_Tp = 33001:1:0 // Codec 01 virtual touch panel
    vdvCiscoC90_02_Tp = 33002:1:0 // Codec 02 virtual touch panel
    
    DEFINE_COMBINE(vdvCiscoC90_01_Tp, dvCiscoC90_01_Tp1, dvCiscoC90_01_Tp2)
    DEFINE_COMBINE(vdvCiscoC90_02_Tp, dvCiscoC90_02_Tp1, dvCiscoC90_02_Tp2)
    (***********************************************************)
    DEFINE_VARIABLE
    
    INTEGER nCiscoC90 = 1 // NEVER CHANGE THIS, this is only used if we were sharing the component modules accross multiple codecs which would not allow us to control multiple codecs simultaneously.
    
    //Codec 1
    DEV vdvDev_01[] = {vdvCiscoC90_01}
    DEV vdvDev4_01[] = {vdvCiscoC90_01} // one device is all that is needed
    
    INTEGER nVideoConferencerPages_01[] = { 1 }
    INTEGER nDialerPages_01[] = { 2 }
    INTEGER nCameraPages_01[] = { 3,4,5 }
    INTEGER nPhonebookPages_01[] = { 6 }
    INTEGER nPowerPages_01[] = { 1 }
    INTEGER nSourceSelectPages_01[] = { 8 }
    INTEGER nVolumePages_01[] = { 9 }
    INTEGER nMenuPages_01[] = { 10,11,12 }
    INTEGER nModulePages_01[] = { 13 }
    
    // Codec 2
    DEV vdvDev_02[] = {vdvCiscoC90_02}
    DEV vdvDev4_02[] = {vdvCiscoC90_02}
    
    INTEGER nVideoConferencerPages_02[] = { 1 }
    INTEGER nDialerPages_02[] = { 2 }
    INTEGER nCameraPages_02[] = { 3,4,5 }
    INTEGER nPhonebookPages_02[] = { 6 }
    INTEGER nPowerPages_02[] = { 1 }
    INTEGER nSourceSelectPages_02[] = { 8 }
    INTEGER nVolumePages_02[] = { 9 }
    INTEGER nMenuPages_02[] = { 10,11,12 }
    INTEGER nModulePages_02[] = { 13 }
    
    (***********************************************************)
    DEFINE_START
    
    // Codec 01 ----------------------------------------------------------
    // DEVICE MODULE GROUPS SHOULD ALL HAVE THE SAME DEVICE NUMBER
    DEFINE_MODULE 'Cisco C90 VideoConferencerComponent' audioconferencer_01(vdvDev_01, vdvCiscoC90_01_Tp, nCiscoC90, nVideoConferencerPages_01)
    DEFINE_MODULE 'Cisco C90 DialerComponent' dialer_01(vdvDev4_01, vdvCiscoC90_01_Tp, nCiscoC90, nDialerPages_01)
    DEFINE_MODULE 'Cisco C90 MenuComponent' menu_01(vdvDev_01, vdvCiscoC90_01_Tp, nCiscoC90, nMenuPages_01)
    DEFINE_MODULE 'Cisco C90 ModuleComponent' module_01(vdvDev_01, vdvCiscoC90_01_Tp, nCiscoC90, nModulePages_01)
    DEFINE_MODULE 'Cisco C90 PhonebookComponent' phonebook_01(vdvDev_01, vdvCiscoC90_01_Tp, nCiscoC90, nPhonebookPages_01)
    DEFINE_MODULE 'Cisco C90 PowerComponent' power_01(vdvDev_01, vdvCiscoC90_01_Tp, nCiscoC90, nPowerPages_01)
    DEFINE_MODULE 'Cisco C90 VolumeComponent' volume_01(vdvDev_01, vdvCiscoC90_01_Tp, nCiscoC90, nVolumePages_01)
    DEFINE_MODULE 'Cisco C90 SourceSelectComponent' sourceselect_01(vdvDev_01, vdvCiscoC90_01_Tp, nCiscoC90, nSourceSelectPages_01)
    DEFINE_MODULE 'Cisco C90 CameraComponent' sourceselect_01(vdvDev_01, vdvCiscoC90_01_Tp, nCiscoC90, nCameraPages_01)
    
    // Define your communications module here like so:
    DEFINE_MODULE 'Cisco_C90_Comm_dr1_0_0' comm_01(vdvCiscoC90_01, dvCiscoC90_01)
    
    
    // Codec 02 ----------------------------------------------------------
    // DEVICE MODULE GROUPS SHOULD ALL HAVE THE SAME DEVICE NUMBER
    DEFINE_MODULE 'Cisco C90 VideoConferencerComponent' audioconferencer_02(vdvDev_02, vdvCiscoC90_02_Tp, nCiscoC90, nVideoConferencerPages_02)
    DEFINE_MODULE 'Cisco C90 DialerComponent' dialer_02(vdvDev4_02, vdvCiscoC90_02_Tp, nCiscoC90, nDialerPages_02)
    DEFINE_MODULE 'Cisco C90 MenuComponent' menu_02(vdvDev_02, vdvCiscoC90_02_Tp, nCiscoC90, nMenuPages_02)
    DEFINE_MODULE 'Cisco C90 ModuleComponent' module_02(vdvDev_02, vdvCiscoC90_02_Tp, nCiscoC90, nModulePages_02)
    DEFINE_MODULE 'Cisco C90 PhonebookComponent' phonebook_02(vdvDev_02, vdvCiscoC90_02_Tp, nCiscoC90, nPhonebookPages_02)
    DEFINE_MODULE 'Cisco C90 PowerComponent' power_02(vdvDev_02, vdvCiscoC90_02_Tp, nCiscoC90, nPowerPages_02)
    DEFINE_MODULE 'Cisco C90 VolumeComponent' volume_02(vdvDev_02, vdvCiscoC90_02_Tp, nCiscoC90, nVolumePages_02)
    DEFINE_MODULE 'Cisco C90 SourceSelectComponent' sourceselect_02(vdvDev_02, vdvCiscoC90_02_Tp, nCiscoC90, nSourceSelectPages_02)
    DEFINE_MODULE 'Cisco C90 CameraComponent' sourceselect_02(vdvDev_02, vdvCiscoC90_02_Tp, nCiscoC90, nCameraPages_02)
    
    // Define your communications module here like so:
    DEFINE_MODULE 'Cisco_C90_Comm_dr1_0_0' comm_02(vdvCiscoC90_02, dvCiscoC90_02)
    
  • stopuzstopuz Posts: 15
    champ wrote: »
    All buttons on port 1 of each touch panel are for codec 1 and all buttons on port 2 of each touch panel are for codec 2
    [/QUOTE]
    
    Champ,
    
    Thank you for your time again. My goal is not to control multiple codecs from multiple TPs, it will be a one-to-one match. One Touch Panel controls only one Codec.
    
    Would your sample take care of that?
    
    I think I just need to make a change in the code block below? What is the purpose of virtual TP devices?
    
    [code]
    DEFINE_COMBINE(vdvCiscoC90_01_Tp, dvCiscoC90_01_Tp1, dvCiscoC90_01_Tp2)
    DEFINE_COMBINE(vdvCiscoC90_02_Tp, dvCiscoC90_02_Tp1, dvCiscoC90_02_Tp2)
    

    Thanks,
    Sinan
  • champchamp Posts: 261
    In that case the original demo works just fine, they don't even implement the multiple codec control functionality in the demo.
    My code will work as well but I'd stick with the original demo.

    I used the DEFINE_COMBINE to allow me to use multiple touch panels with a single module.
    I would normally use an array of touch panels but the Component modules won't allow me to use an array of touch panels so using the virtual touch panel to refer to all touch panels in the module is the solution.

    If that was confusing look up the help file for DEFINE_COMBINE and hopefully that explains it better.
  • stopuzstopuz Posts: 15
    Please let me know if this is getting to be annoying :(

    When I define separate instances of the dialerComponent module for each VTC, I think I still need the "getFeedbackZone" function defined in "ComponentInclude" file to figure out which Line (VTC supports 4 simultaneous lines) is calling???
    define_function integer getFeedbackZone(dev dvIn)
    {
        stack_var integer zone
        for (zone = 1; zone <= LENGTH_ARRAY(vdvDev); zone++)
        {
    	if (vdvDev[zone] == dvIn)
    	{
    	    RETURN zone;
    	    break;
    	}
        }
        RETURN 0;
    }
    

    Do I have to have a Zone Selection button on my TP in that case?

    Thank you for your help and patience.

    Sinan
Sign In or Register to comment.