Home AMX User Forum NetLinx Studio

DEVICE_ID List

Does anyone have an updated device id list. The one in PI was last updated "Last Modified Date:
10/25/07" and I'm looking for the ID's of the following new devices:
NXD-500i
NXD-435P
NXD-435
NXD-430

NXV-300

MVP-5200i
MVP-5150
MVP-5100

ENV-VST-C
I'm trying to keep my function that determines feedback up to date and make sure it will still work as written with the new devices but I can't find this info anywhere.

Comments

  • jjamesjjames Posts: 2,908
    Per the online version of AMX-PI
    NXD-500i = 331

    MVP-5200i = 329
    MVP-5150 = 329
    MVP-5100 = 329

    ENV-VST-C = $E5


    Not listed yet
    NXD-435P
    NXD-435
    NXD-430
    NXV-300

    I'd be interested in these as well if you find them.
  • ColzieColzie Posts: 470
    I'm ready to learn ... how are you using the DEVICE_IDs? What types of things are you doing based off of the panel type?
  • jjamesjjames Posts: 2,908
    Colzie wrote: »
    I'm ready to learn ... how are you using the DEVICE_IDs? What types of things are you doing based off of the panel type?

    One example would be sending certain page flips to certain devices. The way I have my R4s managed and the way I have my TPs managed are very different. In my R4s, I only have pages - no popups. This let's me flip quickly (and not rely on the processor) between pages within the source. In my TPs, the majority of the "pages" are actually popups.

    In my page flip function, I determine whether i need to send an @PPN or a PAGE command. I consider the R4 a "TP" (of sorts), so it's in my dv_TP array. I don't have separate code for them (except when it comes to page flipping.)

    If you look at the iPort UI module from AMX (kudos to Jon Parker), you will see he determines whether he can send a level to the device (if it's an R4 by default you cannot - but I do anyway.) He also checks to see if it's a G3 panel for legacy commands.

    Just a few basic examples, I'm sure vining has some better ideas than me; I don't use it very often to be honest. I just compare to make sure it's NOT an R4. DEVICE_ID_STRING could be helpful too.
  • viningvining Posts: 4,368
    Thanks jjames. I didn't know it was available online. I did a search of technotes but found nothing.

    Colzie, again based on how it was used in the iPort module I've modified it and use it like this, I'm currently re-wroking it so pardon the mess.
    DEFINE_CONSTANT //UI TYPES (Unknown=1, KP=2, R4=3, G3=4, G4=5) 
    
    #DEFINE UI_TYPE_CONSTANTS
    
    UI_TYPE_UNKNOWN                = 1 ;
    UI_TYPE_KP		= 2 ;
    UI_TYPE_R4		= 3 ;
    UI_TYPE_G3		= 4 ;
    UI_TYPE_G4		= 5 ;
                            
    CHAR UI_TYPE[][9] = 
    
         {
         'Unknown',		//1
         'Keypad',		//2
         'R4 Remote',		//3
         'G3 Panel',		//4
         'G4 Panel' 		//5
         } ;   
    
    DEFINE_CONSTANT //DEVICE ID's 
    
    #DEFINE DEV_ID_CONSTANTS     
    
    /////////////////////////////////KEYPADS 
    
    DEV_ID_KP_BEGIN		= 169 ;
    DEV_ID_MET6N  		= 169 ;
    DEV_ID_MET7   		= 170 ;
    DEV_ID_MET13  		= 171 ;
    DEV_ID_KP_END		= 171 ;
    
    /////////////////////////////////R4 
    
    DEV_ID_R4		= 322 ;
    
    /////////////////////////////////G3 PANELS 
    
    DEV_ID_G3_END		= 256 ;
    
    DEFINE_EVENT //dvUI_ARRAY DATA EVENT
    
    DATA_EVENT   [dvUI_Arry]
         
         {
         ONLINE:
    	  {
    	  STACK_VAR INTEGER nUI_Indx ;
    	  STACK_VAR INTEGER nDeviceID ;
    	  STACK_VAR INTEGER nValue ; //UI TYPES Unknown=1, KP=2, R4=3, G3=4, G4=5, 
    	    
    	  nUI_Indx = GET_LAST(dvUI_Arry) ;
    	  nDeviceID = DEVICE_ID(dvUI_Arry[nUI_Indx]) ;
    	  if(!nUI_TypeArry[nUI_Indx])//only run if value hasn't been set already!
    	       {
    	       SELECT
    		    {
    		    ACTIVE(nDeviceID == 0)://?? No Number 
    			 {
    			 nValue = 0 ; //DON'T SET LET IT TRY AGAIN NEXT TIME
    			 }
    		    ACTIVE(nDeviceID >= 169 && nDeviceID <= 171)://Metreau Keypads
    			 {
    			 nValue = UI_TYPE_KP ;
    			 }
    		    ACTIVE(nDeviceID == 322)://R4
    			 {
    			 nValue = UI_TYPE_R4 ;
    			 }
    		    ACTIVE(nDeviceID < 256)://G3 panel
    			 {
    			 nValue = UI_TYPE_G3 ;
    			 }
    		   // ACTIVE(1)://?? No Number 
    //			 {
    //			 nValue = UI_TYPE_UNKNOWN ;
    //			 }
    		    ACTIVE(1)://G4  //FIGURE OUT NUMBERS FOR THIS
    			 {
    			 nValue = UI_TYPE_G4 ;
    			 }
    		    }
    	       nUI_TypeArry[nUI_Indx] = nValue ;
    	       fnUI_DeBug("'UI Device: ',fnDEV_TO_STRING(dvUI_Arry[nUI_Indx]),' is a ',nUI_TypeArry[nValue],
    					     '. ** UI Type #',itoa(nValue),' **. >-Line-<',itoa(__LINE__),'>'") ;
    	       }
    	  }
         }
    
    DEFINE_FUNCTION fnTP_Send_VText (INTEGER iUI_Indx,nCHAN,CHAR strMSG[]) 
         
         {
         if(iUI_Indx)//if iUI_Indx has value then send only to it, just came online, on page or needs refreshing
    	  {
    	  SWITCH(nUI_TypeArry[iUI_Indx])
    	       {
    	       CASE UI_TYPE_G4:
    	       CASE UI_TYPE_R4:
    		    {
    		    STACK_VAR WIDECHAR strSTRING1[100] ;
    		    STACK_VAR CHAR strSTRING2[100] ;
    		    
    		    strSTRING1 = WC_DECODE(strMSG,WC_FORMAT_UTF8,1) ; // Used to Decode 
    		    strSTRING2 = WC_ENCODE(strSTRING1,WC_FORMAT_TP,1) ;//WC_TP_ENCODE (strSTRING1) should be the same
    		    SEND_COMMAND dvSB_UIArry[iUI_Indx], "'^UNI-',ITOA(nCHAN),',0,',strSTRING2"   
    		    }
    	       CASE UI_TYPE_G3:
    		    {
    		    SEND_COMMAND dvSB_UIArry[iUI_Indx], "'TEXT',ITOA(nCHAN),'-',strMSG" ; 
    		    }
    	       CASE UI_TYPE_KP:
    	       CASE UI_TYPE_UNKNOWN:
    		    {
    		    //DO NOTHING
    		    }
    	       }
    	  }
         else  //general feedback so send to all that are actively on this page for this instance of the device
    	  {
    	  STACK_VAR INTEGER nNumUI ;
    	  STACK_VAR INTEGER n ;
    	       
    	  nNumUI = LENGTH_ARRAY(nSB_ActiveTPArry)
    	  for(n = 1 ; n <= nNumUI ; n++)
    	       {
    	       if(nSB_ActiveTPArry[n] == nSB_ThisSB)//means it on this SB & Active on page
    		    {
    		    SWITCH(nUI_TypeArry[n])
    			 {
    			 CASE UI_TYPE_G4:
    			 CASE UI_TYPE_R4:
    			      {
    			      STACK_VAR WIDECHAR strSTRING1[100] ;
    			      STACK_VAR CHAR strSTRING2[100] ;
    			      
    			      strSTRING1 = WC_DECODE(strMSG,WC_FORMAT_UTF8,1) ; // Used to Decode 
    			      strSTRING2 = WC_ENCODE(strSTRING1,WC_FORMAT_TP,1) ;//WC_TP_ENCODE (strSTRING1) should be the same
    			      SEND_COMMAND dvSB_UIArry[n], "'^UNI-',ITOA(nCHAN),',0,',strSTRING2"   
    			      }
    			 CASE UI_TYPE_G3:
    			      {
    			      SEND_COMMAND dvSB_UIArry[n], "'TEXT',ITOA(nCHAN),'-',strMSG" ; 
    			      }
    			 CASE UI_TYPE_KP:
    			 CASE UI_TYPE_UNKNOWN:
    			      {
    			      //DO NOTHING
    			      }
    			 }
    		    }
    	       }
    	  }
    	  
         RETURN ;
         }
    

    The array nSB_ActiveTPArry[n] tracks the TPs so when a TP goes on page it's index position is set to the module instance it's control and when it goes off page it's set to 0. When it comes on page it's brought up to date and from then on feedback is only event driven. If it falls offline it's array value is again set to 0.

    FYI, this hasn't been run since ripping it apart and putting it back together but you should be able to get the idea.

    I'll do the same type of thing for levels and channels just so I can add specific requirements for that particular type of device.
  • viningvining Posts: 4,368
    Just looked at the data event and I like this better
    nUI_Indx = GET_LAST(dvUI_Arry) ;
    	  if(!nUI_TypeArry[nUI_Indx])//only run if value hasn't been set already!
    	       {
    	       nDeviceID = DEVICE_ID(dvUI_Arry[nUI_Indx]) ;
    
    Why run the function DEVICE_ID again, that's was supposed to be the point of the "if".
  • viningvining Posts: 4,368
    jjames wrote:
    Per the online version of AMX-PI
    How come when I go to the AMX website > Tech Center > AMX-PI > SHOW > AMX Supplemental Product.... > DEVICE ID the version I get is again last modified "Modified: 10-25-2007" .

    Has nothing for the 5200's. Where are you finding your version?
  • jjamesjjames Posts: 2,908
    I just went to the actual product, I never knew there was a DEVICE_ID List.

    From the left hand side:
    Home > Touch Panels and Accessories > Modero Touch Panels > MVP (Modero ViewPoint) Wireless Touch Panels > 5.2" Modero ViewPoint Touch Panels > MVP-5200i
  • DHawthorneDHawthorne Posts: 4,584
    I never thought of using it that way. I always just make a panel type array for a lookup table, and base it on that.
  • jjamesjjames Posts: 2,908
    DHawthorne wrote: »
    I never thought of using it that way. I always just make a panel type array for a lookup table, and base it on that.

    Yeah, I had done that for a while (until I saw the iPort UI module), but it got hairy once you hard-coded for certain indexes, then if you had to wind up removing an index, or adding another panel . . . not fun to go through code and find where it referenced specific panels.
Sign In or Register to comment.