vs_connect(ip_addr, port_num=9999)
Features
This function establishes communication with the vision system.
Parameters
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
ip_addr | str | - | Server IP of vison module (ex. 192.168.137.200) |
port_num | int | 9999 | Port Number (ex, 9999) |
Return
Value | Description |
---|---|
0 | Connection success |
-1 | Connection failed |
Example
vs_set_info(DR_VS_COGNEX) #Vision type information setting
vs_connect("192.168.137.10") #Connect to vision - Vision IP, Default port
# Enter your task
vs_disconnect() #Disconnect to vision