If you are connecting to the second or third robot (lab=2, lab=3), you need to change the TCP port using the following command:
r'portnumber 3331 ; for lab=2 r'portnumber 3332 ; for lab=3 r'portnumber 3333 ; for simulated robot 1 r'portnumber 3334 ; for simulated robot 2Note: the default port (that you normally do not need to specify) is 7123.