I have a problem with the eal4c library (code developed in c++ on ubuntu 16.0), I have done the setup of two linear actuators in order to have the master and slave configuration, with the position control feedback for the slave, but If I try to move the actuator with the C++ application, using the ealMotionMovementMoveAbsolute() function, it returns the error "General error during function call".
If I de-activate the cross-communication and put the MLD to STOP, so I use only one axis the same code runs without problem. Do you know if I need to special connection setup or I need to write specific parameters to get the motion in the master/slave configuration?
the connection and the motion are performed with these functions:
handle = ealCreateDeviceHandle(false)
ealConnectionDefault(&handle, "master device IP")
ealMotionMovementPower(&handle, 0, true)
ealMotionMovementMoveAbsolute(&handle, 0, 0, 100, 100, 100, 0)
the MLD setup for master/slave setup is done following the guide in attachment.
thanks in advance,
how do you enable power in slave? By CCD or via EAL (analog profile in master communication)?
Which coupling mode do you use?
It would be helpfull if you post a par file of your master and slave configuration to get a better idea.
You can also contact our application department to discuss your topic.
the configuration is done with the position command value linking, I have attached the .par file as you request.
About the power on the slave: from the code point o view, I will communicate only with the master axis, so the connection, the power on and the position command are always with the handle of the master one, I didn't send any command to the slave. Once I turn on the power with the command ealMotionMovementPower(&handleOfMaster, 0, true) automatically also the status of the slave switch from AB to AF, I guess this is due to the setup that we have done, with the SERCOS profile, in which the power enable command is also sent to the slave.
The point is that I'm able to obtain a working status with both the actuator in AF status and aligned to the same position, but when I try to use the ealMotionMovementMoveAbsoulte(&handleOfMaster, 0, desired position, velocity, acceleration, deceleration, jerk) the function return an error (General error during function call) and the actuator does not move.
But if the code is still running, so the actuators constinue to stay in AF status, if I control them from another laptop (windows) using the IndraWorks Ds applicattion, I'm able to trigger a movement simply going to the position command page, set a new position value and triggering it with the apply botton, in this way the command works and the actuators move in synchro (see the other picture that I have attached). So I guess that something is missing in the C++ code, in the function call or in the setup of the connection with the master axis...
your configuration looks good so far.
To use EAL motion commands we need to define the operating modes.
Therefor we have an initialize function which you can call once while commissioning.
If you want to do the required settings manually you can set the operating mode like in my screenshot:
EAL usually gives you an error message that initialize function needs to be called when operating modes are not defined in correct order.
You also need to reference your encoder before using a "move" command.
I hope this solves your issue.
I have correctly moved the operating modes in the same order as suggested by you but I get always the same error.
this is teh status of the IndraWorks page when I try to use the absolute motion function from my linux code, as you see the active operating mode switch corretly to drive-controlling position, but the command value stay to zero without triggering the position change commanded from the code, and on the terminal I get this error from the library:
Note: I used also the ealApiInitializeDefault from the code, but the result is the same.