problems with level_events
eddymouse
Posts: 67
Hi
I have a problem in my project to catch level_event, so I make a demo workspace to understand how levels work.
I have a NI-700 and a 8400 panel.
This is the code:
PROGRAM_NAME='main'
DEFINE_DEVICE
TP=10001:30:0
DEFINE_VARIABLE
DEFINE_EVENT
LEVEL_EVENT[TP,33]{
PULSE[TP,10]
}
BUTTON_EVENT[TP,10]{
PUSH:{
SEND_LEVEL 10001:30:1,33,50
PULSE[TP,10]
}
}
DEFINE_START
PULSE[TP,10]
DEFINE_PROGRAM
So, PULSE in BUTTON_EVENT works, but PULSE on LEVEL_EVENT don't works.
On the panel I have a general button with Channel port 30 and Channel Code 10 and a Bargraph with level port 30 and level code 33.
In Diagnostic I can see the level changing but the level_event don't work. Why?
Thanks
I have a problem in my project to catch level_event, so I make a demo workspace to understand how levels work.
I have a NI-700 and a 8400 panel.
This is the code:
PROGRAM_NAME='main'
DEFINE_DEVICE
TP=10001:30:0
DEFINE_VARIABLE
DEFINE_EVENT
LEVEL_EVENT[TP,33]{
PULSE[TP,10]
}
BUTTON_EVENT[TP,10]{
PUSH:{
SEND_LEVEL 10001:30:1,33,50
PULSE[TP,10]
}
}
DEFINE_START
PULSE[TP,10]
DEFINE_PROGRAM
So, PULSE in BUTTON_EVENT works, but PULSE on LEVEL_EVENT don't works.
On the panel I have a general button with Channel port 30 and Channel Code 10 and a Bargraph with level port 30 and level code 33.
In Diagnostic I can see the level changing but the level_event don't work. Why?
Thanks
0
Comments
So i need to re-download to the NI-700 and reboot.
1 times every 10 tests , if I change level on the bargraph the button pulse!
It's no possible. I hate AMX!!!!!!!!!
Why? It's not reliable
Please AMX staff, say why do It happen? It's a my error?
Thanks
- what firmware has the NI700?
- what firmware has the MVP8400?
I can't open the tp4 file from the archive, so I created my own. I tested this here with a NI3100 (firmware 3.20.371) and a MVP-8400 (v2.83.9).
The code from the syntax is ok. In the SEND_LEVEL, you use manually the address 10001:30:1. Has your master the system number1 ? Mine has not, so I first was confused why the Button_Event works but not the level update.
When I push the button w/ channel 10, the bargraph jumps to value 50, so it works like expected
When I just do a single touch anywhere on the bargraph, Button 10 pulses like expected. But because of the amount of level events when sliding on the bargraph, it may be happen that the button 10 "stays on" instead of going off after the pulse time. Is the pulse in the level event just for testing? If not, a better way may be to give the bargraph also a channel number (i.e. 11), which then is used with a BUTTON_EVENT[TP,11] for a TO[TP,10] .
Reliability has never been an issue with AMX. Understanding what is going on in situations like this is the real issue.
I don't think SEND_LEVEL by itself generates an event; the level has to actually change for an event to occur. So, if your SEND_LEVEL command sends the same value the level is already storing, nothing is going to happen.
example:
define_variable
test
define_event
button_event[dvtp,anybuttonup]push:{test+1}
button_event[dvtp,anybuttondwn]push:{test-1}
define_program
send_level dvtp,1,((test+60)*255/75)
I wrote this fast somebody edit as see fit......