Home AMX User Forum NetLinx Studio

Device Port Tracking

is there a way to track which port on a touch panel is being used? Say if port 4 on a touch panel is being used? ex: 10001:4:0

Comments

  • viningvining Posts: 4,368
    Are you trying to dertmine if a port has been defined for a particular TP or what port on a TP may have triggered the current event?

    In either case you would need to use the embedded object.

    If you're trying to determine if a port has been defined then you would need to use a DATA_EVENT handler since if a port is defined it will generate an online event during start up so you could use that event to set a flag in an array like this:
    DATA_EVENT[dvTPDevicePort]//IP or SERIAL COMMS 
         
         {
         ONLINE:
    	  {
    	  nTP_PortsUsedArry[data.device.port] = 1 ;
    	  //other stuff ;
    	  }
         }
    

    I don't now what you would do with this but I suppose it might have its uses.

    To determine what port initiated an event you could something like this:
    BUTTON_EVENT[dvTPDevicePort,nBtnArry] 
         
         {
         PUSH:
    	  {
    	  nCurrentTP_EventPort = button.input.device.port ;
    	  //stuff
    	  }
         }
    
    

    For level events use "level.input.device.port" & channels events use "channel.device.port".

    What are you trying to do?
  • Joe HebertJoe Hebert Posts: 2,159
    ondrovic wrote: »
    is there a way to track which port on a touch panel is being used? Say if port 4 on a touch panel is being used? ex: 10001:4:0
    You can look at the online tree in Netlinx Studio and each port in use will show up under the device.
Sign In or Register to comment.