Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

EPOS4 current mode using LabVIEW

Hello everyone !

For a small project of mine, I'm trying to use LabVIEW to control a BLDC motor from Maxon with an EPOS4 via USB.
I'm (a bit) new to LabVIEW so after using EPOSStudio for the tuning I tried playing a bit with the examples in the maxon's library. And so far it worked.
But I must admit that I'm a bit stuck for the next step.
I'm now trying to control the motor in current mode, and apparently I'm doing it all wrong.
First goal (short term) : being able to give a command to get a wanted current (torque)
Second : Manage to approach a wanted position before touching a sample and then pushing it with the wanted torque.
Last goal 🙂 : Managing to repeat the action few time once the wanted torque is reached (so going backward a few mm and then pushing again).

But so far it seems I cannot even manage to build my own VI to operate in current mode using usb only to reach my first goal. Is it possible to manage current mode with usb only ?

If anyone has an advice or two that would be incredible,
Thank you for your reading time in any cases,
Have a great day
Bastien.

 

0 Kudos
Message 1 of 5
(2,595 Views)

 

Hello all 🙂

I'm continuing on the path of controlling my motor,
And I'm (a bit) stuck with the homing mode. I think I'll go crazy if I still see this "Value range error (0x06090030)" 🙂
Here is a snippet for those who wants to get an idea :

 

Value Range Error.png


I'm using the Initialize.vi / EnableAxis.vi / MoveToRelativePosition.vi / MoveToRelativePosition.vi (two times so I can make a way and back)
Then, the famous FindHome.vi (the whole thing works without this one).
Then StopAxis.vi / DisableAxis.vi / Close.vi

 

Here is a print screen of the error.

Bastiennn_0-1611609712437.png


If anybody might have an idea to give me a hand,
I'll give a lot of kudos 🙂
Take care in any cases.

0 Kudos
Message 2 of 5
(2,544 Views)

This means that the value of at least one parameter for the homing is out of range.

Extract from maxon's documentation :

 

  • HomingAcceleration : Acceleration for homing profile
  • SpeedSwitch : Speed during search for switch
  • SpeedIndex : Speed during search for index signal
  • HomeOffset : Home offset after homing
  • CurrentThreshold : Current threshold for homing methods −1, −2, −3, and −4
  • HomePosition : Used to assign the present position as homing position

 

Have a look at SpeedIndex which is set to 0.

 

Message 3 of 5
(2,523 Views)

 

Hi everybody,
I'm continuing the adventure on my small project,
Thanks to JB I was able to manage the homing mode.

Still working on the current mode :
I'm approaching my sample while controlling the speed because if it's already in current mode it my system comes "bumping" the sample with full acceleration. So first slow speed until the needed current is more than 200mA and then current mode to push my sample.

Here is a snippet for anybody interested :

control in current.png


My next problem is that the control in current mode (open loop) is not precise because of the frictions of the system. And second once I'm in contact with the sample I can press (put more torque) to increase the weight, but cannot come back to 0 (the motor doesn't know that gravity exists).
So I'm waiting for a load cell sensor to close my current control loop.

That's why my question is :
Is it possible for me to make a PID current control closed loop without using a special DAQ device for LABview ?
I'll have my S load cell sensor, linked to an amplifier (0-10V output), and I can link its analog output to an analog input on the EPOS4.

0 Kudos
Message 4 of 5
(2,469 Views)

Hello, Mr. Bastiennn.I am trying to  realize the current mode of the motor. Could you share your file with me? Thank you very much.

0 Kudos
Message 5 of 5
(2,296 Views)