AMX Widgets Notes and Messenger not working properly
John Paul
Junior Member
Has anyone tried the AMX Widgets Notes and Messenger available here
http://www.amx.com/ui/browse.asp?uiType=Widgets&panelClass=&market=&resolution=&panelType=&aspectRatio=
The code and touch panel samples uses the port 1 for the address and channel port . Now i have modified the define device section for the port i wanted which was anything more than 1.
DEFINE_DEVICE
MessengerTP1 = 10002:2:1
MessengerTP2 = 10003:2:1
MessengerTP3 = 10006:2:1
MessengerTP4 = 10014:2:1
But if i change the port to anything other than 1 in the touch panel and the code , it will not work . Even though i checked the address port, channel port and the code based on the port no i have put.
I have attached the notifications tab when i run the messenger widget with a port of 2. The commands are going but the widget will not function. I have also attached my code and TPD4 file so that you can verify if i am coding and touch panel design is proper.
http://www.amx.com/ui/browse.asp?uiType=Widgets&panelClass=&market=&resolution=&panelType=&aspectRatio=
The code and touch panel samples uses the port 1 for the address and channel port . Now i have modified the define device section for the port i wanted which was anything more than 1.
DEFINE_DEVICE
MessengerTP1 = 10002:2:1
MessengerTP2 = 10003:2:1
MessengerTP3 = 10006:2:1
MessengerTP4 = 10014:2:1
But if i change the port to anything other than 1 in the touch panel and the code , it will not work . Even though i checked the address port, channel port and the code based on the port no i have put.
I have attached the notifications tab when i run the messenger widget with a port of 2. The commands are going but the widget will not function. I have also attached my code and TPD4 file so that you can verify if i am coding and touch panel design is proper.
Comments
-
It probably depends on STRING events from the panel, and those only report on port 1. There is nothing you can do about it. I suppose it's also possible that they hard-coded the module to port 1 ... which would be really sloppy of them. I think it's the former.
-
RE: widgets and port 1...
The previous post was correct, the string events are received on port 1. If you change the device port number you will no longer receive the string events. There are only a handful of address and channel codes being used in the example files, if you are already using these codes in your project the easiest remedy would be to change these in the widget code and panel file. -
Or you can create a separate device definition for the text input. For example
DEFINE_DEVICE dvTPTxtInput1 = 10001:1:1 dvTPTxtInput2 = 10002:1:1 dvTPNotes1 = 10001:2:1 dvTPNotes2 = 10002:2:1 DEFINE_CONSTANT DEV dvTPTxtInputs[] = {dvTPTxtInput1, dvTPTxtInput2 } DEV dvNotesPanels[] = {dvTPNotes1, dvTPNotes2 } DEFINE_EVENT DATA_EVENT[dvTPTxtInputs] { STRING: { // ...parse,parse,parse in this section // SEND_COMMAND dvNotesPanels,"'^TXT-101,0,',DATA.TEXT" ON[dvNotesPanels,4] //turn on new msg indicator } } BUTTON_EVENT[dvNotesPanels,3]//ERASE { PUSH: { SEND_COMMAND dvNotesPanels,"'^TXT-101,0, '" OFF[dvNotesPanels,4]//turn off new msg indicator } }
I would change the button name on the text input button so that you know the string event is coming from the "notes" page.
--John -
thanks for the posts guys, my queries are
1. How can they hard-coded the module to port 1 since there is only a netlinx code and not a TKO file or anything .
2.How do i modify the messenger widget. -
John Paul wrote:
They can't. Dave just assumed that the module was an A-Typical module with the cool parts locked up inside the .tko and w/o the un-compiled .axs it was made from.1. How can they hard-coded the module to port 1 since there is only a netlinx code and not a TKO file or anything .
This widget doesn't have that so it doesn't apply.
You basically have to do what John G. said and create a TP device on port 1 to handle strings from the TPs and then forward those strings to your code for the widget. Usually you create a virtual for the widget to receive the string from the TP device created for port 1 data event string handler.2.How do i modify the messenger widget.
If you get confused just post again and some one will help out with more example if need be but the previous post by John G had the basic idea already coded. -
John Paul wrote:
They can't. Dave just assumed that the module was an A-Typical module with the cool parts locked up inside the .tko and w/o the un-compiled .axs it was made from.
This widget doesn't have that so it doesn't apply.
.
Since the widget is not hardcoded to port 1 , why am i not able to change the port to another no and still receive the strings. Is it because i am using the setup port to receive the strings or using data.text, just curious thats all.John Paul wrote:
You basically have to do what John G. said and create a TP device on port 1 to handle strings from the TPs and then forward those strings to your code for the widget. Usually you create a virtual for the widget to receive the string from the TP device created for port 1 data event string handler.
If you get confused just post again and some one will help out with more example if need be but the previous post by John G had the basic idea already coded.
Regarding using a virtual , is it like creating a virtual and passing the strings on its command part of the data event and then doing the parsing.
I have a audio media server on port 1 and about 27 touch panels and it would have been so simple to just change the port in the code and do it. -
John Paul wrote:
Strings from TPs only arrive on port 1, that just the way the panels work so any dev port that sends string to the master send the string to port 1.Since the widget is not hardcoded to port 1 , why am i not able to change the port to another no and still receive the strings. Is it because i am using the setup port to receive the strings or using data.text, just curious thats all.
Yep. the only thing is you need to have a way of determining where the string is coming from in order to dertermine where to forward it so like John suggested it's easiest to copy the pop up and modify the name of the text input button since that gets pre-pended to the string that arrives at the string event handler of port 1. Do a select active with findstring(data.text,'some_name_Keypad',1) and then send command dvVirtual, data.text . Then in the command data event handler for the virtual device parse your string.Regarding using a virtual , is it like creating a virtual and passing the strings on its command part of the data event and then doing the parsing.
It's really not that difficult.
Here's a thread with some info:
http://amxforums.com/showthread.php?t=5906
Leave a Comment
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
