Virtuals - Purpose
screenscribe
Posts: 33
In going through what AMX describes as the purpose of a virtual and what I've been reading on the boards, it sounds like the programmer community uses them in different ways that AMX may have initially intended them. The majority of posts that I've seen around virtuals seem to center around two main uses:
1) To assign a single virtual to an array of touchpanels to keep all touchpanels in sync, although it sounds like this may not be a good solution as it creates a lot network traffic as your TP count goes higher? I see a lot of commentary around using arrays instead of a single virtual.
2) Communication back and forth between your main program code and module code. It appears that using a combination of SEND_COMMAND and SEND_STRING, the virtual creates a doorway in and out of the module which can be useful for status, debugging, testing...and just keeping design more modular.
I haven't seen a lot of discussion around the positives of doing device combining which makes me wonder if I should just avoid it.
I'm sure there are other benefits around virtuals that I'm missing so I wanted to open it up for discussion.
Thanks!
Matthew
1) To assign a single virtual to an array of touchpanels to keep all touchpanels in sync, although it sounds like this may not be a good solution as it creates a lot network traffic as your TP count goes higher? I see a lot of commentary around using arrays instead of a single virtual.
2) Communication back and forth between your main program code and module code. It appears that using a combination of SEND_COMMAND and SEND_STRING, the virtual creates a doorway in and out of the module which can be useful for status, debugging, testing...and just keeping design more modular.
I haven't seen a lot of discussion around the positives of doing device combining which makes me wonder if I should just avoid it.
I'm sure there are other benefits around virtuals that I'm missing so I wanted to open it up for discussion.
Thanks!
Matthew
0
Comments
I avoid combining real devices to a virtual whenever I can; I'll use arrays for that.
Like Dave, I also use virtual devices for passing information to different masters and to/from modules. In a simple way, I can have a module turn channels on and off on a virtual device then have the main program or another master check if a channel is turned on/off easily before executing something.
--John
Or do I totally misunderstand?
Cheers,
Matthew
Cheers,
Matthew
Paul
Cheers,
Matthew