Home AMX Forum NetLinx Studio
Options

Data Event for Virtual Device

Do virtual devices create data events? Will this code work? The vdvVANTAGE is the virtual device for the Vantage lighting control module. I want to set the ip address every time it comes online.
DATA_EVENT[vdvVANTAGE]
{
    ONLINE:
    {
	SEND_COMMAND DATA.DEVICE, "'PROPERTY-IP_ADDRESS,192.168.1.30'"
	SEND_COMMAND DATA.DEVICE, "'REINIT'"
    }
}

Comments

  • ericmedleyericmedley Senior Member - 3709 Posts
    remeolb wrote: »
    Do virtual devices create data events? Will this code work? The vdvVANTAGE is the virtual device for the Vantage lighting control module. I want to set the ip address every time it comes online.
    DATA_EVENT[vdvVANTAGE]
    {
        ONLINE:
        {
    	SEND_COMMAND DATA.DEVICE, "'PROPERTY-IP_ADDRESS,192.168.1.30'"
    	SEND_COMMAND DATA.DEVICE, "'REINIT'"
        }
    }
    
    

    Yes, they do. But, keep in mind that they come online before most of the hardware devices do. So, if the vdv is communicating with a real device you might be sending commands to a port that hasn't come online yet.
  • DHawthorneDHawthorne Junior Member
    SEND_COMMANDs go to the device, not out the port, so those are fine in an online event. In fact, those specific commands are designed to go there. Presumably, the module is taking care of the physical port and whether it is ready.
Sign In or Register to comment.