2011/12/3 Francesca Sca <fancy_...@yahoo.it>: > > >>Or: >>Motor.4-cmd = joint.4-cmd + joint.5-cmd >>Motor.5-cmd = joint.4-cmd - joint.5-cmd > >>To get correct feedback value, use last 2 equations and derive >>feedback positions: >>joint.4-fb = (motor.4-fb + motor.5-fb) / 2 >>joint.5-fb = (motor.4-fb - motor.5-fb) / 2 > > >>I think that this can easily be done with custom HAL component with 4 >>float inputs (for joint-cmd and motor-fb values) and 4 float outputs >>(for motor-cmd and joint-fb). > > You can me explain better what you suggest me? Where and how I should add > these command?
I suggest that You write Your own HAL component, like offset component or any other component, that is loaded in HAL with loadrt command. How to learn doing it? 1) Get source code of EMC2: http://wiki.linuxcnc.org/emcinfo.pl?Installing_EMC2#Getting_the_source_with_git 2) Go to ~/emc2-dev/src/hal/components folder, where are source files of different HAL components and open one of them (and save with different name). 3) Take each line one by one and try to understand, what do they mean. Sum2 is good example - it is very short, but it has lines that create floating input pins, parameters (which You do not need, but it is good example that shows the code to create them), floating output pins and also function part, where You should put in the math formulas, for example, those that I suggested as they are, modified or whatever that works for You. Here is what pins are created and what are their respective names: http://www.linuxcnc.org/docview/devel/html/man/man9/sum2.9.html Compare it with the source file of the component and learn, how those things are done. That will give You understanding, how to create Your own realtime component that can take care of different tasks. This is the way I learned to tweak EMC2. Usually I modify a component in a way that I think it should work, then try to comp--install it and then I start fixing all the mistakes I have made - I am no programmer, so I tend to make many syntax errors. > Andy pugh suggested to use the component "offset" to have > the rotation and elevation of wirst using ate the same time the two motors.. With all due respect to Andy, I did not have time to go through his suggested solution in HAL. AFAIK he knows HAL very well, so that solution should work well. It is Your choice, which path to take. Viesturs ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users