GUIDE: Emulate a virtual camera on a VC, RS 6.05

RobotStudio 6.05 can emulate a integrated vision camera, this is how you get started:
Further reading: Application Manual - Integrated vision
http://cdn.robotstudio.com/documentation/17.1/en/page8-3.html
Have Fun!
- 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><br><PORT name="SERVICE"><br><IPaddress>IP_OF_YOUR_COMPUTER(127.0.0.1 does not work)</IPaddress><br><SubnetMask>255.255.255.0</SubnetMask><br></PORT><br></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.
</code><code>!Declare robtarget, workobject, tooldata and, in case the camera is<br>
!mounted on a moving part of the robot, the imaging position.<br>
CONST robtarget myrobtarget:=[[100,200,300],[1,0,0,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];<br>
CONST robtarget myimagepos:=[[100,200,300],[1,0,0,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];<br>
TASK PERS wobjdata mywobj:=[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];<br>
PERS tooldata mytool:=[TRUE,[[0,0,1],[1,0,0,0]],[1,[0,0,0],[1,0,0,0],0,0,0]];<br>
</code><code>PROC main()<br>
MoveToDetectedObject;<br>
ENDPROC<br>
</code><code>PROC MoveToDetectedObject()<br>
!Change the camera name<br>
CamSetProgramMode VIRCAM;<br>
CamLoadJob VIRCAM, myjob;<br>
CamSetRunMode VIRCAM;<br>
</code><code>!If the camera is mounted on the robot, store this position during setup<br>
!so that the robot may always return to this position before requesting an image.<br>
!MoveL myimagepos, v100, fine, tool0;<br>
</code><code>CamReqImage VIRCAM;<br>
CamGetResult VIRCAM, mycameratarget;<br>
mywobj.oframe := mycameratarget.cframe;<br>
</code><code>!During the first cycle, run the program until this point,<br>
!then jog the tool to the desired grip position and modpos myrobtarget.<br>
MoveL myrobtarget, v100, fine, mytool \WObj:=mywobj; :)<br>
ENDPROC
</code>CONST string myjob := "myjob.job"; <code>VAR cameratarget mycameratarget;<br>
Further reading: Application Manual - Integrated vision
http://cdn.robotstudio.com/documentation/17.1/en/page8-3.html
Have Fun!

Post edited by OskarHenriksson on
Comments
We have used this before, with success.
Is it correct that you can only emulate a 800x600px camera?
Our customers often send us pictures from integrated vision when they have a problem.
When are running a 1280x1024px camera, the images cannot be used in the emulated camera.
Is there a way to overcome this problem and to emulate a 1280x1024px camera?
Thanks,
Willem
We have used this before, with success.
Is it correct that you can only emulate a 800x600px camera?
Our customers often send us pictures from integrated vision when they have a problem.
When are running a 1280x1024px camera, the images cannot be used in the emulated camera.
Is there a way to overcome this problem and to emulate a 1280x1024px camera?
Thanks,
Willem
Hi Willem
You can select camera emulator in RS options(all your systems will be affected):
Options -> Integrated vision -> Camera emulator -> Camera Model
Loading and saving images to the camera will be done in the highest resolution that camera supports.
For an example: ism 1402 has a resolution of 1280 x 1024:
http://www.cognex.com/products/machine-vision/in-sight-micro-vision-systems/specifications/
Does that work for you?
Best Regards
Oskar
I wasn't aware that more options would appear when Integrated Vision was activated.
That should do the trick for us.
Thanks a lot,
Willem
When you get a stop(forever loop) at CamGetResult you have the wrong firmware and camera combination.
Not all cameras with all types of firmware are supported, it is easy to make an invalid setup (and harder to create a working one). This will be eased in the next big release of RobotStudio.
In the meantime there is a workaround:
NOTE: RobotStudio must be connected to the virtual camera.
RobotStudio Options-> Integrated vision -> Camera Emulator -> Change version and camera model.
WORKING COMBINATIONS:
CAMERA FIRMWARE
ism1100 4.10.2
Please write here if you find another combination that works.
I hope this solves your problem!
/Oskar