Difference between pages "TETRIX Motor Controller" and "Building License Installation - 4.0"

From ROBOTC API Guide
(Difference between pages)
Jump to: navigation, search
 
 
Line 1: Line 1:
<yambe:breadcrumb self="Motor Controller">TETRIX|TETRIX</yambe:breadcrumb>
+
=== Building License Installation - ROBOTC 4.0 ===
<br />
+
{|
 
+
{{tl|1|}}
+
<br />
+
 
+
== Information ==
+
{| class="wikiText"
+
 
|-
 
|-
|The HiTechnic Motor Controller allows you to drive two 12V motors and read values from two shaft encoders.
+
|There is a special type of ROBOTC license called a Building License . These licenses do not require an online activation but rather have a unique building license file that must be installed with the software in order for ROBOTC to work properly. The building license file is stored on the ROBOTC Customer Service server and can be accessed by the end user at any time. To do so, you will need to:
 
|-
 
|-
|}
+
|
<br />
+
* Download the latest version of ROBOTC
 
+
* Install ROBOTC
== Configuration ==
+
* Download the building license file from the ROBOTC Customer Service page
{| class="wikiText"
+
* Install and activate the building license file
 +
* Run ROBOTC as an administrator
 
|-
 
|-
|Once your HiTechnic DC Motor Controller is configured in the "TETRIX Controllers" tab of the Motors and Sensor Setup screen, you can use the Motors tab of the Motors and Sensors Setup to configure your motors.
+
|<br />
 
+
[[File:tetrix_motors_1.png]]
+
 
|-
 
|-
 
|}
 
|}
<br />
 
  
=== Port ===
+
== Download the latest version of ROBOTC ==
{| class="wikiText"
+
{|
 +
|Before we start programming in ROBOTC, we need to first download and install the client. This can be done by navigating to ROBOTC's website ( http://www.robotc.net) and selecting the 'Downloads' tab.
 
|-
 
|-
|The name of the motor. NXT motors are given names "motorA" through "motorC". The TETRIX DC motors are named based on how they're connected to the NXT. The port name can be used to reference a motor in your program (i.e. <span class="keywordB">motor</span><span class="codePunc">[</span><span class="codeStringsNums">motorC</span><span class="codePunc">] = </span><span class="codeBasic">speed</span><span class="codePunc">;</span>)
+
|'''1)''' From the ROBOTC website, select the individual robotics platform you wish to program on. If you want to use multiple platforms or accidentally download the wrong version, you can manually activate and choose another platform thorugh the ROBOTC program. When you get to the correct platform page, click on the 'Download ROBOTC for X version x.xx' to start the download process:
 
+
The TETRIX motor names can be translated as follows:<br />
+
<span class="codeStringsNums">mtr_S1_C1_1</span> - Motor (mtr) on Sensor Port 1 (S1) connected on the first controller (C1) in the daisy chain attached to Motor Port 1 (1)<br />
+
<span class="codeStringsNums">mtr_S1_C1_2</span> - Motor (mtr) on Sensor Port 1 (S1) connected on the first controller (C1) in the daisy chain attached to Motor Port 2 (2)
+
 
|-
 
|-
|}
+
|<br />
<br />
+
 
+
=== Name ===
+
{| class="wikiText"
+
 
|-
 
|-
|Motors can be given more descriptive names, such as "LeftMotor" or "FrontMotor". This name is an alias for the motor port name, so you can use it anywhere you want to specify that motor. The first two configured TETRIX motors are given the names "motorD" and "motorE" by default,  but these names can be changed based on your preference.
+
|[[File:Install_Download_Firefox.png]]
 
|-
 
|-
|}
+
|<br />
<br />
+
 
+
=== Type ===
+
{| class="wikiText"
+
 
|-
 
|-
|This allows you to set the type of motors, wether they are 12V DC motors or NXT motors.
+
|[[File:Install_Download_IE.png]]
 
|-
 
|-
|}
+
|<br />
<br />
+
 
+
=== PID Control ===
+
{| class="wikiText"
+
 
|-
 
|-
|This checkbox enables the PID Speed Control functionality for a motor. The TETRIX DC motors don't have built-in encoders, so they must first be installed to use this feature.
+
|'''2)''' At this point click the 'Save' button to start downloading ROBOTC. You may get a warning pop-up from either Windows, your antivirus program, or both. This is to warn you that some programs downloaded from the internet can be malicious and to use care before running them; click allow to start the download.  
 
|-
 
|-
 +
|<br />
 
|}
 
|}
<br />
 
  
=== Reverse ===
+
== Installing and Uninstalling ROBOTC ==
{| class="wikiText"
+
 
 +
=== Installing ===
 +
{|
 +
|'''1)''' Once the program is done downloading, navigate to the Downloads folder on your computer and start the ROBOTC installer. You may have to right click on the installer and select the "Run as Administrator" depending on individual computer restrictions; ROBOTC must be installed with administrator privileges.
 
|-
 
|-
|This checkbox will reverse the direction of a motor in an entire program. This is useful when motors are installed opposite one another. Instead of giving one motor a positive power level and the other motor a negative power level to make the robot move forward, both can be given a positive power level, simplifying your code.
+
|<br />
 
|-
 
|-
|}
+
|[[File:Install_Normal.png]]
<br />
+
 
+
== ROBOTC Functions ==
+
{| class="wikiText"
+
 
|-
 
|-
|
+
|<br />
 
|-
 
|-
|}
+
|'''2)''' Before you can proceed, you must read over and accept the End User License Agreement. If you agree to the End User Agreement, check the "I accept" and then the "Next" button to continue the installation.
=== bMotorReflected ===
+
{| style="color:black;" width="100%" cellpadding="5%" cellspacing="0" border="0"
+
 
|-
 
|-
| class="variableType"| <span class="bigKeywordBI">bool </span><span class="bigKeywordB">bMotorReflected</span>
+
|<br />
 
|-
 
|-
| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_bool|bool]]) Boolean array. Used to indicate that the direction of a motor should be reflected 180 degrees. Useful when mechanical design results in a logical "reversed" condition of a motor.  This can also be configured in the Motors and Sensor Setup menu in ROBOTC.
+
|[[File:Install_End_User.png]]
 
|-
 
|-
|
+
|<br />
  {|
+
  |-
+
  |<syntaxhighlight lang="robotc">
+
bMotorReflected[motorD] = true;  // motor D WILL be reflected 180 degrees
+
bMotorReflected[motorD] = false;  // motor D will NOT be reflected 180 degrees
+
</syntaxhighlight>
+
  |-
+
  |}
+
 
|-
 
|-
|}
+
|'''3)''' Next, select where you would like ROBOTC to install to. The default location is C:/Program Files (x86)/Robomatter Inc/ROBOTC Development Environment.
<br />
+
 
+
=== motor ===
+
{| style="color:black;" width="100%" cellpadding="5%" cellspacing="0" border="0"
+
 
|-
 
|-
| class="variableType"| <span class="bigKeywordBI">int </span><span class="bigKeywordB">motor</span><span class="bigCodePunc">[</span><span class="bigCodeBasic">tMotor motor</span><span class="bigCodePunc">]</span>
+
|<br />
 
|-
 
|-
| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_int|int]]) Contains the motor power or speed level (-100 to +100). Negative values are reverse; positive formward. A power level of 0 (zero) stops the motors.
+
|[[File:Install_Select_Directory.png]]
 
|-
 
|-
|
+
|<br />
  {| class="parameterTable" cellpadding="5%" width="100%"
+
  ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Parameter
+
  ! width="60%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Explanation
+
  ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Data Type
+
  |-
+
  | style="border-style: solid; border-width: 1px 0px 0px 0px"|''motor''
+
  | style="border-style: solid; border-width: 1px 0px 0px 0px"|A motor port or name
+
  | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_tMotor|tMotor]]
+
  |-
+
  |}
+
 
|-
 
|-
|
+
|'''4)''' The installer will ask you to confirm your settings. If everything looks correct, click "Install" to being the installation process. The installer will then begin copying files from the installer to your computer. Please wait until this is complete.<br />
  {|
+
  |-
+
  |<syntaxhighlight lang="robotc">
+
motor[motorD] = 100;  // motor D is given a power level of 100 (forward)
+
motor[motorD] = -100;  // motor D is given a power level of -100 (reverse)
+
</syntaxhighlight>
+
  |-
+
  |}
+
 
|-
 
|-
 +
|<br />
 +
|-
 +
|[[File:Install_Install_Progress.png]]
 +
|-
 +
|<br />
 +
|-
 +
|'''5)''' The installer will inform you when the installation is complete. Click the "Finish" button to complete your install.<br />
 +
|-
 +
|<br />
 +
|-
 +
|[[File:Install_Complete.png]]
 +
|-
 +
|<br />
 +
|-
 +
|'''6)''' Right-Click on the ROBOTC icon and select "Run as Administrator" to run ROBOTC as an administrator (assuming the user account has administrator privileges). You will only need to do this one time.<br />
 +
|-
 +
|<br />
 +
|-
 +
|[[File:Install_Run_Admin.png]]
 +
|-
 +
|<br />
 +
|-
 +
|Depending on which platform you are installing, ROBOTC may also install additional drivers unique to each platform. If for any reason the drivers are not downloaded and installed properly they can be downloaded and installed manually from the [http://www.robotc.net/download/ ROBOTC website.]
 
|}
 
|}
<br />
 
  
=== nMotorEncoder ===
+
 
{| style="color:black;" width="100%" cellpadding="5%" cellspacing="0" border="0"
+
== Download the ROBOTC Building License File ==
 +
{|
 +
|'''1)''' Navigate to the [https://secure.softwarekey.com/solo/customers/Default.aspx ROBOTC Customer Service page] and log in using your Customer ID and Password (this information will be sent to you in a confirmation email after purchasing a ROBOTC Building License).
 
|-
 
|-
| class="variableType"| <span class="bigKeywordBI">long </span><span class="bigKeywordB">nMotorEncoder</span>
+
|<br />
 
|-
 
|-
| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_long|long]]) Current value of the motor encoder. Range is -32768 to 32767 so it will "wrap" after about ~90 revolutions. The user's program should reset the value of the encoder often to avoid the value "resetting" itself when the maximum distance is met.
+
|[[File:Building License Login.png]]<br />
 
|-
 
|-
|
+
|<br />
  {|
+
|-
  |-
+
|'''2)''' Select the "Licenses and Activations" icon to view all of the licenses tied to that Customer ID.
  |<syntaxhighlight lang="robotc">
+
|-
nMotorEncoder[motorD] = 0;          // reset the Motor Encoder of Motor D
+
|<br />
while(nMotorEncoder[motorD] < 360)  // while the Motor Encoder of Motor D has not yet reached 360 counts:
+
|-
{
+
|[[File:Building License Select.png]]<br />
  motor[motorD] = 75;                // motor D is given a power level of 75
+
|-
  motor[motorE] = 75;                // motor E is given a power level of 75
+
|<br />
}
+
|-
motor[motorD] = 0;                  // motor D is given a power level of 0 (stop)
+
|'''3)''' Select the correct Building License File from the list of available licenses (in this example, a ROBOTC for VEX Robotics 4.0 Building License file).
motor[motorE] = 0;                  // motor E is given a power level of 0 (stop)
+
|-
</syntaxhighlight>
+
|<br />
  |-
+
|-
  |}
+
|[[File:Building License Select2.png]]<br />
 +
|-
 +
|<br />
 +
|-
 +
|'''4)''' Click the 'Download License File' button to download the license file to your computer.
 +
|-
 +
|<br />
 +
|-
 +
|[[File:Building License Download.png]]<br />
 +
|-
 +
|<br />
 +
|-
 +
|To activate ROBOTC with a building license, download and run the installer as normal. Once the program is installed, copy the building license file into the ROBOTC directory (typically C:/Program Files (x86)/Robomatter Inc/ROBOTC Developement Environment).
 +
|-
 +
|<br />
 +
|-
 +
|[[File:Building_License_Location.png]]
 +
|-
 +
|One of the advantages of building licenses is that they help make automated installs easy. To roll out ROBOTC to multiple computers using a building license, make sure the base image has ROBOTC installed and the building license files in the correct directory. As long as those two conditions are met, ROBOTC should be active on each computer the image is rolled out to with no futher action required.
 +
|-
 +
|<br />
 +
|-
 +
|There is, however, an exception. If ROBOTC is being run from a centralized network, each computer that needs to access ROBOTC must also install a Network Dependencies package (available from the ROBOTC downloads page). The building license file must also be properly installed on the network in order for networked computers to access ROBOTC.
 
|-
 
|-
 
|}
 
|}
<br />
 

Revision as of 15:40, 14 May 2014

Building License Installation - ROBOTC 4.0

There is a special type of ROBOTC license called a Building License . These licenses do not require an online activation but rather have a unique building license file that must be installed with the software in order for ROBOTC to work properly. The building license file is stored on the ROBOTC Customer Service server and can be accessed by the end user at any time. To do so, you will need to:
  • Download the latest version of ROBOTC
  • Install ROBOTC
  • Download the building license file from the ROBOTC Customer Service page
  • Install and activate the building license file
  • Run ROBOTC as an administrator

Download the latest version of ROBOTC

Before we start programming in ROBOTC, we need to first download and install the client. This can be done by navigating to ROBOTC's website ( http://www.robotc.net) and selecting the 'Downloads' tab.
1) From the ROBOTC website, select the individual robotics platform you wish to program on. If you want to use multiple platforms or accidentally download the wrong version, you can manually activate and choose another platform thorugh the ROBOTC program. When you get to the correct platform page, click on the 'Download ROBOTC for X version x.xx' to start the download process:

Install Download Firefox.png

Install Download IE.png

2) At this point click the 'Save' button to start downloading ROBOTC. You may get a warning pop-up from either Windows, your antivirus program, or both. This is to warn you that some programs downloaded from the internet can be malicious and to use care before running them; click allow to start the download.

Installing and Uninstalling ROBOTC

Installing

1) Once the program is done downloading, navigate to the Downloads folder on your computer and start the ROBOTC installer. You may have to right click on the installer and select the "Run as Administrator" depending on individual computer restrictions; ROBOTC must be installed with administrator privileges.

Install Normal.png

2) Before you can proceed, you must read over and accept the End User License Agreement. If you agree to the End User Agreement, check the "I accept" and then the "Next" button to continue the installation.

Install End User.png

3) Next, select where you would like ROBOTC to install to. The default location is C:/Program Files (x86)/Robomatter Inc/ROBOTC Development Environment.

Install Select Directory.png

4) The installer will ask you to confirm your settings. If everything looks correct, click "Install" to being the installation process. The installer will then begin copying files from the installer to your computer. Please wait until this is complete.

Install Install Progress.png

5) The installer will inform you when the installation is complete. Click the "Finish" button to complete your install.

Install Complete.png

6) Right-Click on the ROBOTC icon and select "Run as Administrator" to run ROBOTC as an administrator (assuming the user account has administrator privileges). You will only need to do this one time.

Install Run Admin.png

Depending on which platform you are installing, ROBOTC may also install additional drivers unique to each platform. If for any reason the drivers are not downloaded and installed properly they can be downloaded and installed manually from the ROBOTC website.


Download the ROBOTC Building License File

1) Navigate to the ROBOTC Customer Service page and log in using your Customer ID and Password (this information will be sent to you in a confirmation email after purchasing a ROBOTC Building License).

Building License Login.png

2) Select the "Licenses and Activations" icon to view all of the licenses tied to that Customer ID.

Building License Select.png

3) Select the correct Building License File from the list of available licenses (in this example, a ROBOTC for VEX Robotics 4.0 Building License file).

Building License Select2.png

4) Click the 'Download License File' button to download the license file to your computer.

Building License Download.png

To activate ROBOTC with a building license, download and run the installer as normal. Once the program is installed, copy the building license file into the ROBOTC directory (typically C:/Program Files (x86)/Robomatter Inc/ROBOTC Developement Environment).

Building License Location.png
One of the advantages of building licenses is that they help make automated installs easy. To roll out ROBOTC to multiple computers using a building license, make sure the base image has ROBOTC installed and the building license files in the correct directory. As long as those two conditions are met, ROBOTC should be active on each computer the image is rolled out to with no futher action required.

There is, however, an exception. If ROBOTC is being run from a centralized network, each computer that needs to access ROBOTC must also install a Network Dependencies package (available from the ROBOTC downloads page). The building license file must also be properly installed on the network in order for networked computers to access ROBOTC.