Home AMX User Forum NetLinx Studio

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 Posts: 4,177
    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 Posts: 4,584
    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.