Home AMX User Forum AMXForums Archive Threads AMX Hardware

AXB-IRS4 Initialization?

Is there anything I need to do in my code to initialize an AXB-IRS4? I am testing some code with one, and I can't get the IR ports to light up. The IR works on my NI-700 port, but not the IRS4. I have set the ID(129) and uploaded IR files to each port, and have verified that it is listed in the online tree. Thanks!

Comments

  • mushmush Posts: 287
    G'day Vegastech,

    That depends on what you call initialisation. You have to load some IR codes, which you've done.
    You would then have to declare the device in your code and use that declaration as a reference.
    Why don't you use 'control a device' in your diagnostics and pulse a channel that has a code in it?
    You should get some lights happening then.

    Cheers
  • ericmedleyericmedley Posts: 4,177
    vegastech wrote: »
    Is there anything I need to do in my code to initialize an AXB-IRS4? I am testing some code with one, and I can't get the IR ports to light up. The IR works on my NI-700 port, but not the IRS4. I have set the ID(129) and uploaded IR files to each port, and have verified that it is listed in the online tree. Thanks!

    You may already know this and just used the wrong terminology in the post. but, I'll post this anyway just in case.

    The old AXB-IRS4 doesn't separate the IR emitters by ports. In other words, you don't have IR emitter 1 at 129:01:0, IR emitter 2 at 129:02:0, IR emitter 3 at 129:03:0, etc..

    When you set the box's address, you're setting the address of the first device at 129:01:0. the 2nd IR emitter is addressed at 130:01:0, 3rd at 131:01:0 and 4th at 132:01:0. the remaining 3 IR emitters get the next three device addresses consecutively by default.

    So, if you have other axlink devices addressed on top of those other addresses, they won't work.

    Hope that helps.
  • Yes thanks, I'm aware of the addressing structure. I currently have it ID'd at 129,130,131,and 132:1:0. I can get IR to emit, but (and this may be the nature of the IRS4) it will only emit the code ALWAYS at .5 seconds at a time, even though my programming is for a TO, not a PULSE. I'm wondering if there is a way to get the IRS4 to follow the TO scheme. I've seen in the AMX PI that the IRS4 pulses at .5 sec by default and that I can change the pulse time, but I'm wondering if I can integrate this somehow automatically to change with my button press programming, which looks like this:
    BUTTON_EVENT[arrTPMB,nBtnArray]
    {
        PUSH:
        {
    	local_var integer btn
    	local_var integer src
    	btn = get_last(nBtnArray)
    	src = get_last(arrTPMB)
    	TO[src,get_last(nBtnArray)]
        }
    }
    
    I'm specifically concerned about the new DirecTV HR24 box IR codes. Thanks in advance!
  • TurnipTruckTurnipTruck Posts: 1,485
    I beleive that if you ON[devchan] then immediately OFF[devchan] you can reduce the amount of time that the emitter is lit.
  • Does the nms and axc-irs4. Behave any differently?
  • There is no inherent reason an AXB-IRS4 will not send an IR command for an indefinite amount of time, with the exception of non-repeating IR patterns. Some IR patterns are limited to the number of times they are repeated, and once the repeat count is reached the output stops, regardless of whether the TO is still active. Not sure whether that is what is happening or not. You may want to turn on notifications in NetLinx Studio for the device number of the IRS4 "port" you are using, and see when ONs and OFFs are being sent by the Master to the device. If the devices sends a Channel OFF back to the master, that is an indication of a non-repeating IR code is being generated.
  • ericmedleyericmedley Posts: 4,177
    There is no inherent reason an AXB-IRS4 will not send an IR command for an indefinite amount of time, with the exception of non-repeating IR patterns. Some IR patterns are limited to the number of times they are repeated, and once the repeat count is reached the output stops, regardless of whether the TO is still active. Not sure whether that is what is happening or not. You may want to turn on notifications in NetLinx Studio for the device number of the IRS4 "port" you are using, and see when ONs and OFFs are being sent by the Master to the device. If the devices sends a Channel OFF back to the master, that is an indication of a non-repeating IR code is being generated.

    I was gonna say this. I have several AXB-IRS4s on my personal system and they can send an IR code all day if you want them to.

    I also note that I had to recapture the DirecTV codes due to their new 'feature' of using a hold time of .2 seconds now on Ch up/down and directionals that totally screws up control systems use of them. I had to capture the ir remote just flicking the codes and hoping the capture worked. It took several tried but I did get them. So, at least now the channels don't go racing up or down whenever you hit the buttons on the TP. But, it did jimmy up the ability to press and hold on the TPs.

    BTW, if anyone want's this file, I'd happily share it.
    e
  • Eric,

    could you post a code snippet with what you are doing with your IRS4s? I'll have to check diagnostics when I get home. I'm wondering if it's the way I wrote my code. Also, what works better on these - doing an ONLINE_EVENT setting the IR pulse time, or telling the IRS4 to set the time in the button press code?
  • ericmedleyericmedley Posts: 4,177
    vegastech wrote: »
    Eric,

    could you post a code snippet with what you are doing with your IRS4s? I'll have to check diagnostics when I get home. I'm wondering if it's the way I wrote my code. Also, what works better on these - doing an ONLINE_EVENT setting the IR pulse time, or telling the IRS4 to set the time in the button press code?

    hmmm...

    sure, but I can assure you there's nothing magical about how I'm doing it.

    something along the lines of:
    button_event[dvTP_array,my_button_array]
    {
    push:
      {
      local_var integer button_id
      local_var integer tp_id
      button_id=get_last(my_button_array)
      tp_id=get_last(dvTP_array)
      to[dvTP_array[tp_id],my_button_array[button_id]] // for TP feedback
      to[dv_my_ir_box,my_IR_Box_Channels[button_id]
      }
    }
    

    On the set_pulse_time... I'm sure someone will pounce on me if I'm wrong, but I think that command actually effects pulse time system-wide. So, I'd do the command in the button event and then set it back to 'normal' (whatever that is) after the event has fired.

    If I'm wrong, then I'd do it on the device online event.
  • DHawthorneDHawthorne Posts: 4,584
    A badly captured IR command will not repeat or stay on in a TO event. I have had this happen to me several times, and re-capturing it with a longer button press fixed it in every case. The converse, of course, is if you capture it too long, you will get repeats no matter how short you pulse it from the IR box.
  • IRS4 not emitting with a button press?

    I have an IRS4 configured as device IDs 132:1:0, 133:1:0, 134:1:0, and 135:1:0. If I go into Diagnostics-Control a Device, I can send IR commands via the pulse option (using exit currently). But when I try to send it in code using an R2, I get nothing. I am doing this:
    DEFINE_DEVICE
    RFGUEST433		= 128:1:0  //433 Gateway in Guest 1
    SAT_4			= 132:1:0   //NXB-IRS4
    SAT_5			= 133:1:0   //NXB-IRS4
    TV_OFFICE		= 134:1:0  //On NXB-IRS4
    DEFINE_EVENT
    BUTTON_EVENT[RFGUEST433,0]
    {
        PUSH:
        {
    	PULSE[SAT_4,BUTTON.INPUT.CHANNEL]
        }
    }
    
    I have enabled diagnostics to see the button press/response from the RF, and see this:
    Line      1 (15:06:39):: Input Status:Pushed [128:1:1] - Channel 10 
    Line      2 (15:06:39):: Output Channel:On - From [132:1:1] - Channel 10 
    Line      3 (15:06:39):: Input Status:Released [128:1:1] - Channel 10 
    
    That is pressing button 0 on the R2, which should light up IR port 1 on my IRS4. However, it doesn't light up.
    Doing the same thing in Control A Device operates that Channel 10/IR Code 0 just fine. What did I do wrong?
  • If I change the IR device to the DVR on my NI-3100, it works fine with the code above. Here is what I see in Diagnostics for that port:
    Line      1 (15:12:11):: Input Status:Pushed [128:1:1] - Channel 11 
    Line      2 (15:12:11):: Feedback:On [5001:9:1] - Channel 11 
    Line      3 (15:12:11):: Output Channel:On - From [5001:9:1] - Channel 11 
    Line      4 (15:12:11):: Output Channel:On - From [132:1:1] - Channel 56 
    Line      5 (15:12:11):: Input Status:Released [128:1:1] - Channel 11 
    Line      6 (15:12:11):: Feedback:Off [5001:9:1] - Channel 11 
    Line      7 (15:12:11):: Output Channel:Off - From [5001:9:1] - Channel 11 
    
    And again with changing to the Sat_4 on the IRS4:
    Line      1 (15:16:36):: Input Status:Pushed [128:1:1] - Channel 12 
    Line      2 (15:16:36):: Output Channel:On - From [132:1:1] - Channel 12 
    Line      3 (15:16:36):: Input Status:Released [128:1:1] - Channel 12 
    
  • I would like to also add that I have tried the same code from an NXC-IRS, and it works fine. Only the IRS4 is giving me difficulties. I checked the dip switches, and the first 4 are in the up position, and the last 4 are in the down position.
Sign In or Register to comment.