I need a simple CSP example for CiA 402

More
2 years 7 months ago - 2 years 7 months ago #296915 by scottlaird
I'm finally on the home stretch with CiA 402 support, I think, with my Big Board of Motors finally assembled and powered on.

This helped flush out 3 or 4 bugs yesterday, so progress is happening again. It's nice to be home after spending half of the month on the road.

My big issue is that I'm having a hard time testing CSP mode with CiA 402 devices. CSV mode is easy, just load the cia402 HAL module, connect pins together, set the velocity, and watch it spin. Unfortunately, the same thing isn't working with CSP mode right now. It's failing identically with different hardware, even on hardware which works fine with CSV, which makes me think it's *probably* a config error with the way I'm using CSP, although it could absolutely be a bug in my new CiA 402 code or a config problem with my drives.

I'll get it eventually, but it'd be really helpful if someone had a minimal CSP config that I could swipe and use as an example. Ideally it'd work with existing CiA 402 hardware, presumably via `generic`, and would just have a single axis with as little extra infrastructure as possible. I'm trying to drive 11 different motors right now, setting up a whole fake CNC for each is more than I really want.

With CSV I can set `velocity_cmd` and the motor spins (and velocity_fb changes), but setting `pos_cmd` doesn't seem to do anything by itself and I can't tell if it's supposed to.
Last edit: 2 years 7 months ago by scottlaird.
The following user(s) said Thank You: besriworld, endian

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

More
2 years 7 months ago #296917 by scottlaird
I've been providing details in github.com/linuxcnc-ethercat/linuxcnc-ethercat/issues/180 , but here's a quick summary of the hardware involved:
  • Leadshine 2CL3-EC507 (2-axis closed-loop stepper) with 2 steppers
  • Rovix ESD-A6 (6-axis open-loop 24V stepper) with 4 steppers
  • RTelligent ECT60 (1-axis closed-loop stepper) with 1 stepper
  • RTelligent ECR60 X2 (2-axis open-loop stepper) with 2 steppers
  • RTelligent DRV400E (1-axis DC servo) with 1 brushless drive
  • Omron MX2 (VFD) with a cheap spindle
I also have a Leadshine CANopen stepper drive on the way, to see how terribly painful it is do to EL6751->CANopen CiA 402.  I expect that the answer is "too painful to actually use", but people keep asking...
The following user(s) said Thank You: tommylight, endian

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

More
2 years 7 months ago #296935 by endian
hi,

it is not simple as it should looks like.. some of drivers run with SI units via pdos 607A+6064 and some of them working on bit revolution increments via 607A+6064 and some of them via 60C1+6063... It has to be settable on each of them..

I have working stuff with kollmorgen, pilz and nidec control techniques  but this working with incremental bits resolution/revolution but Ive done custom RT component of each one becasue every of them has different control/homing setup subroutine and different codes of the operation modes... but they are working rock solid for long long hours few days a week...config is not minimal but it should be helpfull

and you have to sure, if you had right tunned servo becasue whole position loop + compensation are in the servo driver loop itself... just commands or correction are done from lcnc...

how you are working with CSV? do you net velocity-cmd and position feedback via PID like we are using with mesa 7i77 cards???

regards 

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

More
2 years 7 months ago #296937 by scottlaird
At this point, I don't care about scale at all. I just want the motor to spin repeatedly. One layer at a time :-).

For CSV, I'm literally just setting the velocity target (via the cia402 component) and watching it spin. I don't care what a speed of '1000' means, as long as it's 10x as fast as 100 and 1/10th as fast as 10,000. But doing the same basic thing with CSP results in no spinning, no change of position, and no velocity measured. And I'm not sure if that's a bug in my generic CiA 402 code or if I'm doing something wrong.

I want to set target location (607a) and see actual location (6064) move. 6063 *shouldn't* be needed in general, but so much is optional in CiA 402 that's it's hard to depend on anything, unfortunately.

In general, some of the ratio settings (6092, especially) should be useful for getting the units from 6064 to match more sensible measurements. There are ~7 of them, IIRC, and I haven't spent much time looking at them all yet, but I have support for setting them via modParams. No docs yet, though. Which is fine, because the whole mess isn't *quite* working as expected all the time.

Actually figuring out which devices want which ratios for what will be fun.

I'll look through the thread you linked. At this point, anything is helpful.

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

More
2 years 7 months ago - 2 years 7 months ago #296944 by db1981
Hello Scott,

thumbs up for the work you are putting in this project.
Unfortunaly i have not time to look at it, yet.

One Note about CSP Mode, i don't know how you are testing...

-CSP needs an cyclic updata of the position data, its a little bit like driving an velocity drive. CSP calculates the velocity for the velocity loop inside the drive from the deriative of the position command to set the Motor speed. The diff beetween the command and feedback position is then calculated in the pos controll to give changes to the speed depending on the controller parameters.
But Acc, Decc, Jerk, RPM has to be commanded with cyclic position command, in scope the command has the shape like the velocity with an y offset. Commanding Steps between cycles that are much to big to get reached in the cycletime, usually will result in big following error from the drive or will be suppressed by plausibility check.

Setting an constant pos value, will generate no speed, this only works in an real Position Mode where the drives does positioning fully standalone. But in this mode interpolation of axes is not possible.
Last edit: 2 years 7 months ago by db1981. Reason: typos
The following user(s) said Thank You: scottlaird, endian

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

More
2 years 7 months ago #296949 by pippin88
The following user(s) said Thank You: scottlaird

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

Time to create page: 0.067 seconds
Powered by Kunena Forum