Difference between revisions of "PLS Timing Issues"

From SoftMC-Wiki
Jump to: navigation, search
(.HWassistance)
 
(59 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Introduction ==
+
<big><span style="color: red">'''Replaced by NEW PLS article - [[Programmable Limit Switch|Programmable Limit Switch]]'''</span></big>
This document describes timing issues of PLS triggering.
 
  
'''The following variables influence PLS timing.'''
+
<strike>
  
[[ Axystems:MC-Basic:axis.POSITIONERRORDELAY| PositionErrorDelay]]
 
  
== <nowiki><pls>.HWassistance</nowiki> ==
+
==Introduction ==  
See: [[Axystems:MC-Basic:pls.HWASSISTANCE | HWASSISTANCE ]] Switches on the high-accuracy timing of PLS.
+
This article describes timing issues of PLS triggering.
  
* '''''If not set''''' the the PLS outputs are switched at the time of passing of the PLS source through the PLS position. The time of PLS output switch is always on integer number of motion-samples so the time accuracy of the PLS in this case equals the motion-sample duration (Ser.CycleTime). For the given example of '''PositionErrorDelay''' = 3 above, in the case the PLS source is position command, the PLS output will be switched '''''2 samples before''''' the position command is set in the drive and in case the PLS source is position feedback it will be switched '''''1 sample after''''' the event.<br/>
+
The following variables affect PLS timing:
  
* '''In case the HWassistance is turned on''', the time of PLS output switch will be computed in microseconds accuracy. The exact time of PLS output switch is computed according the current velocity and acceleration values of the sample before and after the PLS position. In case of '''constant acceleration''' or linear '''acceleration change''' between the two samples time of the PLS is computed exactly up to the '''±1μsec'''.  
+
*[[MC-Basic:element.POSITIONERRORDELAY| Axis.PositionErrorDelay]]
 +
*[[MC-Basic:pls.HWASSISTANCE| PLS.HWAssistance ]]
 +
*[[MC-Basic:pls.PLSPropagationDelay| PLS.PLSPropagationDelay ]]
  
{{Note | Note that with fw version <nowiki>4.5.29</nowiki> and before, the position command delay of P<nowiki>ositionErrorDelay-2</nowiki> <br/> samples will be taken into account as <nowiki>hard-coded</nowiki> expression. This means that in case of <nowiki>PositionErrorDelay = 3</nowiki>,<br/> when the PLSposition is passed, the output will be triggered after 1 sample delay plus Δt, the inter-sample delay.}}
+
Samples in motion profiles, in which the acceleration profile changes its basic formula (jerk discontinuity), will have an increased error in computing the inter-sample delay (Δt). This is due to the unavailability of an exact profile change parameter within one sample. In addition, higher-order (e.g., quadratic, cube, sine) acceleration profiles are not modeled in the inter-sample delay (Δt) calculations, and thus an error of JT3/6 is to be expected.
  
{{Note | '''Hwassistance''' is available only in systems that have the hardware that support this functionality <!-- (MIB) -->}}
+
'''An increased error in computing''' the inter-sample delay (Δt) will occur in all cases of non-linear acceleration change:
 
 
At samples in motion profile where acceleration profile change its basic formula (jerk discontinuity) there will be an increased error in computing the inter-sample delay (Δt). This is due to the in-availability of exact profile change parameter inside of one sample. Also the higher-order (quadratic, cube, sine, ….) acceleration profiles are not modeled in the inter-sample delay (Δt) calculations, therefore an error of JT3/6 is to be expected.
 
 
 
In all cases of non-linear acceleration change:
 
  
 
* sine acceleration
 
* sine acceleration
 
* one-sample duration movements  
 
* one-sample duration movements  
* velocity-trapeze corners
+
* trapezoidal velocity corners
* acceleration-trapeze corners
+
* trapezoidal acceleration corners
 
* extreme acceleration (so acc phase duration is 1 sample) or very short movement  
 
* extreme acceleration (so acc phase duration is 1 sample) or very short movement  
  
<center><gallery>
+
It is difficult to estimate the position error introduced, but it is typically around JT<sup>3</sup>/6.
 +
 
 +
<center><gallery widths=300px heights=200px perrow=12>  
 
Image:Axystems;Plstiming-acc.png|''Illustration 1: Error introduced due to the jerk value in s'''ine-acceleration''' profile at the transition sample between acceleration saturation and acceleration decrease''
 
Image:Axystems;Plstiming-acc.png|''Illustration 1: Error introduced due to the jerk value in s'''ine-acceleration''' profile at the transition sample between acceleration saturation and acceleration decrease''
Image:Axystems;Plstiming-tracc.png|''Illustration 2: Error introduced due to the acceleration change in '''trapeze-acceleration''' profile at the transition sample between acceleration saturation and acceleration decrease''
+
Image:Axystems;Plstiming-tracc.png|''Illustration 2: Error introduced due to the acceleration change in '''trapezoidal acceleration''' profile at the transition sample between acceleration saturation and acceleration decrease''
Image:Axystems;Plstiming-trvel.png|''Illustration 3: Error introduced due to the transition point between cruise velocity and deceleration in '''trapeze-velocity''' profile''
+
Image:Axystems;Plstiming-trvel.png|''Illustration 3: Error introduced due to the transition point between cruise velocity and deceleration in '''trapezoidal velocity''' profile''
 
</gallery></center>
 
</gallery></center>
  
'''''there will be an increased error in computing of''' '''the inter-sample delay (Δt)! It is very difficult to estimate the position error introduced but it is typically around JT<sup>3</sup>/6.'''''
+
<br/>{{Note | In cases of extremely short motions (velocity or acceleration too high or path length too short) even if user commanded sine-acceleration profile the system will automatically change it to trapezoidal velocity.  }}<br/>
  
 
+
{{Note | PLS will always be triggered too late if it is triggered by a feedback source such as PFB or PEXT. But in this case no additional delay should be added! }}<br/>
{{Note | Note that in cases of extremely short motions (velocity or acceleration too high or path length too short) even if user commanded sine-acceleration profile the system will automatically change it to velocity-trapeze.  }}
 
 
 
{{Note | Note that currently in <nowiki>fw 4.5.29</nowiki> and older there is not distinction between different PLS sources. If PLS is triggered by a “feedback” source like PFB or PEXT we will always have PLS triggered too late. But in this case no additional delay should be added! }}
 
  
 
== Buffering ==
 
== Buffering ==
  
As noted in previous paragraphs the delay of the motion-bus forces the system to postpone the switching of the PLS output. Therefore the detected PLS output switch events are stored in the buffer and executed after the estimated delay.
+
The delay of the motion bus forces the system to postpone the switching of the PLS output. Therefore, the detected PLS output switch events are stored in the buffer and executed after the estimated delay.
 
 
There are two different buffers ('''per each PLS''') dedicated for the PLS delayed outputs:
 
 
 
 
 
* Motion-Bus PLS delay Buffer, used for storing PLS-delays through multiple sampling periods. The size of this buffer is: 2 (FW ver: '''4.5.29''') - 4*10(FW ver: '''4.5.31''' and later)
 
* Digital Output microsecond delay buffer. Used for storing microsecond delays of only one motion-bus sample. The size of this buffer is '''4 '''and it is hardware defined.<br/>
 
 
 
 
 
{{Note|Note that in the systems with relatively big motion-bus delay <nowiki>(PositionErrorDelay >> 3)</nowiki> number of the stored PLS switches can be bigger then the Motion-Bus Delay Buffer size. In this case the error returned will be 3298: '''"The PLS positions are too close to each other and/or the velocity is too high for output to toggle"'''. In case there is more then 4 PLS in one sample the IO error will be returned 21011: '''"Too many PLS toggling requested "'''.}}
 
 
 
 
 
=== PLSPropagationDelay ===
 
 
 
----
 
 
 
See: [[ Axystems:MC-Basic:pls.PLSPropagationDelay | PLSPropagationDelay ]]
 
 
 
== Debug variables (new properties) ==
 
  
Two read-only properties returning in microseconds the time of the IO toggle. If not initiated -1 will be returned.
+
Two different buffers ('''per each PLS''') are dedicated to the PLS delayed outputs:
  
  
=== <nowiki><pls>.HWIOtime[<index>]</nowiki> ===
+
* Motion Bus PLS Delay buffer. Used for storing PLS-delays through multiple sampling periods. The size of this buffer is:  4*10.
 +
* Digital Output Microsecond Delay buffer. Used for storing microsecond delays of only one motion bus sample. The size of this buffer is '''4 ''' and it is hardware defined.<br/>  
  
See: [[Axystems:MC-Basic:pls.HWIOtime |HWIOtime ]]
+
<br/>{{Note|In systems with a relatively large motion bus delay <nowiki>(PositionErrorDelay >> 3)</nowiki> number of the stored PLS switches can be greater than the Motion Bus Delay Buffer size. In this case error 3298 will be returned: '''"The PLS positions are too close to each other and/or the velocity is too high for output to toggle"'''. If one sampl has more than 4 PLS, IO error 21011 will be returned: '''"Too many PLS toggling requested "'''.}}<br/>
  
 +
== Debug Variables ==
  
=== <nowiki><pls>.PLSdelaytime[<index>]</nowiki> ===
+
Two read-only properties returning in microseconds the time of the IO toggle.  
  
 +
[[MC-Basic:pls.HWIOtime|PLS.HWIOtime ]]
  
See: [[Axystems:MC-Basic:pls.PLSdelaytime | PLSdelaytime]]
+
[[MC-Basic:pls.PLSdelaytime| PLS.PLSdelaytime]]
  
== General illustration of PLS-timing ==
+
== PLS-Timing Diagram ==
  
 
<center>
 
<center>
Line 83: Line 63:
  
  
[[Category:Axystems:Motion Control]]
+
[[Category:Motion Control]]
[[Category:Axystems:Motion:PLS]]
+
<!-- [[Category:Motion:PLS]] -->
[[Category:Axystems:Motion:HW-PLS]]
+
<!-- [[Category:Motion:HW-PLS]] -->
  
--[[User:Miborich|Mirko]] 10:23, 15 November 2010 (CET)
+
</strike>

Latest revision as of 11:17, 16 October 2018

Replaced by NEW PLS article - Programmable Limit Switch


Introduction

This article describes timing issues of PLS triggering.

The following variables affect PLS timing:

Samples in motion profiles, in which the acceleration profile changes its basic formula (jerk discontinuity), will have an increased error in computing the inter-sample delay (Δt). This is due to the unavailability of an exact profile change parameter within one sample. In addition, higher-order (e.g., quadratic, cube, sine) acceleration profiles are not modeled in the inter-sample delay (Δt) calculations, and thus an error of JT3/6 is to be expected.

An increased error in computing the inter-sample delay (Δt) will occur in all cases of non-linear acceleration change:

  • sine acceleration
  • one-sample duration movements
  • trapezoidal velocity corners
  • trapezoidal acceleration corners
  • extreme acceleration (so acc phase duration is 1 sample) or very short movement

It is difficult to estimate the position error introduced, but it is typically around JT3/6.


NOTE-Info.svgNOTE
In cases of extremely short motions (velocity or acceleration too high or path length too short) even if user commanded sine-acceleration profile the system will automatically change it to trapezoidal velocity.

NOTE-Info.svgNOTE
PLS will always be triggered too late if it is triggered by a feedback source such as PFB or PEXT. But in this case no additional delay should be added!

Buffering

The delay of the motion bus forces the system to postpone the switching of the PLS output. Therefore, the detected PLS output switch events are stored in the buffer and executed after the estimated delay.

Two different buffers (per each PLS) are dedicated to the PLS delayed outputs:


  • Motion Bus PLS Delay buffer. Used for storing PLS-delays through multiple sampling periods. The size of this buffer is: 4*10.
  • Digital Output Microsecond Delay buffer. Used for storing microsecond delays of only one motion bus sample. The size of this buffer is 4 and it is hardware defined.

NOTE-Info.svgNOTE
In systems with a relatively large motion bus delay (PositionErrorDelay >> 3) number of the stored PLS switches can be greater than the Motion Bus Delay Buffer size. In this case error 3298 will be returned: "The PLS positions are too close to each other and/or the velocity is too high for output to toggle". If one sampl has more than 4 PLS, IO error 21011 will be returned: "Too many PLS toggling requested ".

Debug Variables

Two read-only properties returning in microseconds the time of the IO toggle.

PLS.HWIOtime

PLS.PLSdelaytime

PLS-Timing Diagram

Axystems;Plstiming-scheme.png