Optima - Sending BCS Command
tspoe
Posts: 32
Hello,
First, I am new to Netlinx programming and it's been a while since I took the Programmer 1 course. Second, we are currently using an Extron Switch but have since made the 'switch' to the AMX AP Optima. I'm trying to get my feet wet by trying a simple command with a button press on the TP. I would like to make an assignment for the DVD player to show up on the Panasonic monitor. Here is what I have:
Any help would be greatly appreciated!
tspoe
First, I am new to Netlinx programming and it's been a while since I took the Programmer 1 course. Second, we are currently using an Extron Switch but have since made the 'switch' to the AMX AP Optima. I'm trying to get my feet wet by trying a simple command with a button press on the TP. I would like to make an assignment for the DVD player to show up on the Panasonic monitor. Here is what I have:
DEFINE_DEVICE dvAP = 5001:1:0 dvPanasonic = 5001:6:0 dvDVD = 5001:9:0 dvTP = 10001:1:0 vdvAP = 41003:3:0 vdvPanasonic = 41003:6:0 DEFINE_MODULE 'AutoPatch_Matrix_Switcher_Comm_dr1_0_0' INST(vdvAP, dvAP) DEFINE_MODULE 'Panasonic_TH50PF30U_Comm_dr1_0_0' mdlPANASONIC_COMM(vdvPanasonic,dvPanasonic) DEFINE_EVENT BUTTON_EVENT[dvTP,2] { PUSH: { SEND_COMMAND dvAP,"'CL1I2O5T'" //DVD player is on level 1 input 2; send to output 5 (panasonic monitor) } }The monitor is on (HDMI input) and the DVD player is playing so I was expecting the assignment to be made and see the movie playing on the monitor but no such luck. Is there something else I need to include in my 'simple' program? When I look at the Notifications I can see where my command was sent to the D:P:S of the monitor but I'm not sure how to read the 'String From' lines.
Any help would be greatly appreciated!
tspoe
0
Comments
Once you read the doc it should give you the format to control the virtual which in turn will control the device so you don't even need to send string directly to the device using the "PASSTHRU" command.
It still doesn't work. I even tried to 'Control a Device' using the command. Do I have the command formatted correctly? Did I misunderstand your explanation? Another thing I noticed is I'm getting a "PanasonicMonitor: Received Error: 401" error when I enable the diagnostic messages. I'm not sure what that means...I was able to turn the monitor on/off using 'Control a Device'.
Thanks for your help!!
If you are just doing simple switching you don't need the comm module.
DATA_EVENT[dvAP] // SETUP RS232 PORT 1
{
ONLINE:
{
SEND_COMMAND DATA.DEVICE,"'SET BAUD 9600,N,8,1,485 DISABLE'"
}
}
BUTTON_EVENT[dvTP,2]
{
PUSH:
{
SEND_STRING dvAP,"'CL1I2O5T'" //DVD player is on level 1 input 2; send to output 5 (panasonic monitor)
}
}
also I am not seeing where you are telling the monitor to switch to the proper input to display this source?
I commented out the duet modules (not sure if that mattered), changed the DATA_EVENT per your example and set the input of the monitor to HDMI (question: Do I have to explicitly set the input even tho the monitor was already on the HDMI input?). I'm not sure what happened. I pressed the button on the TP and nothing happened. About 1 min later all of a sudden the DVD appeared playing on the monitor. Was this just a delayed reaction?
One more question...where can I find information on how to set the baud rate using 'SET BAUD'? Our predecessors used 'PROPERTY-Baud_Rate...' etc when sending the command to the virtual device but now I'm not so sure that's correct...and they've since resigned so I can't ask them!
You also do not need the ONLINE data event for the autopatch because the interface document points out that the module is setting the baud to the 9600 setting by default. You would only use the PROPERTY command if you want to deviate from the default.
Here is the code I used based on your sample, and then expanded to assist with read-ability:
Here is the Netlinx Studio output notifications I received when I EMULATE device 10001 and do a push of channel 2 to trigger the button event:
<output,..>" command. We have an HDMI board and a HD-15 board...using this command, how do you specify which VIDEO level you're working with? I haven't found any documentation on this so I've been using the "CI" command.
Assuming there are no errors returned, and you still don't see the outcome you intended, what does the front panel of the switch indicate for the current status? If that matches what your string was, something else is going on.
At some point, you may want to engage technical support if it doesn't appear to be working and all signs point to correct syntax.
I added the #INCLUDE file and it appears to be working now. We'll see if it still works tomorrow morning.
Thanks for your help! I haven't had time to look over your example yet but I'll do that first thing in the morning (after I test).
T
The front panel on the switch doesn't show me which input is tied to which output(s) but I can 'Change' the ties via the front panel and the blue lights appear.
Pasting in your notifications or telnet log would be helpful to further assist here. In Netlinx Studio, I would make sure the "command" radio button is selected prior to sending.
You indicated that you are sending strings directly to the device - how is that occurring -- telnet or Diagnostics>Control A Device? When you are sending the string, is the module loaded or is that being done outside of your program?
In telnet, if you type 'device status 41001:1:1' - what do you see for the feedback channels?
When I was sending the command to the device I was using the code in my program:
I tried using 'Control a Device' (5001:1:1, command=CL1I2O5T - I tried with and without the 'T') but nothing happened.
When I get the status of the device via telnet, I get the following:
Port 1 - Channels:255 Levels:8
MaxStringLen=2000 Types= etc...
The following input channels are on:None
The following output channels are on:251
The following feedback channels are on:251
Level 1=0 Supported data types= etc...
Hope that helps...I'm stumped.
When you revisit this, telnet into your master and do the following:
1) type msg on
2) type send command 41001, 'DEBUG-4'
Watch the internal module dialog to see if you can identify where the breakdown is occurring in the communications.
My suggestion is to contact technical support when you are connected to the device as they would be able to provide assistance when you need it rather than a delayed response once you are offsite.
Additionally, it sounds like you are not using the tools within netlinx studio quite right.
To do what you are attempting, it would be a send STRING to 5001, or a send COMMAND to 41001. The module interface guide would describe the syntax to send, but based on what I recall - what you are typing would not work as a send command to this module. The interface document suggested CLVIDEOI2O5 -- the module would then convert that into CL1I2O5T before sending it as a string to the physical device.
You are close! Good luck and I hope you are able to speak with support the next time you are onsite and connected to this system.
Is there anyway to find out what the debug info means in the telnet session??
I forgot that I needed to 'send_string' to the device vs 'send_command'...thank you.
I changed the 'CL1' to 'CLVIDEO' and that seems to be working and I can see where the command translates to 'CL1...' in telnet mode. This brings me back to one of my questions tho. We have an HDMI board (Level 1) and an HD-15 (Level 2) board...by using 'VIDEO' in the command, how do I distinguish between the 2 Levels? The command translated to Level 1 but what if I'm sending commands to the HD-15 level?
Thanks for your help!!
T
In your case, you only have video to contend with. In some design scenarios, like a precis 8x8 component switch with analog stereo audio, Input 1 would have an audio signal and a separate video signal. Using the protocol, I could request the audio signal from one input, and route that to an output - but not the video portion of the same input. We call this break-away audio or break-away video.
The optima does not currently support break-away audio on HDMI signals, and your other card is HD15. If it is HD15+stereo, you would have both audio and video levels, or just video if it is a HD15 without the stereo inputs. You will notice that the default is to generally use CL0, or CLALL within the module because that command will switch audio and video together. This gives you one command instead of two - just like the CI command does the same as the CL0 (or CLALL in the module).
The inputs are numbered on your Optima. These numbers are managed within the configuration file on the device. You will change the level based on what you are looking to accomplish - audio only, video only, or both. The Input number is what is deciding whether you get the HDMI or the HD15. In your case, the top card is probably 1-8 and the second card is 9-16. The XNConnect utility would allow you drill into that configuration file if needed.
To further illustrate the differences in levels, here are three examples with what the outcome should be. Understand that some commands are not valid with all products using the BCS API.
CL0I1O1 - route audio AND video for Input 1 to Output 1 (command is valid for some, but not all models)
CL1I1O1 - route video only for Input 1 to Output 1
CL2I1O1 - route audio only for Input 1 to Output 1
Make sense?
Can you explain AFV (audio-follow-video)? I haven't come across a document that really explains it. It's in the Autopatch Official Demo file but no explanation.
The HDMI board is numbered 1-8, the HD-15 board is numbered 1-8 and the Audio board is numbered 1-8. Is it possible they're configured 1-8, 9-16, 17-24? I haven't looked at XNConnect yet.