RobotStudio 6.05 can emulate a integrated vision camera, this is how you get started:
- Start RobotStudio(integrated vision is 32 bit only)
- Create a system with the integrated vision option
- Edit the file ctrl-name/IV/vc_network_definition.xml and make sure the service port has the following
<VC_NETWORK_DEF>
<PORT name="SERVICE">
<IPaddress>IP_OF_YOUR_COMPUTER(127.0.0.1 does not work)</IPaddress>
<SubnetMask>255.255.255.0</SubnetMask>
</PORT>
</VC_NETWORK_DEF>
- Warmstart the VC, an unconfigured camera should show up
- Connect to the camera and rename it(useful if you want to communicate with it in RAPID)
- Warmstart the VC, the camera shall have the new name, connect to it.
SIMPLE RAPID COMMUNICATION(There are more snippets inside RS):
CONST string myjob := "myjob.job";
VAR cameratarget mycameratarget;
!Declare robtarget, workobject, tooldata and, in case the camera is
!mounted on a moving part of the robot, the imaging position.
CONST robtarget myrobtarget:=[[100,200,300],[1,0,0,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
CONST robtarget myimagepos:=[[100,200,300],[1,0,0,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
TASK PERS wobjdata mywobj:=[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];
PERS tooldata mytool:=[TRUE,[[0,0,1],[1,0,0,0]],[1,[0,0,0],[1,0,0,0],0,0,0]];
PROC main()
MoveToDetectedObject;
ENDPROC
PROC MoveToDetectedObject()
!Change the camera name
CamSetProgramMode VIRCAM;
CamLoadJob VIRCAM, myjob;
CamSetRunMode VIRCAM;
!If the camera is mounted on the robot, store this position during setup
!so that the robot may always return to this position before requesting an image.
!MoveL myimagepos, v100, fine, tool0;
CamReqImage VIRCAM;
CamGetResult VIRCAM, mycameratarget;
mywobj.oframe := mycameratarget.cframe;
!During the first cycle, run the program until this point,
!then jog the tool to the desired grip position and modpos myrobtarget.
MoveL myrobtarget, v100, fine, mytool \WObj:=mywobj; :)
ENDPROC
Further reading: Application Manual - Integrated vision
http://cdn.robotstudio.com/documentation/17.1/en/page8-3.html
Have Fun! ![]()