TPControl D:P:S

alecgalecg Junior MemberPosts: 30
Can anyone please tell me where to adjust the D:P:S setting for an iPad/TPControl Device?
I have defined the device as 10002:1:0 in NetLinx Studio, but when I push buttons on the device, the output bar shows them as coming in from 10002:1:1!

I don't understand where to set or define the System ID as it relates to the tablet itself.
Is this in TPDeisgn4, TPTransfer, or am I missing something else really obvious?

Comments

  • ericmedleyericmedley Senior Member - 3709 Posts Posts: 4,155
    The zero in your Netlinx studio definition is really a catchall.

    You can read that declaration like this:

    10001(device):01(port):0(whatever system number this code is running on). Your master must be set to system ID 1 and your touch panel is connected to that system. If you intend a different system number you must hard code it as such and also make sure said master is set to that system ID.
  • alecgalecg Junior Member Posts: 30
    Maybe I'm misunderstanding the training videos and Instruction Manual! I was under the impression that if I am building a system with only a single Controller, that single controller would have a system ID of 0 (or more relevantly, I would set the System ID to 0 - which is the Controller Default). Is that not true?

    I guess what I'm really trying to figure out is why the iPad reports (Notifications Tab of the Output Bar in Studio) as 10002:1:1? I never set that Touch Panel's System ID to 1. Can I change it? What if I have multiple iPads, would they all be part of System ID 1? Is that something that TPControl/Transfer does automatically?

    Eric, you mention that if I wanted a different System ID, I would need to hardcode that. I understand how that works in NetLinx Studio, but how do I do that to (set the System ID of) the Touch Panel?
  • vincenvincen Junior Member Posts: 526
    alecg wrote: »
    Maybe I'm misunderstanding the training videos and Instruction Manual! I was under the impression that if I am building a system with only a single Controller, that single controller would have a system ID of 0 (or more relevantly, I would set the System ID to 0 - which is the Controller Default). Is that not true?
    WRONG !!*system ID 0 exists only in program to declare local devices or when you have only one system ! Hardware itself has to be setup with a system ID between 1 and 255 ;)
    alecg wrote: »
    I guess what I'm really trying to figure out is why the iPad reports (Notifications Tab of the Output Bar in Studio) as 10002:1:1? I never set that Touch Panel's System ID to 1. Can I change it? What if I have multiple iPads, would they all be part of System ID 1? Is that something that TPControl/Transfer does automatically?
    Panel doesn't have a system number by itself, it's system number of master he is connected to ! If you have multiple panels/ipads on one system they'll have a different device number each (or you'll get a conflict and serious issues) but all will carry same system number if they are all connected on same master.
  • alecgalecg Junior Member Posts: 30
    vincen wrote: »
    WRONG !!*system ID 0 exists only in program to declare local devices or when you have only one system ! Hardware itself has to be setup with a system ID between 1 and 255 ;)

    I want to believe you, but I'm taking this DIRECTLY FROM THE MANUAL (Netlinx.Language.Reference.Guide.pdf - Page61):

    This keyword defines the devices referenced in the program.
    DEFINE_DEVICE
    TP1 = 128:1:0// device number = 128, port = 1, system = 0
    TP2 = 129:1:0// device number = 129, port = 1, system = 0
    TP3 = 130:1:0// device number = 130, port = 1, system = 0
    VCR1 = 10:1:0 // device number = 10, port = 1, system = 0
    VCR2 = 11:1:0 // device number = 11, port = 1, system = 0
    Devices can be specified by a single device number such as "TP = 128" or as a fullyqualified
    device specification such as "TP = 128:1:0"

    Plus I've pulled upwards of 50 modules that all use 0 as the System ID for both the Processor and the Touch Panel. Are you confusing Port with System ID? I'm referring to the last digit, not the middle one.
    vincen wrote: »
    Panel doesn't have a system number by itself, it's system number of master he is connected to ! If you have multiple panels/ipads on one system they'll have a different device number each (or you'll get a conflict and serious issues) but all will carry same system number if they are all connected on same master.

    I have only 1 Master. By your logic (and I agree!) my panel should have the same System ID as my Master.
    Here is my DEFINE_DEVICE:
    dvSharp = 0:3:0
    dvdSharp = 41001:1:0
    dvTP = 10002:1:0
    dvFrequencyTelnet = 0:4:0

    When I press buttons on the iPad, it shows up as 10002:1:1.
    How does it get that last 1? How do I change it?
  • John NagyJohn Nagy CineTouch Product Manager Posts: 1,501
    When you say the button press "shows up" with a system number 1, where are you looking?
    You must be looking at diagnostic messages from the processor, which is system 1. So it reports the system it is "showing up" at. If the panel had connected to system 2 (as a slave to system 1) and you looked again, you would see the address report SYSTEM 2 as part of the panel address. As such, the SYSTEM NUMBER is a function of the device's CONNECTION TO A MASTER THAT HAS A SYSTEM NUMBER.

    The panels and such do not "have a system number", they make a call to a system. The 0 is a wildcard in programming here such that defined devices can connect regardless of any system they are connected.

    In the panel in AUTO/LISTEN mode, you can tell it what system number you want to connect to (which actually just limits a connection to a matching master), or if you use the URL mode, you'll note that the SYSTEM item in the panel is locked to "0". It will talk to whatever system number the master at the URL happens to have.

    And since your code has not limited the panels to a specific system number in your coded addresses, the panels can talk "from" any system number and their comms will work.

    I believe this scheme is key to understanding the AMX system in general.
  • shr00m-dewshr00m-dew Junior Member Posts: 394
    The system default is 1. In Studio, click on Online-Tree and click Display-Refresh System. You will see SYSTEM 1 (Your controllers IP ADDRESS) at the top. That is your current system number.

    Now go to DIAGNOSTICS - DEVICE ADDRESSING. Check-mark CHANGE SYSTEM, enter System 1, New System 2. Then click change Device/System, then Reboot Master.

    Now when you reboot, your D:P:S with show 10002:1:2.

    Your thought that if you are only dealing with a single controller 0 will work is correct, but like others have said 0=system number I'm connected to. Do the above test to prove it to yourself.

    Or better yet, try to change the System to 0 and it will not let you. Try changing system number 1 to 0 and you will get an error.

    Kevin D.
  • ericmedleyericmedley Senior Member - 3709 Posts Posts: 4,155
    I believe you are confusing two basic concepts due to lack of experience.

    1-the master's System ID is set by you via any number of methods. That system ID is not code dependent. The system ID can be from 1 to 255. It comes out of the box set to 1. Any AMX device connected to that master acquires the system id of that master. Each device can only be connected to one master.

    2- in code the system id zero is just a convenience for you the programmer. It's a shorthand way of creating code that will work on a master set to any system ID. So, for example if your code said

    DEFINE_DEVICE
    dvTP_01. = 10001:01:0

    If you set the system id of your master to 5 - your notifications would say 10001:01:5 because the touch panel is connected to system 5. Without changing he code at all but changing the master system id to 101 - the the exact same TP would send notifications to 10001:01:101.

    Make sense?
  • alecgalecg Junior Member Posts: 30
    Sokath, his eyes uncovered!

    I agree completely that understanding D:P:S is paramount to understanding AMX. This is what I've been trying to wrap my head around in building test systems.

    I also agree that my lack of experience is showing!

    And I completely understand the most recent round of responses. Thank you all for the insight and method.
    I tried shr00m-dew's suggestion and truly that did help me.

    So as I now understand it, if the system ID is 1 (0 being nothing more than a programmer's convenience in dealing with any ONE specific controller) is it best practice to address all of my DEFINE_DEVICE calls to the actual system ID? e.g.
    dvSharp = 0:3:1
    dvdSharp = 41001:1:1
    dvTP = 10001:1:1
    dvDebuggingTelnet = 0:4:1
  • GregGGregG Just some guy... Posts: 249
    alecg wrote: »
    Sokath, his eyes uncovered!
    Bonus geek points for ST:TNG reference!

    My personal preference, and the standard practice here is:

    1) Use system 0 for all devices in single master systems. This eliminates the chance of code not working when replacing a failed master in a single master job.

    2) Always use system 0 for all local virtual devices in a master, even if there are multiple masters. Using a remote master's virtual device for a local module doesn't work well, so this practice eliminates the possibility. Specify the remote system number if the local master's code needs to send things to a virtual on another master.

    3) Always specify the actual system numbers for all physical devices needed in code for multi-master projects. But try not to put every remote device into every master's code if it isn't referenced anywhere in the local code (this help keep down device status traffic between masters).
  • DHawthorneDHawthorne Junior Member Posts: 4,584
    I like to think of device 0 as a this pointer to the master the code is running on.
  • a_riot42a_riot42 AMX Wizard Posts: 1,619
    What happens if you try to change a master's system number to 0? Does it blow up in a self-referential melt-down?
    Paul
  • jeremyw24jeremyw24 Junior Member Posts: 10
    It will not allow you to set 0 as the system number, it must be between 1-255. This is set in the firmware of the device.

    You can try doing this through NXS or Telnet and it will report the device number could not be changed.
  • a_riot42a_riot42 AMX Wizard Posts: 1,619
    jeremyw24 wrote: »
    It will not allow you to set 0 as the system number, it must be between 1-255. This is set in the firmware of the device.

    You can try doing this through NXS or Telnet and it will report the device number could not be changed.

    Darn, I was really hoping for the self-referential melt-down.
    Paul
Sign In or Register to comment.