Home AMX User Forum AMXForums Archive Threads AMX Hardware
Options

Pcs2

Could somebody explain how the outputs of the PCS2 behave when sensing a device conected to it?

Comments

  • Options
    viningvining Posts: 4,368
    Well, let's say you plug in a CD player. Normally with the power button off both outputs are open, when the players powered on, paused or stopped (system stby) output 2 makes/closes and output one stay open. When playing or FFWD/RWD output one makes/closes and output two opens. It may be reversed but I think that's right. So you basically have three possibilties to track: both open, one open & two closed or one closed and two open.
  • Options
    flcusatflcusat Posts: 309
    But when it is closed do you have any voltage or viceversa? How do you combine the status of the output on the PCS2 with an I/O port?
  • Options
    viningvining Posts: 4,368
    Two different ports.
    Define_Device
    
    dv_IO               = 5001:17:0  //  I/0 = PORT 9
    
    
    DATA_EVENT   [dvCD]              ///send stop to cd player
    {
        online:
        {
        pulse [dvCD,2]
        SEND_COMMAND dvCD,'SET MODE IR'         // sets IR port 9 to IR mode
        SEND_COMMAND dvCD,'SET IO LINK 1'       // sets IR port to link with I/O channel 1 (port 17)
        send_command dvCD, 'CARON'
        }
    }
    
    DATA_EVENT   [dv_IO]                 /// I/O sensor input port 17 of NI4000 ch 1 & 2
    {
        online:
        {
    	send_command dv_IO,'SET INPUT 1 LOW'
    	send_command dv_IO,'SET INPUT 2 LOW'
    	send_command dv_IO,'SET INPUT 3 LOW'
    	send_command dv_IO,'SET INPUT 4 LOW'
        }
    }
    
    CHANNEL_EVENT[dv_IO,1]               ///  IO current sensor for play/ffwd-rewnd on cd
         {
        ON:
    	  {
    	  wait 3
    	       {
    	       if ([dv_IO,1]) 
    		    nCDIO_PLAY   =  1        
    	       }
    	  }
        OFF:
    	  {
    	  wait 3
    	       {
    	       if (![dv_IO,1])
    		    nCDIO_PLAY  =  0        
    	       }
    	  }
         }
    CHANNEL_EVENT[dv_IO,2]               ///  IO current sensor for stop/pause on cd
         {
         ON:
    	  {
    	  wait 3
    	       {
    	       if ([dv_IO,2]) 
    		    nCDIO_STBY  =  1        
    	       }
    	  }
         OFF:
    	  {
    	  wait 3
    	       {
    	       if (![dv_IO,2])
    		    nCDIO_STBY =  0        
    	       }
    	  }
         }
    
Sign In or Register to comment.