Trouble Receiving from Keypad
jason_the_adams
Junior Member
Hey all,
I'm using the following code to call a keypad:
Then here is my string handler for the panels:
Now I've placed breaks in the String event, but it's as if it's simply receiving nothing from the panel; the STRING event is never engaging, and therefore nothing is happening... I'm straight up confused, and certain there's likely something small or simple I'm forgetting. Please help.
Thanks all!
I'm using the following code to call a keypad:
SEND_COMMAND dvTPANELS[nLAST_PANEL],"'@AKB-;Enter Name:'"
WAIT_UNTIL (!nPROPERTY_WAITING_ON_INPUT[nLAST_PANEL])
{
sTEMP_LUTRON_INFO[nLAST_PANEL].cTITLE_OFF = sUSER_INPUT[nLAST_PANEL]
sTEMP_LUTRON_INFO[nLAST_PANEL].cTITLE_ON = sUSER_INPUT[nLAST_PANEL]
}
}
Then here is my string handler for the panels:
STRING:
{
STACK_VAR INTEGER nLAST_PANEL
nLAST_PANEL = GET_LAST(dvTPANELS)
IF(nPROPERTY_WAITING_ON_INPUT[nLAST_PANEL])
{
sUSER_INPUT[nLAST_PANEL] = "sUSER_INPUT[nLAST_PANEL],DATA.TEXT"
SELECT
{
ACTIVE(FIND_STRING(sUSER_INPUT[nLAST_PANEL],'KEYB-',1)):
REMOVE_STRING(sUSER_INPUT[nLAST_PANEL],'KEYB-',1)
ACTIVE(FIND_STRING(sUSER_INPUT[nLAST_PANEL],'KEYP-',1)):
REMOVE_STRING(sUSER_INPUT[nLAST_PANEL],'KEYP-',1)
}
OFF[nPROPERTY_WAITING_ON_INPUT[nLAST_PANEL]]
}
}
Now I've placed breaks in the String event, but it's as if it's simply receiving nothing from the panel; the STRING event is never engaging, and therefore nothing is happening... I'm straight up confused, and certain there's likely something small or simple I'm forgetting. Please help.
Thanks all!
Comments
-
You have to make sure the text field (where the text displays when you enter a number) on the keypad is named "KEYP-" and that it outputs to the port you are looking at. This is not a built in value, it must be assigned.
As part of my STRING events on panels, I do a "SEND_STRING 0, DATA.TEXT" while debugging just to see exactly what is coming in. If you get nothing, it's going to the wrong port. If you get something besides "KEYP-", the text field is misnamed. -
I'm quite confident it's going to the correct port, as the file I'm presently working deals exclusively with port three on the panels.
It's quite frustrating, however, as I'm pretty sure the STRING event of DATA_EVENT[dvTPANELS] is not happening at all. I know the DATA_EVENT is fine, though, as the ONLINE events within the same DATA_EVENT are working just fine.
Any ideas on potential reasons why the keyboard would be displaying, yet nothing is getting to the Panel? I can show more code if it would help. -
Ah, well the port is definitely your problem then if you are looking at port 3. String outputs always come in on port 1, no matter how it's assigned.
-
Oh... Well then.
Is there a clever way to do a Data Event on the different port of the same device, without creating a whole new Device? For example, checking port 1 of a Device address of 10109:3:1?
If not, then suck. But thanks!
-
Yes, there is. Let's say your panel is named dvPanel and is assigned to 10109:3:1. Create a new DEV variable, and call it dvPanelBase (or whatever), then assign it as follows:
dvPanelBase.NUMBER = dvPanel.NUMBER
dvPanelBase.PORT = 1
dvPanelBase.SYSTEM = dvPanel.SYSTEM
Then trap the STRING event for dvPanelBase. -
Well, I think that's it for my questions; my code works now and I'm happy. Thanks very much, DHawthorne.
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