**Attention** : Read this resource material carefully and in its entirety before use, to ensure it is understood and used properly. Failure to properly follow the instructions in the resource materials DPAM provides may result in damage to your equipment. As a result, by using the resource materials, you are assuming the risks associated with modifying your equipment. DENSO holds no liability, implied or otherwise, for damage, injury or any legal responsibility incurred, directly or indirectly from the use of the resource materials, including any loss of data or damage to property which may occur by your use of the resource materials. The use of the resource materials are not recommended unless you have technical knowledge and functional experience with the equipment and related software. DENSO is unable to provide support, remote or otherwise, for the information included in the resource material, nor for the ancillary topics relating to the information included in the resource materials. Therefore, if you are not fully comfortable with it, we strongly recommend that you send your unit to one of our Regional Support Centers for repair. The information contained in the resource materials are subject to change at the sole discretion of DPAM.
In ORiN2 SDK, DCOM (Distributed Component Object Model) of Microsoft Corporation is adopted as a distributed object technology. The DCOM based CAO can be used from various program languages such as C++, JAVA, and Visual Basic.
This article is meant to help to gather information on resources that can help you get started with interfacing with the CAO Engine in Visual Basic. This article is not intended to aid you with programming in Visual Basic nor how to use VB6.
Tools and Parts needed
- ORiN 2 SDK Install
- PC running Windows OS
The following sample code is provided “AS IS” under the MIT License. Programming support service of Visual Basic is out of warranty. Please note that we do not provide any programming support service beyond basic setup and troubleshooting.
Please make sure that you have reviewed the ORiN 2 – Overview article and that your RC controller is properly setup. You can use the CAOTester to make sure that your PC is ready to communicate with the controller.
Setup your controller to accept messages from your PC.
Test communication using CAO Tester application
Configuring the Project to Point to the ORiN Library (CAO 1.0)
Reference Section 2.2 of the ORiN2 Programmers User Guide.
At this point you should be ready to begin programming your application to interface with your robot controller. When connecting to the controller you will need to specify the ORiN provider you are trying to use to establish communication. The provider differs based on the robot controller you are using. RC5, RC7, and RC7M controllers use the NetwoRC provider. RC8, RC8A, and COBOTTA controllers us the RC8 provider.
NetwoRC provider directory
RC8 Provider provider directory
Please consult the Owner’s manual for information on how to program your DENSO Robot or details on specific robot commands.
Programming using the Provider
The following samples are for performing various basic but essential operations. The samples are for connecting using the RC8 Provider.
For more information you can reference Section 4 RC8 Programming Using the Provider from the RC8 Provider User’s Guide PDF document.
The sample program uses the automatically created workspace and reads/writes the variable IO150 (the 150th I/O variable). IP should be set to the value for the target controller. This sample program uses following value. IP:192.168.0.1
For more information reference Section 4.1 RC8 controller variable access.
This sample code will start or stop a robot program (Pro1.pcs), also known as tasks.
- Controller must have a program named Pro1.pcs
- Controller must be set to Auto mode
For more information reference Section 4.2 Task controller with RC8 controller.
Robot Motion Sample
This sample code will turn the motor ON or OFF. When the Start Robot button is pressed the robot will Move to position P10 and then to position P11.
- Global variables P10 and P11 must have valid coordinate data
- Robot state must be set to Auto mode
For more information reference Section 4.3 Robot control with RC8 controller.
You can find Visual Basic samples in your install of the ORiN 2 SDK. Here are some recommendations:
RC8 Provider Samples
|Sample Name||Directory Path|
|Robot (Simple) (VBA)||C:\ORiN2\CAO\ProviderLib\DENSO\RC8\Samples\Simple\Robot\VBA|
|Variable (Simple) (VB6)||C:\ORiN2\CAO\ProviderLib\DENSO\RC8\Samples\Simple\Variable\VB6|
NetwoRC Provider Samples
|Sample Name||Directory Path|