andy pugh wrote:
> On 3 March 2011 20:12, Igor Chudov <ichu...@gmail.com> wrote:
>
>   
>> - instantiate this comp
>> - connect its motor-pos-cmd input to motor-pos-cmd of the corresponding pid
>> - connect the comp's current-in input to the output of the PID
>> - Connect the current-out output to the DAC
>>
>> Right?
>>     
>
> Exactly.
> loadrt timeout
> addf timeout.0 servo-thread
>
>   
You have to be careful where you put the addf command.  I think you will 
need to put it in the
ppmc_load.hal file before this line :

addf ppmc.0.write servo-thread

The reason is if it is in the wrong place (ie. before the addf pid.xxxx
line or after the addf ppmc.0.write line, it will not be executed in the same
servo cycle as the read encoders - calculate PID - write to DACs sequence, and
will add a delay of one additional servo cycle to the flow of data.  This will
likely cause the servo to become unstable or at least harder to tune.

So,you can't put all the commands in a separate file, or it will be performed
AFTER the ppmc.0.write function.

Jon


> net timeout.0.current-in <= PID.2.out
> (etc)
>
> setp timeout.0.default-current 0
> setp timeout.0.timeout 5 (if you want a shorter one.
>
>   


------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to