Strange problem - help needed...
adys
Posts: 395
Hi all
I am after 2 days of debugging, and I can't find whats wrong in my program.
I have 3 simple buttons, port 20 channels 851,852,853
no matter what I do, I get them on/off
and its worked before, something happened in my system (not code changes)
I am checking the on state in TPDesign, its working.
But even with "control device" from the netlinx I cant make it work...
this mechanism is the heart of my home control (choosing Flores) and I don't know what to do... I tired to change the channels, not helping.
this is the code:
BUTTON_EVENT[tpList, FLOOR_BASE_BUTTON_LISTEN]
{
PUSH:
{
DEV Panel
Panel = tpList[get_last(tpList)]
on[Panel, FLOOR_BASE_BUTTON_LISTEN]
off[Panel, FLOOR_GROUND_BUTTON_LISTEN]
off[Panel, FLOOR_UPPER_BUTTON_LISTEN]
off[Panel, FLOOR_GARDEN_BUTTON_LISTEN]
SEND_COMMAND Panel,"'@PPN-Map House Base Listen'" // show popup
} // END OF - PUSH
}
The debugger is getting to this code!
from the same button that i am trying to turn on...
I added the code :
[Panel, FLOOR_BASE_BUTTON_LISTEN] = 1
[Panel, FLOOR_GROUND_BUTTON_LISTEN] = 1
[Panel, FLOOR_UPPER_BUTTON_LISTEN] = 1
[Panel, FLOOR_GARDEN_BUTTON_LISTEN] = 1
not helping...
I tried "panelList" instead of Panel - not helping...
the notification windows give me that:
Line 8 (20:27:23):: Input Status:Pushed [10007:20:6] - Channel 851
Line 9 (20:27:23):: Command To [10007:20:6]-[@PPN-Map House Upper Listen]
Line 10 (20:27:23):: Input Status:Released [10007:20:6] - Channel 851
and I don't get the turn on channels command...
But the popup page is changing to the appropriate page...
Whats is going on here??
I am getting crazy...
Any help will be appreciated.
Thanks
Ady.
I am after 2 days of debugging, and I can't find whats wrong in my program.
I have 3 simple buttons, port 20 channels 851,852,853
no matter what I do, I get them on/off
and its worked before, something happened in my system (not code changes)
I am checking the on state in TPDesign, its working.
But even with "control device" from the netlinx I cant make it work...
this mechanism is the heart of my home control (choosing Flores) and I don't know what to do... I tired to change the channels, not helping.
this is the code:
BUTTON_EVENT[tpList, FLOOR_BASE_BUTTON_LISTEN]
{
PUSH:
{
DEV Panel
Panel = tpList[get_last(tpList)]
on[Panel, FLOOR_BASE_BUTTON_LISTEN]
off[Panel, FLOOR_GROUND_BUTTON_LISTEN]
off[Panel, FLOOR_UPPER_BUTTON_LISTEN]
off[Panel, FLOOR_GARDEN_BUTTON_LISTEN]
SEND_COMMAND Panel,"'@PPN-Map House Base Listen'" // show popup
} // END OF - PUSH
}
The debugger is getting to this code!
from the same button that i am trying to turn on...
I added the code :
[Panel, FLOOR_BASE_BUTTON_LISTEN] = 1
[Panel, FLOOR_GROUND_BUTTON_LISTEN] = 1
[Panel, FLOOR_UPPER_BUTTON_LISTEN] = 1
[Panel, FLOOR_GARDEN_BUTTON_LISTEN] = 1
not helping...
I tried "panelList" instead of Panel - not helping...
the notification windows give me that:
Line 8 (20:27:23):: Input Status:Pushed [10007:20:6] - Channel 851
Line 9 (20:27:23):: Command To [10007:20:6]-[@PPN-Map House Upper Listen]
Line 10 (20:27:23):: Input Status:Released [10007:20:6] - Channel 851
and I don't get the turn on channels command...
But the popup page is changing to the appropriate page...
Whats is going on here??
I am getting crazy...
Any help will be appreciated.
Thanks
Ady.
0
Comments
I think that the Panel Array, tplist, would be treated as a virtual, but I could be wide of the mark here...
Try SET_VIRTUAL_CHANNEL_COUNT (tplist,1024) in the online data event
HTH
Jeff
Its for the tps, does not matter the port I am setting, right?
SET_VIRTUAL_CHANNEL_COUNT (Panel,1024)
very strange.
I moved the buttons a bit to see if I am loading the page I am thinking, and now -
some of the tps are working, some are not.
I removed user pages, load them all, I am getting the low memory message.
after that, loading them with smart transfer on is loading them ok, but still some of them are working and some are not... even I treat all of them the same...
I am after 14 hours on this bug, and I don't know what to do...
the browse windows list is not changing its states upon selection...
after rebooting the controller and then the TP, its ok..
Maybe its the same symptom to the same problem\?
Hello Ady,
I see that youre using port 20. If you're using a virtual device did you use SET_VIRTUAL_PORT_COUNT (tpList,20) ? virtual devices have default only one port.
If this works you may thank Auser, who triggered this idea in another thread
Regards
Richard
Thanks
I don't undestand this part...
this is not a virtual device, its a Device. Its a list of panel devices declared like this:
// my touch panel devices
dvTPStudyRoom = 10001:20:1
dvTPFamilyRoom = 10002:20:2
dvTPKitchenRoom = 10006:20:2
dvTPGymRoom = 10003:20:3
dvTPJaccuziRoom = 10005:20:3
dvTPBedRoom = 10004:20:4
dvTPSalonRoom = 10007:20:6
dvTPEntranceRoom = 10008:20:6
dvTPBillYardRoom = 10009:20:9
dvTPCinemaRoom = 10010:20:10
// Touch panel devices
DEV tpList[TP_MAX] =
{
dvTPStudyRoom,
dvTPFamilyRoom,
dvTPKitchenRoom,
dvTPGymRoom,
dvTPJaccuziRoom,
dvTPBedRoom,
dvTPSalonRoom,
dvTPEntranceRoom,
dvTPBillYardRoom,
dvTPCinemaRoom
}
So do I need to set the virtual device count or not?
Like Adys these are normal devices and as in a previous thread it is again for HomeWorks. I guess cuz not to much else needs over 1240 channels like this code uses.
My first thought was this or another recent thread and the need to SET_VIRTUAL_CHANNEL_COUNT but since these aren't virtuals I figured I'd try something else.
I'm using a TP device array and a button array in my DEFINE_EVENT with a GET_LAST after the push. Buttons as high as 708 seem to work but since I don't have more button higher before the next group of higher button I don't know where the cut off is. The button in the next higher group starting at 1093 don't work. If I enable the Push message display in NS2 they display but nothing in notifications. Hmmm?
GET_LAST? Always seemed to work before and this code is several years old and use to work so I change the button event from the original (use to work/now non working): to (works):
So it appears to be something in the GET_LAST function or my button array itself, but the array looks fine all 1240 entries w/o any missing blocks or commas out of place. Is it possible the GET_LAST function was changed in a recent firmware upgrade or maybe the compiler changed in the way it compiles it?
It appears at least in my case setting virtual counts aren't going to help cuz the system sees the pushes, it just doesn't make it through the GET_LAST.
Hmmm!!
Given
DEV TPs[x] = {tp1,tp2,tpx}
INTEGER Buttons[y] = {1,2,y}
BUTTON_EVENT[TPs,Buttons]
x * y must be <= 4000
To answer your question though I have 4 TPs presently which would put me over the limit. So what's the work around if this is the problem. I could leave it the way it is [dvTPArry,0] but if I recall there are hold issues or something using the 0.
Two possible ways are to either split up the DEV array or to split up the channel array.
So instead of doing this:
You can do this:
or this:
It's not a total limit of 4000 event triggers, it's 4000 per event table. Yes, every button counts, but it should be rare that you are putting every single button in the project in the same BUTTON_EVENT.
So, what we're saying is something like this:
This is 5 touch panels times 1000 buttons for a grand total of 5000 possible button permutations.This is not going to work? How will its 'not working' manifest itself?
BUTTON_EVENT[TP_DEV[1], TP_BUTTONS] ...
BUTTON_EVENT[TP_DEV[2], TP_BUTTONS] ...
It would be fine.
I've only had this situation arise once, and it gave me fits until I figured it out ... and I only had a hunch my event table was too big. In that case, I simply broke the button array in half, and all was well. This is one of those cases where you would be well served to call a function from the event rather than putting the code in your PUSH handler. Since I've had that particular problem, I have made it a point not to have huge event arrays, and break them up by function so that I can add panels easily without blowing anything up.
So, would the following work?
This now works fine. It seems the fourth TP just pushed me over the edge and since I haven't yet installed any more than 3 TPs on a job this hasn't been an issue.
I'll have to keep this in mind now as this will no doubt effect many modules should I start doing larger systems which I'm hoping will eventually happen.
Thanks Dave, Joe. You guys once again saved me from many bumps and bruises from banging my my head against the wall.
I haven't tried it .. I would assume that they are separate events in that case and would be OK; it's just a shortcut syntax. But I think you would have to try it and see.
I'm going to take a chance and say it does work. I have Lutorn HomeWorks module I wrote that will accomodate upto 200 Keypads and 25 buttons each. The button address on the touch panel determine which light button you're addressing. I use all the buttons on 1 port of the touch panels strictly for this module (port 5 for those playing the home game...)
I quite often have 10 or more touch Modero touch panels and if I use other things like CP4As or other G3 type devices, I then map them to a viurtual device and map it to the Lutron module.
I can have 20-30 TPs (virutal or real) all addressing the 3999 buttons at my disposal. I wirte the button_event as I've described.
While I've never had that many keypads to deal with yet, I just tested a system and using the emulator pushed one of those top keypads. The module did fire and sent the correct command. (obviously, it was erroneous since there was no keypad really there to fire.) This worked for both the highest button numbers and the remotes address of touch panel.
interesting...
6 touch panels
1001 buttons for this particular device port
System MAX of 4000 triggered events per event table.
Events = #TPs per EVENT_TABLE * number of buttons per EVENT TABLE.
In this scenario the code below is probably the best way to handle this with each event table consisting of 1001 possible event triggers.
This won't work since we have 7 TP in the EVENT TABLE * 1001 buttons which equals 7007 possible event triggers. The 1st 3 panels will work completely, the 4th panel will work up to button 997 and the last 2 panels shouldn't work at all. Of course that might not be exactly what happens but something close. Maybe when the event table is created it gets divided equeally with all getting 666 possible triggers.
Now what happens if you use "0" the catch all type of event? Does the use of 0 mean the event table is created for the total possible event triggers.
If you had 1 TP you could have 4000 event triggers and you could catch all button numbers up to 4000.
If you had 2 TPs the system would create 2000 event triggers and you could catch all button numbers up to 2000.
If you had 6 TPs the system would create 666 event triggers and you could catch all button numbers up to 666.
How exactly would this work? Like I described or something else?
Would each of these event table be maxed at 4000 and subsequently use all those resources.
Would this have similar issues as before but possibly only the 1st panel working using all 4000 events or would they each get 666 events each. Hows does it work?