Work with On robot RG2

I have a UR3 with an On robot RG2 gripper, how can I connect the gripper to the visual components and see its operation?

According to this manual page 22, if you have the gripper’s URCap installed you can get the current gripper pose as grip width and whether its gripping something from variables.

You can then copy those vars to general purpose output registers using a script in UR and read the values to VC using the UR RTDE connection. You may need to do some custom Python scripting on the VC side to use that information in simulation.