configuration of Cognex InSight®
Comments
-
Hi Guessmi,
ABB sell a camera together with software for configuring and training the camera in RobotStudio. It makes it much easier to get started with the camera since we tailored the user interface around robot-camera integration. You don't need to be distracted by all other ways of connecting the camera using Ethernet/IP, Modbus TCP, etc, etc.
Just define which image properties you would like to receive into your RAPID program.
It is based on the InSight technology.
Just wanted you to know that
If you already decided to use a stand alone InSight and integrate it yourself, we are happy to help you with that also.
In the user documentation of the Cognex software InSight Explorer, there is a code example in RAPID, that uses a TCP/IP socket to connect to the robot.
I don't have that manual in front of me now, but I know there is such a chapter.
Maybe you can start from there?
0 -
Hello Niklas,
Can you help me please with this issue? I have a Cognex camera ism1020, that Im trying to connect to a virtual controller, which has integrated vision installed as a optional.
I've followed the instructions defined in the Integrated vision application manual, page 50 "How to connect a camera to a virtual controller" and nothing happens, the Buttons of the Integrated Vision add-in are all greyed and are disabled to use.
Should be a camera model problem?
Best Regards,
Pablo Liberona0 -
Hi Pablo,
I'm moving this question to the RobotStudio forum (not Developer Center) since it is not about development. It was quite long time since I worked with Integrated Vision so I hope someone there can help you better.
0 -
AFAIK you can only use the Cognex 7000 line products. But not 100% sure about this!
0 -
According to the integrated vision manual all insight series cameras can be used.
The ism1020 is an insight micro series camera so it should work ( I have used a ism1401-11 camera with integrated vision).
Check your camera has power (LED is lit up) and the ethernet connections are good.
Integrated vision used to work only in the 32 bit version of RobotStudio (not sure about the latest release).
0 -
After loading the Modules (Insight.sys,Insight_Eng.sys) i get the following error:120-501410/RAPID/TASK1/INSIGHT(358,19): Reference error(75): strPart not function reference. 6/12/2018 10:01:37 PM GeneralstrPart() is a Function in the Verison of RobotStudio i am running [6.07] but since these Modules are encoded i cannot troubleshoot the error and cannot find any help topics on this either.. Any help is very much appreciated.Best regards,Alan
0 -
Hi, here is some code to talk to an insight camera that I use with our camera here. The robot will need the PC Interface software option.
MODULE VISION
! DATA DECLARATIONSPERS num nXOffs:=14.5153;
PERS num nYOffs:=-183.19;
PERS num nAngle:=70.2337;
VAR string stReceived;
VAR socketdev ComSocket;
VAR socketstatus status;
PERS tooldata tGripper:=[TRUE,[[0,0,159],[1,0,0,0]],[2,[65,0,0],[1,0,0,0],0,0,0]];
PERS tooldata tVision:=[TRUE,[[0,0,0],[0,0,0,1]],[5,[1, 0, 0],[1,0,0,0],0,0,0]];
CONST robtarget pHome:=[[0.25,305.42,484.49],[0.00177598,-0.708877,-0.705328,-0.00175862],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget pVisionPos:=[[0,0,-90],[0,1,0,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
PERS wobjdata woVisionCalib := [FALSE,TRUE,"",[[521.266,0.973149,207.66],[0.703255,-0.000254116,9.89283E-05,-0.710937]],[[0,0,0],[1,0,0,0]]];
CONST string CRLF := "\0D\0A";
PERS tooldata tPen := [TRUE,[[116.214,-1.37941,159.021],[1,0,0,0]],[3,[5,0,0],[1,0,0,0],0,0,0]];
PROC Main()
ConnectToInSight ;
MoveJ pHome,v1000,fine,tVision;
PickPart;
MoveJ [[374.23,234.12,370.69],[0.000502812,0.703317,-0.710876,0.000430593],[0,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v1000, z50, tVision;
MoveL [[374.23,234.13,265.30],[0.000461297,0.70334,-0.710853,0.000427116],[0,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v1000, fine, tVision;
Set doGripper;
MoveL [[374.23,234.12,370.69],[0.000502812,0.703317,-0.710876,0.000430593],[0,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]], v1000, z50, tVision;
MoveJ pHome,v1000,fine,tVision;
SocketClose ComSocket;
ENDPROCPROC PickPart()
GetVisionData;
MoveJ RelTool(Offs(pVisionPos,nXOffs,nYOffs,50),0,0,0\Rz:=-nAngle), v500, z20, tGripper\WObj:=woVisionCalib;
MoveL Reltool(Offs(pVisionPos,nXOffs,nYOffs,0),0,0,0\Rz:=-nAngle), v500, fine, tGripper\WObj:=woVisionCalib;
Reset doGripper;
MoveL RelTool(Offs(pVisionPos,nXOffs,nYOffs,50),0,0,0\Rz:=-nAngle), v500, z20, tGripper\WObj:=woVisionCalib;
ENDPROC
PROC GetVisionData()
VAR string XData:="";
VAR string YData:="";
VAR string AngleData:="";
VAR num NumCharacters:=9;
VAR bool bOK;
VAR bool bPartFound;nXOffs:=0;
nYOffs:=0;
nAngle:=0;bPartFound:=FALSE;
WHILE bPartFound=FALSE DO
TPErase;
TPWrite "Searching For Part";
status := SocketGetStatus(ComSocket);
IF status <> SOCKET_CONNECTED THEN
TPErase;
TPWrite "Vision Sensor Not Connected";
Return;
ENDIF! Instruct In-Sight to Acquire an Image
! and not return until complete
SocketSend ComSocket \Str:="sw8"+CRLF;
CheckStatus;
! Get the value in cell C7
SocketSend ComSocket \Str:="gvu074" + CRLF;! Read the data
SocketReceive ComSocket \Str:=stReceived;
TPWrite stReceived;
TPWrite " ";
IF StrPart(stReceived,1,3) <> "1"+CRLF THEN
TPErase;
TPWrite "Vision Error!";
Stop;
ENDIF
TPWrite "String Length="\Num:=StrLen(stReceived);
IF StrLen(stReceived)=5 + (3 * NumCharacters) THEN
TPWrite "PART FOUND!";
bPartFound:=TRUE;
ELSE
bPartFound:=FALSE;
UIMsgBox "PART NOT FOUND! Search again?";
ENDIF
ENDWHILE
stReceived := StrPart(stReceived,4,NumCharacters*3);! Parse the data string
XData:= StrPart(stReceived, 1, NumCharacters);
YData:= StrPart(stReceived, NumCharacters+1, NumCharacters);
AngleData:= StrPart(stReceived, (2*NumCharacters)+1, NumCharacters);!Convert String Data To Numerical Data
bOK:=StrToVal(XData,nXOffs);
bOK:=StrToVal(YData,nYOffs);
bOK:=StrToVal(AngleData,nAngle);
ENDPROC
PROC CheckStatus()
SocketReceive ComSocket \Str:=stReceived;
IF stReceived <> "1"+CRLF THEN
TPErase;
TPWrite "Vision Error!";
Stop;
ENDIF
RETURN;
ENDPROC
PROC ConnectToInSight()
SocketCreate ComSocket;
SocketConnect ComSocket, "10.44.160.81", 23;SocketReceive ComSocket \Str:=stReceived;
TPErase;
TPWrite stReceived;IF StrPart(stReceived,StrLen(stReceived)-5,6) <> "User: " THEN
TPErase;
TPWrite "Vision Login Error (User Prompt)";
Stop;
ENDIF! Send the Username
SocketSend ComSocket \Str:="admin"+CRLF;SocketReceive ComSocket \Str:=stReceived;
TPWrite stReceived;IF stReceived <> "Password: " THEN
TPErase;
TPWrite "Vision Login Error (Password Prompt)";
Stop;
ENDIF! Send Password
SocketSend ComSocket \Str:=CRLF;SocketReceive ComSocket \Str:=stReceived;
TPWrite "";
TPWrite stReceived;IF stReceived <> "User Logged In"+CRLF THEN
TPErase;
TPWrite "Vision Login Error (Final Login)";
Stop;
ENDIF
ENDPROCENDMODULE
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings