DEFINE_DEVICE
dvMVP_IR1 = 10001:13:0 //IR xmit port on mvp
dvTPMVP_IR1 = 10001:17:0 //MVP buttons for local IR
DEFINE_EVENT
DATA_EVENT [dvMVP_IR1]
{
}
BUTTON_EVENT [dvTPMVP_IR1, 9]// TV power not used
BUTTON_EVENT [dvTPMVP_IR1,10]// TV 0
BUTTON_EVENT [dvTPMVP_IR1,11]// TV 1
BUTTON_EVENT [dvTPMVP_IR1,12]// TV 2
BUTTON_EVENT [dvTPMVP_IR1,13]// TV 3
BUTTON_EVENT [dvTPMVP_IR1,14]// TV 4
BUTTON_EVENT [dvTPMVP_IR1,15]// TV 5
BUTTON_EVENT [dvTPMVP_IR1,16]// TV 6
BUTTON_EVENT [dvTPMVP_IR1,17]// TV 7
BUTTON_EVENT [dvTPMVP_IR1,18]// TV 8
BUTTON_EVENT [dvTPMVP_IR1,19]// TV 9
BUTTON_EVENT [dvTPMVP_IR1,20]// TV +100
BUTTON_EVENT [dvTPMVP_IR1,24]// vol up
BUTTON_EVENT [dvTPMVP_IR1,25]// vol dwn
BUTTON_EVENT [dvTPMVP_IR1,44]// TV Menu
BUTTON_EVENT [dvTPMVP_IR1,45]// TV ^
BUTTON_EVENT [dvTPMVP_IR1,46]// TV v
BUTTON_EVENT [dvTPMVP_IR1,47]// TV <
BUTTON_EVENT [dvTPMVP_IR1,48]// TV >
BUTTON_EVENT [dvTPMVP_IR1,49]// TV Select
BUTTON_EVENT [dvTPMVP_IR1,126]// TV Aspect
BUTTON_EVENT [dvTPMVP_IR1,127]// TV Dislay
BUTTON_EVENT [dvTPMVP_IR1,124]// TV TV/VID button.input.channel
{
PUSH:
{
nButton = (BUTTON.INPUT.CHANNEL)
send_command dvMVP_IR1,"'^IRM-13,',itoa(nButton)"
to [dvTPMVP_IR1,nButton]
}
HOLD[2, REPEAT]:
{
if (nButton == 24 || nButton == 25)
{
send_command dvMVP_IR1,"'^IRM-13,',itoa(nButton)"
}
}
}
In TPD4 go to "File>Project Properties>IR Emitters & Receiver".
Assign a port to the IR transmitter (above I used 13 on User IR 1 Channel Port). I didn't set anything in the DATA_EVENT, I don't remember why not. Map your IR file to the TP's xmitter port or just send the IR file directly.
I really don't recall anything else about setting this up but Software History should shed some light on the other port settings.
i thought you didnt need netlinx code to get this to work. There are some options in TPDesign which allow you to do this WAY easier...
In your button config, go to the Program tab, then for channel port, choose "user IR port 1" and then you can assign a channel code to pulse the IR code
Here's the applicable portion of Software History:
"'^IRM-<port>,<channel>,<onTime>,<offTime>'"
Pulse the given IR channel for onTime in tenths of seconds. Delay offTime
in tenths of a second before the next IR pulse is allowed.
^IRM allows the command itself to specify the port number.
^IRM is needed because commands programmed on the panel itself can only
be sent to a single port number. (currently this is defined as 1 only).
Note: The port number of the IR will be the port number assigned in TPD4.
Variables:
port = User-defined port on the device (panel).
channel = 1-255 (channel to pulse).
onTime = 1/10th of a second.
offTime = 1/10th of a second.
Example:
SEND_COMMAND Panel,"'^IRM-10,5, 20, 10'"
Sets the port 10 IR channel 5 on time to 1 second
and off time to 2 seconds.
I Believe what Yuri said is correct and if you don't do any Netlinxs code and make the TP buttons match the IR xmit port and channel match the IR slot index you want to send it will probably work.
As with most things AMX, the instructions make perfect sense if you already know what you doing but if you don't they are vague and open to interpretation.
That's why this forum is so critcal, helping us figure out this stuff together and getting help from all those experienced programmers who probably have better thing to do but take time to help us any way!
button channels need to match the IR channel number.
setup "IR port 1" for the TP to any port # you want. ie. 21. Then assign play button for example to be port 21, channel 1 (typically). load desired ir file to port 21on that TP. then your button will send the ir from mvp with no netlinx code. can do this for two IR files/devices. very nice workaround sometimes.
Comments
In TPD4 go to "File>Project Properties>IR Emitters & Receiver".
Assign a port to the IR transmitter (above I used 13 on User IR 1 Channel Port). I didn't set anything in the DATA_EVENT, I don't remember why not. Map your IR file to the TP's xmitter port or just send the IR file directly.
I really don't recall anything else about setting this up but Software History should shed some light on the other port settings.
In your button config, go to the Program tab, then for channel port, choose "user IR port 1" and then you can assign a channel code to pulse the IR code
I Believe what Yuri said is correct and if you don't do any Netlinxs code and make the TP buttons match the IR xmit port and channel match the IR slot index you want to send it will probably work.
As with most things AMX, the instructions make perfect sense if you already know what you doing but if you don't they are vague and open to interpretation.
That's why this forum is so critcal, helping us figure out this stuff together and getting help from all those experienced programmers who probably have better thing to do but take time to help us any way!
Let us know how it works.
button channels need to match the IR channel number.
setup "IR port 1" for the TP to any port # you want. ie. 21. Then assign play button for example to be port 21, channel 1 (typically). load desired ir file to port 21on that TP. then your button will send the ir from mvp with no netlinx code. can do this for two IR files/devices. very nice workaround sometimes.