LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parrallelism EPOS

Hello,

 

I'm a beginner in labview and I have to make a program that controls two Maxon DC motors.I also have two EPOS 24/5 controller to communicate with the two motors via labview with the EPOS toolbox.

 

I would like to send a position to the two DC motors at the same time or in parrallel(so I put the VI's in flat sequence structure) but when I try, two movement are made sequentially.

 

Can someone help me?

I putted an image of my clock diagram and also my code in attached.

 

Wiper

Download All
0 Kudos
Message 1 of 14
(4,989 Views)

Those devices are serial port controlled and that is a VERY SLOW bus. You will never be able to control those two devices exactly synchronously by only using software synchronization from your host application. In order to get a really synchronous operation you need to wire a trigger signal from one controller to the other and program one of them to issue that trigger while the other needs to be programmed to wait on the trigger before performing the action. And then you need to make sure to program the slave (the controller receiving the trigger) first before programming the master which will generate the trigger.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 14
(4,970 Views)

 I’m using 2 of EPOS2 24/5 Position Controller to control 2 of maxon EC motors (of different 2).  The communication between the host PC and the EPOS are established by serial USB communication. These 2 EPOS controllers communicate between them using CAN bus. I somehow was demanded to make the rotation of these 2 motors synchronous..

Let me put it this way.

I’m using Profile Position mode through which I input position and velocity for the motors to produce a to and fro motion.

I just input them one cycle (say 0, 50, 0 for one motor & 0, 75,20,0 for another motor) and made them to reproduce it until I say STOP.

The problem that I’m facing is that I don’t know how to do the synchronization between the hip and knee motors to ensure that beginning of each consecutive cycle for the hip and knee start at the same time.

Is there any way to overcome this issue other than hardware triggering? 

0 Kudos
Message 3 of 14
(4,937 Views)

@prasanth Thangavel wrote:

 I’m using 2 of EPOS2 24/5 Position Controller to control 2 of maxon EC motors (of different 2).  The communication between the host PC and the EPOS are established by serial USB communication. These 2 EPOS controllers communicate between them using CAN bus. I somehow was demanded to make the rotation of these 2 motors synchronous..

Let me put it this way.

I’m using Profile Position mode through which I input position and velocity for the motors to produce a to and fro motion.

I just input them one cycle (say 0, 50, 0 for one motor & 0, 75,20,0 for another motor) and made them to reproduce it until I say STOP.

The problem that I’m facing is that I don’t know how to do the synchronization between the hip and knee motors to ensure that beginning of each consecutive cycle for the hip and knee start at the same time.

Is there any way to overcome this issue other than hardware triggering? 


duplicate post

0 Kudos
Message 4 of 14
(4,925 Views)

Hello Prasanth,

 

How precise/tight should your synchronization be?

If it is relatively loose, then there might be a software approach possible.

 

If not, then you'll probably need some kind of hardware trigger.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 5 of 14
(4,897 Views)

I'm not really sure about the EPOS series but I have worked in the past with Minimotor MSC systems and they could be also interconnected with CAN. There was no possibility to truely synchronise them over the host interface only but they did allow to download some kind of script that got executed on each controller and could be reacting to status signals on other controllers and the communication of that got transmitted over their CAN bus.

 

I could imagine that EPOS supports something similar, but it is possible that this can not be fully controlled through the host interface alone, but only through a similar on-device script execution.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 14
(4,880 Views)

I contacted Maxon Motors concerning this and got following answer ,

 

...
The identically preconfigured motion profiles of the two EPOS have to be started at the same time by a common starting trigger afterwards. I am not sure how a common starting trigger has to be implemented by LabView. I am sorry that we cannot provide LabView programming services or LabView training by the means of the Support Desk.

...

Kind regards
Juergen Wagenbach
maxon motor control Support Team

 

 

 

I want to start my two motors synchronously and not sequentially like the intial post of this topic.

( I am using EPOS2 70/10 )

 

Did anyone figure this out?

0 Kudos
Message 7 of 14
(4,719 Views)

Ask them to give you ANY example of how to do this (Visual Basic, .Net, whatever). If they can't you should conclude that it simply can't be done, and they just try to blame it on LabVIEW in order to not have to admit it.

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 14
(4,713 Views)

I realized the intial post could not work because it's in one loop. So I tried it this way... based on the simple Rendezvous example.  Without succes

 

Rendezvous_MovePos.jpg

 

 

NOTE:  The constant delay of "5000" should be on ZERO.  This makes it unblocking!!!   ...this way it workable...

Download All
0 Kudos
Message 9 of 14
(4,688 Views)

Before trying to do all kinds of things you should consider one thing:

 

1) You have one serial connection. You cannot send two commands over this connection in parallel. So depending on your baudrate and the length of the command to start an axis you will have a certain delay between the two commands.

 

This delay will be at least:

             length of command in bytes  * 10 + some overhead

delay = ------------------------------------------------------------

                                            baudrate

 

So if the command is lets say two bytes "GO" plus termination character at 19200 baud you have at least 2 ms delay already simply from that. Add to that the uncertainety of the Windows OS which doesn't allow an application to guarantee execution of code to below ms accuracy plus the command interpreter in your motion driver and the potential delay could be in the order of several 10 ms.

 

So unless a difference of ~100ms is enough for your "at the same time", you simply can forget to get both axis started "at the same time" from software control only over the RS-232 port. You need to have some extra triggering facility, either through an external hardware signal that routes the start signal from one axis to the other, or through some software/hardware facility in your motion controller that allows to prepare both axis first and then start them with a single command!

Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 14
(4,675 Views)