- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- CiA 402 progress (RTelligent and Leadshine working!)
CiA 402 progress (RTelligent and Leadshine working!)
- scottlaird
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 136
- Thank you received: 155
20 Apr 2024 19:08 #298746
by scottlaird
CiA 402 progress (RTelligent and Leadshine working!) was created by scottlaird
Progress on CiA 402 driver issues has been kind of slow lately, between a mix of travel, work, and a couple really annoying bugs that took way to long to track down.
But, I *think* we're good now. I just merged a bunch of changes and released v1.32.0.
At this point, we have "normal-looking" drivers for most RTelligent and Leadshine CiA 402 stepper drives, including the dual-axis models that they both make. I have 3 different RT drives (ECT60, ECT60x2, ECR60x2) and 1 Leadshine drive (2CS3E-D507) in my test system. You should be able to use them by just adding something like this to your XML config:
I've also enhanced `lcec_configgen` so that drivers can communicate with it to provide suggested <modParam>s. Just run `lcec_configgen` and it'll print a suggested config. The slave portions are better than the non-slave portions right now. Here's what it provides for the ECT60x2:
There are a lot of additional settings in the RT driver (and almost none in the Leadshine driver at the moment), but only the ones that will generally need to be changed are listed automatically. See linuxcnc-ethercat.github.io/linuxcnc-ethercat/ for device-specific documentation.
One thing that the documentation probably doesn't make clear enough -- you mostly need to use the `cia402` HAL component in order to get any of the CiA 402 devices to work, no matter what your XML file looks like. Generic, `basic_cia402`, or a device-specific driver, they all need the `cia402` component to work. Hopefully we'll be able to make this less complex (or at least better-documented) soon.
But, I *think* we're good now. I just merged a bunch of changes and released v1.32.0.
At this point, we have "normal-looking" drivers for most RTelligent and Leadshine CiA 402 stepper drives, including the dual-axis models that they both make. I have 3 different RT drives (ECT60, ECT60x2, ECR60x2) and 1 Leadshine drive (2CS3E-D507) in my test system. You should be able to use them by just adding something like this to your XML config:
<slave idx="4" type="ECT60x2" name="rt-ect60x2"/>
<slave idx="5" type="2CS3E-D507" name="ls-2cl3"/>
<slave idx="7" type="ECT60" name="rt-ect60"/>
<slave idx="8" type="ECR60x2" name="rt-ecr60x2"/>
I've also enhanced `lcec_configgen` so that drivers can communicate with it to provide suggested <modParam>s. Just run `lcec_configgen` and it'll print a suggested config. The slave portions are better than the non-slave portions right now. Here's what it provides for the ECT60x2:
<slave idx="4" type="ECT60x2" name="D26">
<!-- Enable support for Cyclic Synchronous Position mode. -->
<modParam name="ch1enableCSP" value="true"/>
<!-- Enable support for Cyclic Synchronous Position mode. -->
<modParam name="ch2enableCSP" value="true"/>
<!-- Enable support for Cyclic Synchronous Velocity mode. -->
<modParam name="ch1enableCSV" value="false"/>
<!-- Enable support for Cyclic Synchronous Velocity mode. -->
<modParam name="ch2enableCSV" value="false"/>
<!-- Maximum stepper Amps. -->
<modParam name="ch1peakCurrent_amps" value="6.0"/>
<!-- Maximum stepper Amps. -->
<modParam name="ch2peakCurrent_amps" value="6.0"/>
<!-- Operation mode: openloop, closedloop, or foc. -->
<modParam name="ch1controlMode" value="closedloop"/>
<!-- Operation mode: openloop, closedloop, or foc. -->
<modParam name="ch2controlMode" value="closedloop"/>
<!-- Number of encoder steps per revolution. -->
<modParam name="ch1encoderResolution" value="4000"/>
<!-- Number of encoder steps per revolution. -->
<modParam name="ch2encoderResolution" value="4000"/>
<!-- Output 1 use: general, alarm, brake, in-place. -->
<modParam name="ch1output1Func" value="alarm"/>
<!-- Output 1 use: general, alarm, brake, in-place. -->
<modParam name="ch2output1Func" value="alarm"/>
<!-- Output 2 use: general, alarm, brake, in-place. -->
<modParam name="ch1output2Func" value="brake"/>
<!-- Output 2 use: general, alarm, brake, in-place. -->
<modParam name="ch2output2Func" value="brake"/>
<!-- Input 3 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 -->
<modParam name="ch1input3Func" value="cw-limit"/>
<!-- Input 3 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 -->
<modParam name="ch2input3Func" value="cw-limit"/>
<!-- Input 4 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 -->
<modParam name="ch1input4Func" value="ccw-limit"/>
<!-- Input 4 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 -->
<modParam name="ch2input4Func" value="ccw-limit"/>
<!-- Input 5 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 -->
<modParam name="ch1input5Func" value="home"/>
<!-- Input 5 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 -->
<modParam name="ch2input5Func" value="home"/>
<!-- Input 6 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 -->
<modParam name="ch1input6Func" value="motor-offline"/>
<!-- Input 6 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 -->
<modParam name="ch2input6Func" value="motor-offline"/>
</slave>
There are a lot of additional settings in the RT driver (and almost none in the Leadshine driver at the moment), but only the ones that will generally need to be changed are listed automatically. See linuxcnc-ethercat.github.io/linuxcnc-ethercat/ for device-specific documentation.
One thing that the documentation probably doesn't make clear enough -- you mostly need to use the `cia402` HAL component in order to get any of the CiA 402 devices to work, no matter what your XML file looks like. Generic, `basic_cia402`, or a device-specific driver, they all need the `cia402` component to work. Hopefully we'll be able to make this less complex (or at least better-documented) soon.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- CiA 402 progress (RTelligent and Leadshine working!)
Time to create page: 0.117 seconds