04-15-2013 11:01 PM
Hello everybody, I am new here and I have been trying to learn how to make this process work for a while and I have ran out of options. LabView is very hard to comprehend.
I am trying to control a Maxon motor using the epos 24/5 controller. I have a vi that does what I need to do, but I need to find a way to make the process run faster. Basically is going to control a wing that is going to go back and forth at very high speeds. I am not sure what I need to do, also I would like to generalize the process by being a able to input a function or a position wave of my choosing. If any of you all can help me it will be greatly appreciated. Thanks ahead.
Solved! Go to Solution.
04-16-2013 12:24 PM
CarlosUT,
Without the Epos subVIs it is difficult to tell where the slowdowns might be.
Consider:
1. The mathscript node is probably much slower than native LabVIEW code, paticularly for what looks like very simple logic. Replace it with functions from the Comparisons palette. Also consider intializing the feedback node so you know where it starts when the VI is called.
2. Learn some basic dataflow principles. Your Delay (ms) and Stop controls are read exactly one time at the beginning of execution of the VI and those initial values are passed to the loop. Any later changes in those values will not be seen inside the loop. Move the terminals into the loop.
3. Duplicated code: You have the same subVI in each case of the case structure. Move the subVI outside the case structure and just use the case structure to select which set of values will be used.
4. Since the minimum value of Delay (ms) is 150, the loop cannot execute more than about 6 times per second. You do not specify what you mean by high speeds for the wing control, but this may be a factor.
Lynn
04-16-2013 12:46 PM
Hey Lynn,
I appreciate your response, I was able to change the stuff you recomended and made sense that way. Because I am just begining to learn the program, I have a question of how to implement your #1 comment, the mathscript node idea I was helped with, matter of fact everything on the vi I was helped with. What I meant by high speeds is that I want it to flap around at least 30 hz. Thanks.
04-16-2013 01:21 PM
Well I was able to follow trhough with all the steps you pointed out even 1. I'm feeling good thank you, I will keep messing with the numbers to see how fast I can get it to the number I need. But if you have any ideas of how can I generalize this to input a position waveform it will be appreciated.
04-16-2013 03:48 PM
That should work better.
I have no idea how fast the motor and controller can respond. That is likely to be the limiting factor. Tp get to 30 Hz, you need to reduce the delay to less than 33 ms and the Move to Absolute Position.vi must execute in less than 33 ms.
In general to follow a position profile you will want to create an array of the positions over time. Then read the array one element at a time and send it to the controller. The details may depend on how you want to generate or enter the array. If the position is to be specified every 33 ms, then a simple array will work. If the time intervals vary, you can use a cluster of {time, position} in an array. Inside the loop you read the array element, wait until the specified time, then update the position and go to the next element in the array.
Lynn
03-20-2015 10:06 AM
Hi everyone,
I'm just starting to work with Labview (i'm quite new to the software) in order to pilot a Ec-max 40, 70W maxon motor with GP42 planetary gearhead 74:1. I've mounted the setup comprising maxon motor, EPOS2 50/5 control axis and USB cable to communicate with PC. I used EPOS studio software as well, for setting up motor parameters. Now my big issue is to create a labview vi in order to directly pilot the motor. I've downloaded the maxon epos instrument driver available on maxon motor website but i didn't figure out how to correct use them to run motor.
Does anybody can help me in this?? what i mean is to know if anyone have faced same problem before and If you can attach me an example of how to get through.
Regards,
Davide
03-20-2015 04:57 PM
03-20-2015 05:19 PM
Davide,
I found some screen captures, this vi worked really well the only problem I ran into was the I could not adjust for the inertia of what I was controlling so it would not follow the sinousoidal wave I needed. You can do a similar set up for analog input for position.
I highly advise of learning labview properly first, instead of just going at it. As starting small knowing what is going on( a lot of little things) and working your way up.
(i had help in this one so some of the details of the control such as outputting of the digital signal I do not comprehend fully)
Carlos
05-10-2016 02:38 PM
Hello. Good evening.
I am electronic engineering's student and I'm developing a LabVIEW VI to control one EPOS2 70/10 and a brushed DC motor and I use an incremental encoder too.
However when I run the examples provided by Maxon Motor, called MoveToRelativePosition, MoveWithVelocity, MoveWithIPM, DataRecording and GUI Demo, in which I'm basing me to build my Virtual Instrument, the VIs sometimes run, sometimes LabView stop and other times an error occurs in VCS_OpenDevice.
Could you help me solve this problem?
Thank you very much in advance.
05-10-2016 03:02 PM
Gabriel,
It has been almost 2 years since I used labview, if you follow my schematics i posted as pictures you should at least be able to run the motor.