[etherlab-users] Solved: Trouble getting Parker Hannifin Drive to work
Montgomery-Smith, Stephen
stephen at missouri.edu
Thu May 3 05:12:36 CEST 2018
So I have managed to get it to work. I thought I would put my solution
on this mailing list in case others have similar problems.
First, I made use the of the unofficial patches at
https://sourceforge.net/u/uecasm/etherlab-patches/ci/default/tree/#readme.
With this I was able to do a clean build, and also build the e1000e
module. And the program I posted last time didn't crash the computer,
and the slave went to OP. But it also didn't work in that the motor
didn't move.
The key turned out to be waiting for the Parker Hannifin Drive to be
"ready." And this is performed by the following code snippet:
int count = 3;
then inside the main loop:
if (data_pointer[off_status_word] & 1) {
data_pointer[off_ctl_word] |= 1;
if (count > 0) count--;
} else {
printf("Waiting to start\n");
data_pointer[off_ctl_word] &= ~1;
}
if (count <= 2) {
data_pointer[off_op_mode] = 8;
}
if (count == 1) {
printf("Starting");
start_position = EC_READ_S32(data_pointer + off_act_pos);
}
if (count == 0) {
position = start_position - 200000*(1-cos(t));
printf("Setting position %g %d\n", t, position);
EC_WRITE_S32(data_pointer+off_tgt_pos, position);
}
The only problem with the attached code is that if I quit the resulting
program, and then restart it, the motor doesn't work. I have to power
cycle the drive first. I'll work on that next.
Of course, you should remove the printf statements when actually using
it. it is just to show you that progress is happening.
Stephen
On 04/14/2018 07:01 PM, Montgomery-Smith, Stephen wrote:
> I have a Parker Hannifin P-Series drive, described here:
> https://www.parkermotion.com/products/Servo_Drives__7319__30_32_80_567_29.html.
> I am able to make it work using the software package EC-Master by
> Acontis, but I would prefer to use open source software
>
> I have tried both etherlab and SOEM without any success. I am attaching
> the program I wrote for etherlab (also cutting and pasting it below in
> case the attachment is removed). Actually, running this program can
> cause the computer to freeze. I am using ubuntu-16.10 with linux kernel
> 4.10. Any help or hints would be greatly appreciated.
>
> The program enters the loop, and outputs values saying where the move
> should be moving to. But the motor simply doesn't move. The lights on
> the drive, and the output of "etherlab config" suggest the drive is
> still in the SAFE_OP state. My guess is that there are some other
> initialization commands the drive needs, and if I understood how to
> properly read ENI files (the one used and generated by the Acontis
> software), that perhaps both this program, and the one I wrote in SOEM,
> would work.
>
> I am using the generic etherlab module. Unfortunately the e1000e module
> doesn't work on any linux kernel greater than 3.4, and I am having a
> really hard time getting sufficiently old versions of linux to work.
>
> Also, does anyone know a good help forum for SOEM, so I can ask similar
> questions there about the SOEM program I wrote?
>
> Thanks, Stephen
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_ec-3.c
Type: text/x-csrc
Size: 6114 bytes
Desc: test_ec-3.c
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20180503/abea46dd/attachment-0003.c>
More information about the Etherlab-users
mailing list