There is a situation where you can connect to a DVT camera, but when you power cycle or reset the controller and try to connect again, with the same settings, the connection attempt will fail. This failure is caused by the DVT camera still thinking that the controller is connected. The connection from a controller (6K, GT6K or GV6K) to a DVT camera does not use any watchdog functionality, but does depend on the inherent TCP/IP connection checking. This checking can take minutes or theoretically hours, to flag either end of the connection there is a problem. So, by the time the controller powers back up, the DVT has not timed the connection out and still thinks the controller is connected. In this state, the DVT will not allow another connection from the controller.
There are two workaround for this issue. The first is to wait until the DVT connection times out before attempting to connect from the controller. From our testing this seems to take about 2 to 3 minutes, but could be much longer.
The second workaround is a little more practical for most applications. When the controller attempts to connect to the DVT and the DVT already thinks the connection is open, the controller tells the DVT to sever the connection. This means that the next connection attempt will work, assuming all the settings are correct. So, the second workaround is to put successive NTCONN commands; one that will sever the connection and the other to connect. Below is an example of the required code.
;ATTEMPT FIRST CONNECTION
;ATTEMPT SECOND CONNECTION
When using the above code, if the DVT and controller are connected when a reset or power cycle occurs, then the first connection attempt will fail but reset the connection on the DVT end and the second connection will be successful.
When using the above code, if the DVT and controller are not connected when a reset or power cycle occurs then the first connection attempt will be successful and the second will create a command error since the connection is already open. If the command error is not desirable then an IF statement, using the NTS register to find out if the connection failed or not, could be used to bypass the second attempt.