4.5.5. TTL synchronization¶
220.127.116.11. Principle of operation¶
TTL-synchronization is used to synchronize controller motion with external devices and/or events. For example, the controller can output synchronization pulse each time it moves a certain distance. Vice versa, controller can shift a certain distance on incoming synchronization pulse, for example from an experimental setup which is ready to move to the next measurement position.
To use mechanical contacts as an input synchronization signal a contact debouncing is provided. One can set minimum input pulse length which is recognized as a valid synchronization signal. An active state is a logical one (see Input parameters), and a raising edge is considered to be the start of a signal. However, if for some reason this is undesirable, both options may be inverted independently.
|Logic zero level||0 V|
|Logic one level||3.3 V|
If simultaneous start of several controllers in a multiaxis system is desirable, minimum input pulse length should be the same for all controllers. Contact debouncing should not be used in systems with no mechanical contacts and short noise pulses in synchronization input channel. One should use an RC-circuit which would filter these noise pulses instead.
Synchronization in important in multiaxis systems because it allows one to start movement on several axes simultaneously. To do this all axes are prepared to start the movement, all slave axes are set to start moving on input synchronization pulse, one master axis is set to output a synchronization pulse on the start of the movement. Master axis output is connected to slave axes’ input. In this setup any movement of the master axis leads to immediate response of all connected axes.
One should set minimum input sync pulse length to 0 if this kind of connection is used. This disables contact debouncing, but since there are no mechanical contacts it is not needed. If minimum input sync pulse length is not zero then to avoid desynchronization of master and slave axes one should set input sync pulse length the same for all controllers, connect syncout to both master and slave inputs and issue start command by activating input manually.
Synchronization input and output are independent from each other and other means of motion control. Control through XiLab application or any other user application, joystick control and left-right buttons control are independent of input/output synchronization state. Last command always takes priority. For example, a movement command sent from XiLab will cancel current movement which happened because of input sync pulse, but will not affect output sync state. Next input sync pulse will cancel current movement initiated by user program and will replace it with movement command according to sync in settings.
Sync in settings may be saved in controller flash (non-volatile) memory. In this case everything related to synchronization may also be said about autonomous controller operation. For example, you may set up shift on offset on syncin pulse with syncout pulse on movement stop and connect the controller to a standalone measurement device, which starts measurements on its own input sync pulse and outputs a sync pulse on measurement end. Then you can run such a system without a PC, because after the first sync pulse all measurements and movements will happen automatically.
18.104.22.168. Sync in¶
Syncronization input has a setting, which defines minimum syncin pulse length which may be registered. This length is measured in microseconds. Use this setting to decrease controller sensitivity to noise. Synchronization input may be turned on or off. If it is on, then a sync in pulse will lead to a situation as if Predefined displacement mode command has taken place, which takes its Position and Speed from syncin settings. If syncin settings are changed during the time the movement takes place it will not change current movement parameters. Movement parameters will change on the next front on syncronization input. This designed deliberately to allow one to set up next shift parameters in multiaxis systems during movement.
When you turn on or reboot the controller at the input voltage level of the synchronize input is present, which is considered to be active, the controller interprets it as if Predefined displacement mode command has taken place.
Position and Speed are two separate variables which also may be saved in non-volatilve controller memory. They are used only with synchronization input.
Syncin movement obeys acceleration, max speed settings and all other settings which are related to motion. Their incorrect setting may disrupt coordinated movement in multiaxis system.
If a second syncin pulse is received while controller is still moving then the end position will be offset by two times the shift distance from the start, if a third pulse is received, then by three times, etc.
Default setting is active state is one, movement on raising edge. Synchronization input may be inverted to the active state is zero, movement on trailing edge.
Inverted synchronization input setting will lead to the change in the definition of active/inactive state which may be seen, for example, in controller status. However, programmatical inversion of the syncin state by itself will not lead to the start of the movement, even if the transition happened into the active state.
22.214.171.124. Sync out¶
Output synchronization is used to control external devices tied to controller movement events. Sync out pulse can be emitted on start and/or stop of the movement, and/or on each shift on the preset distance. ImpulseTime setting defines the length of sync pulse, either in microseconds or in distance units. Synchronization output can be switched into general purpose digital output mode. In this mode it is possible to set zero/one output logic level programmatically.
If syncout pulse length is measured in distance units and, for example, is equal to 10 stepper motor steps and “syncout pulse on stop” mode is active, then the active state on synchronization output will be set on the movement end, but will be cleared only when the motor will move 10 more steps during the next movement.
If you wish to reconfigure synchronization output and are not sure which state is it in, change its state to general purpose output and set the desired logic level.
Periodic syncout pulse generation imitates revolution sensor with reducing gear. Coordinates which trigger syncout pulse generation are counted from zero position and not from the position the controller is in at the start of the movement. For example, if synchronization output is set up to generate pulses every 1000 steps then pulses will be generated in positions 0, 1000, 2000, 3000, etc. Pulse generation works when moving in both directions. Pulse is generated when the quotient of current coordinate and pulse generation period changes. That is, pulse is generated when position 1000 is reached when moving in the direction of increasing position and it is generated when position 1000 is left when moving in the direction of decreasing position. Also, syncout pulse is always generated when position 0 is reached from any direction (including the case when position is reset by the ZERO button).
Whenever syncout pulses overlap they are merged into one pulse.
Synchronization settings setup in XiLab is described in Synchronization settings section.