Skip to main content
Skip table of contents

vs_connect(ip_addr, port_num=9999)

Features

This function establishes communication with the vision system.

Parameters

Parameter NameData TypeDefault ValueDescription

ip_addr

str

-

Server IP of vison module (ex. 192.168.137.200)

port_num

int

9999

Port Number (ex, 9999)

Return

ValueDescription

0

Connection success

-1

Connection failed

Example

PY
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
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.