No IR control from NI3100?
I recently uploaded a new src and tkn to a 3100, and I'm having trouble getting the NI to output IR. I am using an 8400 panel, and when I push a button, I see the activity led light up on the NI, but no IR lights flash. I went into Diagnostics-Control a device, and can select the port (5001:1:0) and see the led light up, but nothing from my program. Originally I was using a set of dev arrays and variables, and when that didn't work (although it worked at my house last night), I went the P1 style:
button_event[bluray,1]
{
PUSH:
{
PULSE[bluray,1]
}
}
and still no response from the NI. I recently loaded an IR file to that port(5001:1:0), so I know it's there, and I can see the port available in the online tree. What am I doing wrong?
Comments
i had a similar problem with an NI-2100 once. I was able to see the IR led lit but no actual IR data was
transmited from the port. I tried to set and re set the properties of the IR port and yet nothing.
BUT when i used the send commands it worked. So try to use the SP and CP commands to see if works.
Remember that the SP command works like a string buffer. That said it is best used when you want to pulse a sequence of IR numbers.
Here is an example on how to send the sequence of 142 with the CP command (assuming standard AMX/DUET channel numbers):
BUTTON_EVENT[tpSalon, 1] { PUSH: { send_command dvIR,"'SP',11"; send_command dvIR,"'SP',14"; send_command dvIR,"'SP',12"; } }The CP command on the other hand CLEARS that buffer before the IR command.
Use CTON and CTOF to send the pulse (CTON) time and the idle (CTOF) time.
If you have AMX-PI installed try to search for these functions.
Yes, and even though it's a serial port, you can turn a channel on and off. So, diagnostic is not lying to you. I believe the IR ports on an NI-3100 start on port 9.
DEFINE_DEVICE AUTOPATCH = 5001:1:0 //Precis 8x8 Switcher DATA_EVENT[AUTOPATCH] //Boot Sequence, Feedback { ONLINE: { //est. comm with switcher, so set up serial //port on amx controller. //get data above from amx pi on the controller itself SEND_COMMAND AUTOPATCH,"'SET BAUD 9600,N,8,1'" } STRING: { local_var integer nSwIn //assigned input local_var integer nSwOut //assigned output local_var char sSWResponse[15] //to store switcher responses local_var char sSWDump[15] //to remove unwanted data local_var integer i //for simple math sSWResponse = data.text IF (FIND_STRING(sSwResponse,'CL0I',1)) { sSWDump = REMOVE_STRING(sSWResponse, 'CL0I',1) //removes the preamble before the input # nSwIn = atoi(REMOVE_STRING(sSWResponse, 'O',1)) nSwOut = atoi(REMOVE_STRING(sSWResponse, 'T',1)) nSources[1] = nSwIn //SEND_COMMAND dvCV7Tp, "'^ANI-5,1,',itoa(nSwIn),',1'" } } }I added some basic switching on a button press on my touchpanel:BUTTON_EVENT[dvTPMBed,151] { PUSH: { SEND_COMMAND AUTOPATCH, 'CI1O4T' //game rm source blu ray } }I verified via my pc's serial port that the command CI1O4T functions directly connected to the switcher, and Im getting feedback. When I plug the precis into the serial port and try to use by button event, it doesn't respond. I don't get any feedback from my data event variables, either. Diagnostics is turned on for port 5001:1:0, and I've even tried using 'control a device' with the string listed above, and nothing. What a day!i never get anything from diagnostics when I use system 0. I can only get a response when I give it the real system number. Have you tried 5001:1:1?
DEFINE_DEVICE dvTPMBed = 10001:8:0 AUTOPATCH = 5001:1:0 //Precis 8x8 Switcher DEFINE_EVENT DATA_EVENT[AUTOPATCH] //Boot Sequence, Feedback { ONLINE: { //est. comm with switcher, so set up serial //port on amx controller. //get data above from amx pi on the controller itself SEND_COMMAND AUTOPATCH,"'SET BAUD 9600,N,8,1'" } STRING: { local_var integer nSwIn //assigned input local_var integer nSwOut //assigned output local_var char sSWResponse[15] //to store switcher responses local_var char sSWDump[15] //to remove unwanted data local_var integer i //for simple math sSWResponse = data.text IF (FIND_STRING(sSwResponse,'CL0I',1)) { sSWDump = REMOVE_STRING(sSWResponse, 'CL0I',1) //removes the preamble before the input # nSwIn = atoi(REMOVE_STRING(sSWResponse, 'O',1)) nSwOut = atoi(REMOVE_STRING(sSWResponse, 'T',1)) nSources[1] = nSwIn //SEND_COMMAND dvCV7Tp, "'^ANI-5,1,',itoa(nSwIn),',1'" } } } BUTTON_EVENT BUTTON_EVENT[dvTPMBed,151] { PUSH: { SEND_COMMAND AUTOPATCH, 'CL1',$020,'2I1O5T' } }If I debug with sSWresponse, I get nothing from the autopatch when pushing buttons on my panel. If I push buttons on the front panel of the autopatch, I DO get a response in debugger, so I know the switcher is at least outputting, and the serial port is seeing it.I guess I should always verify what I am copying from other parts of my code....It seems that non-AMX devices don't exactly like the send_command code! Duh...hello, send_string. Hopefully this fixes my non-responsive switcher issue for tomorrow's return!
Easy mistake to make. Everyone gets caught by that one