Home AMX User Forum AMX Technical Discussion

Using module on multiple ports

I have 2 Tandberg precision HD 1080 cams, i was hoping to be able to use the duet module for these cameras, however the module doesnt support daisy chain.

Is there a way to define a module on 2 physical and 2 virtual devices?

// UI module
DEFINE_MODULE 'TANDBERG_PrecisionHD' CameraUI(vdvDev, dvTP, menuButtons)
// Duet comm module
DEFINE_MODULE 'TANDBERG_PrecisionHD_dr1_0_0' Camera1(vdvDev, dvTandberg_PHD)

Comments

  • DHawthorneDHawthorne Posts: 4,584
    Yes, you can have as many modules as memory and performance will allow ... just change the instance name to make them unique. Depending how the module is built, you will probably have to create duplicate pages on anther port, but it's doable.
  • a_riot42a_riot42 Posts: 1,624
    DHawthorne wrote: »
    just change the instance name to make them unique.

    I don't think Netlinx uses module names in any way does it? I thought they were for the programmer's benefit.
    Paul
  • FYI

    i never got i to work, ive tried all sorts of combinations with multiple copies of the same file, defining the modules with different names, hopefully someone will release a visca compatible version on this module in the future, for now ill just do it manually.
  • Spire_JeffSpire_Jeff Posts: 1,917
    Did you try contacting Tandberg directly? I went through a programming class with a couple of people from Tandberg and it sounded like their job was mainly focused on developing modules for AMX (and other companies) that allow Tandberg integration. They were really interested in providing complete modules and making it easy to integrate. In the least, it might be worth an email to their support department.

    Jeff
  • DHawthorneDHawthorne Posts: 4,584
    a_riot42 wrote: »
    I don't think Netlinx uses module names in any way does it? I thought they were for the programmer's benefit.
    Paul

    It does. Internally, the instance name is added to every variable, named wait, subroutine, etc., so multiple modules won't collide with each other. It's not something you can see in any way, but the master does it under the hood. I'm sure that explanation is somewhat simplified, but that is how I heard it from an AMX person ... not sure if it was at training or tech support, but it's not just a guess.
  • Joe HebertJoe Hebert Posts: 2,159
    DHawthorne wrote: »
    It does. Internally, the instance name is added to every variable, named wait, subroutine, etc., so multiple modules won't collide with each other. It's not something you can see in any way, but the master does it under the hood. I'm sure that explanation is somewhat simplified, but that is how I heard it from an AMX person ... not sure if it was at training or tech support, but it's not just a guess.
    Right, AMX told me the same thing. It’s called name mangling.
    a_riot42 wrote: »
    I thought they were for the programmer's benefit.
    What benefit would that be? I’ve always considered it completely useless from a programmer standpoint.
  • a_riot42a_riot42 Posts: 1,624
    DHawthorne wrote: »
    It does. Internally, the instance name is added to every variable, named wait, subroutine, etc., so multiple modules won't collide with each other. It's not something you can see in any way, but the master does it under the hood. I'm sure that explanation is somewhat simplified, but that is how I heard it from an AMX person ... not sure if it was at training or tech support, but it's not just a guess.

    Interesting. I have seen the same module definition copied and pasted multiple times with the same module name with no issues so I didn't think it mattered at all. When I have a minute to spare I will test it and see what happens.
    Joe Hebert wrote: »
    What benefit would that be? I’ve always considered it completely useless from a programmer standpoint.

    Just to make sure you aren't missing any module definitions? Not sure really.
    Paul
  • Joe HebertJoe Hebert Posts: 2,159
    a_riot42 wrote: »
    Interesting. I have seen the same module definition copied and pasted multiple times with the same module name with no issues so I didn't think it mattered at all.
    I’ve accidently done that myself and didn’t notice any repercussions but I changed the instance names just in case.

    There was a time when there were issues if you had multiple instances of the same module but didn’t group them together as TN527 discusses. I was told that isn’t a problem anymore but I group them together anyway as another just in case.

    And then you have this note in the Netlinx help file about modules inside modules:
    Technically, modules can contain declarations to other modules, provided that no circular references are involved. However, because different instances of the same module must not be separated by instances of a different module, it is highly recommended that you do not declare modules from within other modules if you have multiple declarations of the parent module they will then be separated by the declarations of the child module.

    And lastly, I’ve had several problems when defining duet modules and by just changing the order of the defines the duet modules would work or not work. That one really scares me.
Sign In or Register to comment.