GUIDE: Emulate a virtual camera on a VC, RS 6.05
OskarHenriksson
mod
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
0
Comments
-
Hi Oskar,
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
0 -
Willem said:Hi Oskar,
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
1 -
Hi 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
0 -
Do you know if there is possible to use camera emulator with virtual controller? I want to send solution from camera emulator to rapid by Output to RAPID. At this moment my code stops at CamGetResult.0
-
IzaR said:Do you know if there is possible to use camera emulator with virtual controller? I want to send solution from camera emulator to rapid by Output to RAPID. At this moment my code stops at CamGetResult.
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
1 -
I have done as the guide suggests and it worked fine for a time. Today, when opening my solution, I couldn't connect to the virtual cam. I turned my firewall off, but it didn't help. I have tried both with RS 6.07 and 6.08 (32-bit). I even tried to remove the integrated option and added it again and redid the whole process, but nothing have worked. On occasion I have had this problem in the past, but it always worked fine after restarting RS. Anyone have any suggestions what might have gone wrong and how I can fix it?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
- 314 IRC5
- 60 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 794 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings