M2M SET_VIRTUAL_LEVEL_COUNT
RicardoSiqueira
Posts: 373
I have a project with Master to Master communications (M2M) and I am having a problem with the levels above 8 on the virtual device on the 2nd Master. I am tracking 38 levels. The device is an Autopatch Precis 18x18. On the Main Master (0:1:1) the levels work beautifully, but on the 2nd Master (0:1:2), the levels don't update correctly after a power cycle (hard reboot) on both masters.
I ended up doing a 6 min wait on the Main Master (0:1:1) to allow the system to read all levels from the Autopatch and then I am forcing a reboot on the 2nd Master (0:1:2) so when it comes online the levels are already read and updated on the Main Master. On the 2nd Master I am defining the Virtual device and using the call below at DEFINE_START:
If I load the 1st Master with code updates it works and the 2nd Master gests the Levels correctly. But after a power cycle of both Masters the Main Master (0:1:1) gets all the levels, but the 2nd Master (0:1:2) only shows the first 8 levels. For some reason the SET_VIRTUAL_LEVEL_COUNT is not working properly. Any ideas or suggestions? Should I define the SET_VIRTUAL_LEVEL_COUNT somewhere else? I am defining the SET_VIRTUAL_LEVEL_COUNT only on the 2nd Master (0:1:2).
Thanks,
Ricardo
I ended up doing a 6 min wait on the Main Master (0:1:1) to allow the system to read all levels from the Autopatch and then I am forcing a reboot on the 2nd Master (0:1:2) so when it comes online the levels are already read and updated on the Main Master. On the 2nd Master I am defining the Virtual device and using the call below at DEFINE_START:
//This call is on the Main Master where Autopatch is connected to: DEFINE_EVENT DATA_EVENT [0:1:0] //MAIN CONTROLLER ONLINE EVENTS { ONLINE: { { //Reboot other controllers to keep feedback in sync for Autopatch Audio and Other virtual Devices WAIT 3600 //Wait 6 Minutes to give Autopatch time to INIT and report levels { REBOOT (0:1:2) //NI-4100 Controller have 2 other TPs defined locallly. } } } } //This code is on the 2nd Master (0:1:2) DEFINE_DEVICE //Duet Devices from System 1 - NXF vdvAutopatchAudioDevice1 = 41001:1:1 // VIRTUAL DEVICE - Autopatch 18x18 DEFINE_START SET_VIRTUAL_LEVEL_COUNT(vdvAutopatchAudioDevice1, 38) //I have also tried this instead and with the DEFINE_START call with the same results: DATA_EVENT[vdvAutopatchAudioDevice1] // Listen the APDuet module to come online { ONLINE: { //Virtual devices default with 255 channels, 8 levels, and 1 port //Increase level count from 8 to 38 to support all levels on other Masters Wait 1200 { SET_VIRTUAL_LEVEL_COUNT(vdvAutopatchAudioDevice1, 38) } Wait 100 { DO_PUSH(dvTP_Audio13,180) // Refresh Levels } } }
If I load the 1st Master with code updates it works and the 2nd Master gests the Levels correctly. But after a power cycle of both Masters the Main Master (0:1:1) gets all the levels, but the 2nd Master (0:1:2) only shows the first 8 levels. For some reason the SET_VIRTUAL_LEVEL_COUNT is not working properly. Any ideas or suggestions? Should I define the SET_VIRTUAL_LEVEL_COUNT somewhere else? I am defining the SET_VIRTUAL_LEVEL_COUNT only on the 2nd Master (0:1:2).
Thanks,
Ricardo
0
Comments
Why wouldn't you set the level count on the device the module is running on? I'm really confused why you're using M2M to set a level count - it makes no sense to me.
If the module is on master 1 then in master 1's define_start put the level count in its define start and remove all other instances of rebooting and whatnot - it seems unnecessary.
41001:1:1
41001:2:1
41001:3:1
....
You can also send the refresh command to the base device after a reboot of the second system just to make sure everything is updated.