I need a simple CSP example for CiA 402

More
2 years 6 months ago #297400 by rodw
There is not that many mandatory pins we need for linuxcnc. Keep it short. There will be no need for debugging once this is set.

It seems the ECT drives include the input pins asĀ  part of the CIA402 space but the outputs are custom PDOs. Seems like the outputs should be left out?
Is there a parameter to include the Inputs?
Is there settings to configure homing?
The following user(s) said Thank You: besriworld, scottlaird

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #297443 by scottlaird
Hmm, I thought I responded to this yesterday. Presumably the forum timed out on me and I didn't notice.

Inputs: they're enabled by default. There are modparms for all of the RT per-pin settings (homing, estop, nc/no, etc).

Outputs: according to `ethercat sdos`, RT steppers actually do support the CiA 402 outputs, but they're not in their docs. I have them enabled in `rtec`, but haven't verified them yet. I *suspect* that they weren't working due to distributed clock problems before.

Homing: all of the CiA 402 homing settings are available, but they're not part of the default set of pins right now. You can get them via extra modparams. Since no one really seems to know how to home via CiA 402 today, I figure we can circle back to it.

One thing I'm trying to get working at the moment is finding a way to expose some modparams to lcec_configgen without hard-coding device-specific logic there. Basically, I want to be able to tag specific modparams in lcec_rtec.c and have their name and a default value be visible to external tooling. The first pass on that is done, but it mostly just pointed out that I hadn't fixed modparams for 2-axis RTEC devices, so there's a bit more code to go.

The idea is that specific modules can say something like "the user will probably want to change this modparam, so show it in the autogenerated config", and it'll appear, with the default value, all automatically.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #297616 by scottlaird
Okay, I have changes pending to add modParam descriptions to RTEC devices, as well as the EL3xxx temperature sensors and EL7041 driver. Most of the random EL* devices don't use modParams, and I don't want to go overboard, especially with devices that I don't have on hand. Here's a sample of what lcec_configgen now produces:
Code:
<slave idx="15" type="EL3204" name="D16"> <!-- Sensor type, Pt100|Ni100|Pt1000|Pt500|Pt200|Ni1000|Ni1000-TK5000|Ohm/16|Ohm/64 --> <modParam name="ch0Sensor" value="Pt100"/> <!-- Sensor resolution, Standard or High. High reduces the range in some cases. --> <modParam name="ch0Resolution" value="Standard"/> <!-- Number of wires used for sensor connection. 2, 3, or 4 --> <modParam name="ch0Wires" value="2"/> <!-- Sensor type, Pt100|Ni100|Pt1000|Pt500|Pt200|Ni1000|Ni1000-TK5000|Ohm/16|Ohm/64 --> <modParam name="ch1Sensor" value="Pt100"/> ... <!-- Number of wires used for sensor connection. 2, 3, or 4 --> <modParam name="ch4Wires" value="2"/> </slave> .... <slave idx="19" type="EP7041" name="D20"> <!-- Maximum Amps for stepper --> <modParam name="maxCurrent" value="5.0"/> <!-- Stepper steps per revolution (usually 200) --> <modParam name="motorFullsteps" value="200"/> <!-- Encoder steps per revolution (usually 4000) --> <modParam name="encoderIncrements" value="4000"/> <!-- Maximum speed in steps/second. 1000|2000|4000|8000|16000|32000. --> <modParam name="maxSpeed" value="2000"/> <!-- Enable encoder. The EL7041 will fake an encoder if false. --> <modParam name="encoder" value="true"/> </slave> <slave idx="27" type="ECT60" name="D28"> <!-- Enable support for Cyclic Synchronous Position mode. --> <modParam name="enableCSP" value="true"/> <!-- Enable support for Cyclic Synchronous Velocity mode. --> <modParam name="enableCSV" value="false"/> <!-- Maximum stepper Amps. --> <modParam name="peakCurrent_amps" value="6.0"/> <!-- Operation mode: openloop, closedloop, or foc. --> <modParam name="controlMode" value="closedloop"/> <!-- Number of encoder steps per revolution. --> <modParam name="encoderResolution" value="4000"/> <!-- Output 1 use: general, alarm, brake, in-place. --> <modParam name="output1Func" value="alarm"/> <!-- Output 2 use: general, alarm, brake, in-place. --> <modParam name="output2Func" value="brake"/> <!-- Input 3 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 --> <modParam name="input3Func" value="cw-limit"/> <!-- Input 4 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 --> <modParam name="input4Func" value="ccw-limit"/> <!-- Input 5 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 --> <modParam name="input5Func" value="home"/> <!-- Input 6 use: general, cw-limit, ccw-limit, home, clear-fault, emergency-stop, motor-offline, probe1, probe2 --> <modParam name="input6Func" value="motor-offline"/> </slave>

I'm trying to ride the line here between config spam and undiscoverability. In general, settings that will usually need to be changed, or settings that will give *really* unexpected results are getting documentation added that will flow directly through to generated configs.

The precise formatting is still bugging me; there's an extra newline before </slave>, and I should probably add a way to add a top-level comment for devices, like "see http://.../rtec.md for configuration details". But it's coming along nicely.
The following user(s) said Thank You: rodw, 0x2102

Please Log in or Create an account to join the conversation.

Time to create page: 0.257 seconds
Powered by Kunena Forum