define_combine and level_events
dnahman
Junior Member
Hi all,
Does you need to do combine_levels *in addition* to combine_devices? The netlinx help file is ambiguous in this respect, but I can't believe I'm the first person running into this. What am I missing?
With the code attached below:
1. The button event works.
2. The send_level to the virtual device works.
3. The level_event from the virtual device doesn't work.
Device notifications show the following when manipulating the bargraph on the panel
Line 272 (10:51:34):: Level Value From [10001:1:1] - Level 1 Value= 112
Line 273 (10:51:34):: Level Value To [34001:1:1] - Level 1 Value= 112
Line 274 (10:51:34):: Level Value To [10001:1:1] - Level 1 Value= 112
Line 275 (10:51:34):: Level Value From [10001:1:1] - Level 1 Value= 112
Shouldn't I see a Level Value to [34001:1:1]?
Running on an NI-3100 v3.41.414 and and NXT-CV7
Thanks,
David
<snip>
PROGRAM_NAME='test.combine'
define_device
dvTP = 10001:1:0
virtualTP = 34001:1:0
define_start
combine_devices(virtualTP, dvtp)
define_program
define_event
level_event [virtualTP, 1] {
send_string 0, 'level event on virtual'
}
button_event [virtualTP, 1] {
push: {
send_string 0, 'button event on virtual'
send_level virtualTP, 1, 128
}
}
level_event [dvTP, 1] {
send_string 0, 'level event on device'
}
Does you need to do combine_levels *in addition* to combine_devices? The netlinx help file is ambiguous in this respect, but I can't believe I'm the first person running into this. What am I missing?
With the code attached below:
1. The button event works.
2. The send_level to the virtual device works.
3. The level_event from the virtual device doesn't work.
Device notifications show the following when manipulating the bargraph on the panel
Line 272 (10:51:34):: Level Value From [10001:1:1] - Level 1 Value= 112
Line 273 (10:51:34):: Level Value To [34001:1:1] - Level 1 Value= 112
Line 274 (10:51:34):: Level Value To [10001:1:1] - Level 1 Value= 112
Line 275 (10:51:34):: Level Value From [10001:1:1] - Level 1 Value= 112
Shouldn't I see a Level Value to [34001:1:1]?
Running on an NI-3100 v3.41.414 and and NXT-CV7
Thanks,
David
<snip>
PROGRAM_NAME='test.combine'
define_device
dvTP = 10001:1:0
virtualTP = 34001:1:0
define_start
combine_devices(virtualTP, dvtp)
define_program
define_event
level_event [virtualTP, 1] {
send_string 0, 'level event on virtual'
}
button_event [virtualTP, 1] {
push: {
send_string 0, 'button event on virtual'
send_level virtualTP, 1, 128
}
}
level_event [dvTP, 1] {
send_string 0, 'level event on device'
}
Comments
-
What version firmware does your Netlinx master have? Firmware version .422 lists this as one of the new features:3. The level_event from the virtual device doesn't work.
*Fixed Combined Levels event error induced in build 414. -
Thank you! That was the exact problem.
Regards,
David -
Joe Hebert wrote: »What version firmware does your Netlinx master have? Firmware version .422 lists this as one of the new features:
*Fixed Combined Levels event error induced in build 414.
I see issue 3. still pertains in the latest firmware 4.1.404.
Level_Events don't trigger from the virtual device, but they do from the real panel. I'm seeing this issue on a site that was programmed years ago with the define_combine command. The guy who programmed it used old-school axcess style programming for it (no virtual device) So I attempted to fix it with a virtual device, but ran in to this issue. -
Jorde_V, what you should do to get this to work is as follows. Once wrapped into the dev variable, the level event will work. No need for define_combine for this to work. If you need to change combine-like dynamically, then you will need to specify an array size for the dev variable (example - dev dvTP[5]), populate teh array in code using virtual device first, then call rebuild_event().
define_device
dvRealTP = 10001:1:1
vdvFakeTP = 33001:1:1
define_variable
dev dvTP = {vdvFakeTP, dvRealTP}
define_event
level_event[dvTP, somelevel]
{
some code here
}
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