Difference between revisions of "External Linear Axis in CPRog v980-10-XXX"
From Wiki
m (Peter moved page External Linear Axis to External Linear Axis in CPRog v980-10-XXX: diffrerentiation between CPRog versions) |
|||
(16 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
Configure rotary switch on the stepper motor module to the next available address: | Configure rotary switch on the stepper motor module to the next available address: | ||
− | * If configured as 4th axis, the switch on the module needs to be set to position "6". (In software this is (in decimal) joint ID 64 <code>= 0x10 + 8 * <switch_position></code>) | + | * If configured as 4th axis, the switch on the module needs to be set to position "6". (In software this is (in decimal) joint ID 64 <code>= 0x10 + (8 * <switch_position>)</code>) |
− | * If configured as 5th axis, the switch on the module needs to be set to position "8". (In software this is (in decimal) joint ID 80 <code>= 0x10 + 8 * <switch_position></code>) | + | * If configured as 5th axis, the switch on the module needs to be set to position "8". (In software this is (in decimal) joint ID 80 <code>= 0x10 + (8 * <switch_position>)</code>) |
− | + | * If configured as 6th axis, the switch on the module needs to be set to position "9". (In software this is (in decimal) joint ID 88 <code>= 0x10 + (8 * <switch_position>)</code>) | |
==Firmware Paramters== | ==Firmware Paramters== | ||
Line 15: | Line 15: | ||
#*For an additional 4th axis this would be 0x40 (decimal 64 converted to hex). | #*For an additional 4th axis this would be 0x40 (decimal 64 converted to hex). | ||
#*For an additional 5th axis this would be 0x50 (decimal 80 converted to hex). | #*For an additional 5th axis this would be 0x50 (decimal 80 converted to hex). | ||
+ | #*For an additional 6th axis this would be 0x58.(decimal 88 converted to hex). | ||
#Click "connect" | #Click "connect" | ||
# Switch to the Configuration tab. | # Switch to the Configuration tab. | ||
Line 23: | Line 24: | ||
# If you later on notice that the referencing switch is not being found, change | # If you later on notice that the referencing switch is not being found, change | ||
#*"End Switch Rising" to invert the end-switch logic. | #*"End Switch Rising" to invert the end-switch logic. | ||
− | #*"Ref Speed" and "Ref Speed Slow", if the axis is moving at the wrong speed when referencing. | + | #*"Ref Speed" and "Ref Speed Slow", if the axis is moving at the wrong speed when referencing. Invert these parameters, if the axis is turning in the wrong direction during referencing. |
=Software Configuration= | =Software Configuration= | ||
Line 29: | Line 30: | ||
# Open CPRog. If you have been using the robot before, the correct project file should already be loaded. You can check, which project file you are currently using: The current project file is displayed in the title bar of CPRog when the window is not maximised. | # Open CPRog. If you have been using the robot before, the correct project file should already be loaded. You can check, which project file you are currently using: The current project file is displayed in the title bar of CPRog when the window is not maximised. | ||
# Close CPRog. | # Close CPRog. | ||
− | # CPRog is installed by default in <code>c:\CPRog</code>. Use an editor, such as Notepad++ to open your project file, which is located in c:\CPRog\Data\Projects\<name_of_your_project_file>. Make a backup copy of that file and save it in a known location. | + | # CPRog is installed by default in <code>c:\CPRog</code>. Use an editor, such as Notepad++ to open your project file, which is located in <code>c:\CPRog\Data\Projects\<name_of_your_project_file></code>. Make a backup copy of that file and save it in a known location. |
− | # Edit the Project file. Insert the following line below the line | + | # Edit the Project file. Insert the following line below the line starting with <code><Robot Name=...</code>. <syntaxhighlight lang=xml> <ExternalAxis Name="igus_LinearAxis" Type="igus_LinearAxis"/> </syntaxhighlight> |
− | <syntaxhighlight lang=xml> < | ||
# This will call up a robot file in the located here: <code>c:\CPRog\Data\Robots\igus_LinearAxis\igus_LinearAxis.xml</code> | # This will call up a robot file in the located here: <code>c:\CPRog\Data\Robots\igus_LinearAxis\igus_LinearAxis.xml</code> | ||
− | #*Initially create the directory | + | #*Initially create the directory <code>c:\CPRog\Data\Robots\igus_LinearAxis</code>, if it does not exist yet. |
#*Then, inside the directory, create an empty file named igus_LinearAxis.xml | #*Then, inside the directory, create an empty file named igus_LinearAxis.xml | ||
# The file should have the following content to start with:<syntaxhighlight lang=xml> | # The file should have the following content to start with:<syntaxhighlight lang=xml> | ||
− | < | + | <Robot> |
<INFO NAME="igus_LinearAxis" AUTHOR="Christian Meyer"/> | <INFO NAME="igus_LinearAxis" AUTHOR="Christian Meyer"/> | ||
+ | <Joint0 ID="64" GearScale="41.689"/> | ||
<Kinematic lz0="100.0"/> | <Kinematic lz0="100.0"/> | ||
<ManufacturerJointConfig A1Dir="1.0" A1Offset="0.0" /> | <ManufacturerJointConfig A1Dir="1.0" A1Offset="0.0" /> | ||
<SoftwareMinMax A1Min="-1000.0" A1Max="1000.0" /> | <SoftwareMinMax A1Min="-1000.0" A1Max="1000.0" /> | ||
<JointVelocities A1="200.0" /> | <JointVelocities A1="200.0" /> | ||
− | + | </Robot> | |
− | </ | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | #Save the file. | ||
+ | #Start CPRog. The axis should now be active. Depending on the type of linear axis, ini switch, gear ratio firmware parameters may need adapting as described above. |
Latest revision as of 15:13, 2 November 2020
To use an external linear axis, an additional stepper motor module is required. That module needs to be configured upon receipt. Changes to the CPRog project file need to be made and a robot file for the external linear axis has to be installed and potentially adapted.
Module Configuration
Prior to supplying power to the module, set the switch on the top of the stepper motor module.
Configure rotary switch on the stepper motor module to the next available address:
- If configured as 4th axis, the switch on the module needs to be set to position "6". (In software this is (in decimal) joint ID 64
= 0x10 + (8 * <switch_position>)
) - If configured as 5th axis, the switch on the module needs to be set to position "8". (In software this is (in decimal) joint ID 80
= 0x10 + (8 * <switch_position>)
) - If configured as 6th axis, the switch on the module needs to be set to position "9". (In software this is (in decimal) joint ID 88
= 0x10 + (8 * <switch_position>)
)
Firmware Paramters
The stepper motor module will need new firmware parameters. These have to be configured using the ModuleCtrl Software.
- Install and start the ModuleCtrl software.
- Select the correct CAN ID (hex) of your module.
- For an additional 4th axis this would be 0x40 (decimal 64 converted to hex).
- For an additional 5th axis this would be 0x50 (decimal 80 converted to hex).
- For an additional 6th axis this would be 0x58.(decimal 88 converted to hex).
- Click "connect"
- Switch to the Configuration tab.
- If the additional external axis has a motor encoder, which it normally should, enter the paramters as shown on Fig 2. . Initially, click "read" to download the current parameters from the module. Remember to click the set after entering the values, so that the parameters are uploaded to the firmware.
- Switch to the StepperMotor Tab and initially click "read" to download the current parameters. Enter the values shown in Fig 3 and click "write".
- Then click "read" again to verify that the configuration has been written as intended.
- The axis is now configured to the default parameters for an external linear axis. However, you may want to vary the parameters:
- If you later on notice that the referencing switch is not being found, change
- "End Switch Rising" to invert the end-switch logic.
- "Ref Speed" and "Ref Speed Slow", if the axis is moving at the wrong speed when referencing. Invert these parameters, if the axis is turning in the wrong direction during referencing.
Software Configuration
- Close ModuleCtrl.
- Open CPRog. If you have been using the robot before, the correct project file should already be loaded. You can check, which project file you are currently using: The current project file is displayed in the title bar of CPRog when the window is not maximised.
- Close CPRog.
- CPRog is installed by default in
c:\CPRog
. Use an editor, such as Notepad++ to open your project file, which is located inc:\CPRog\Data\Projects\<name_of_your_project_file>
. Make a backup copy of that file and save it in a known location. - Edit the Project file. Insert the following line below the line starting with
<Robot Name=...
.<ExternalAxis Name="igus_LinearAxis" Type="igus_LinearAxis"/>
- This will call up a robot file in the located here:
c:\CPRog\Data\Robots\igus_LinearAxis\igus_LinearAxis.xml
- Initially create the directory
c:\CPRog\Data\Robots\igus_LinearAxis
, if it does not exist yet. - Then, inside the directory, create an empty file named igus_LinearAxis.xml
- Initially create the directory
- The file should have the following content to start with:
<Robot> <INFO NAME="igus_LinearAxis" AUTHOR="Christian Meyer"/> <Joint0 ID="64" GearScale="41.689"/> <Kinematic lz0="100.0"/> <ManufacturerJointConfig A1Dir="1.0" A1Offset="0.0" /> <SoftwareMinMax A1Min="-1000.0" A1Max="1000.0" /> <JointVelocities A1="200.0" /> </Robot>
- Save the file.
- Start CPRog. The axis should now be active. Depending on the type of linear axis, ini switch, gear ratio firmware parameters may need adapting as described above.