eXtended Transport System (XTS) Soft Drive - Version 3.1

Parameter Access via the PLC

The ease of reading and writing Soft Drive parameters is greatly improved in this version. All parameters are now accessible via the Axis_Ref of the mover. All Soft Drive parameters and diagnostics can be read via this single interface. Secondary values no longer need to be linked to obtain and change the Soft Drive Parameters.

 

The XTS_Utilities library contains a block FB_XTSUnit. This block will obtain ALL XTS module status and diagnostic information as well as all Soft Drive Mover Parameters. It is also possible to write any value to any Soft Drive Parameter of any mover. To use this block simply add the XTS_Utilities Library, adjust the library’s Global Parameters to match the configuration of the XTS.
MAX_MOVER_NUMBER is the number of movers on the XTS
MAX_MODULE_NUMBER is the number of XTS modules installed
MAX_EC_MASTER_PER_XTS is the number of EtherCAT Masters the XTS system has (generally one master per Infeed Module)
MAX_LAST_MESSAGE is used for the Diagnostic Message history.
The XTS modules themselves store a maximum of 25 Diagnostic Messages before the oldest messages are overwritten. To gather all the XTS information, simple create an instance of the FB_XTSUnit, and call the block. This block DOES gather a lot of data, expect an execution time of ~ 120-200us this should be called from a slower task. 120us for a 10ms task is 2.5% CPU usage, however at a 1ms update rate, 200us is 25% of the CPU.
All parameters for all modules and drives are automatically updated sequentially, it takes many cycles before all soft drives and all modules are updated. Methods for individual items can be called on demand as well.
 

The FB_XTSUnit block contains the structure stMotion, stMotion contains the number of movers (axis) and an array with all of the movers information. stMoverAxis [1] contains all the information about the first mover axis.
The structure for each Soft Drive object contains all the parameters for that object. For example the Velocity control loop. There are several helper blocks that the fbXTSUnit calls in order to gather all the appropriate Object ID’s so that the method calls work and the values can be read.
 
 
To access an Soft Drive the structure looks like this: fbXTSUnit.fbMotion.fbMoverAxis[Index].fbSoftDrive
fbSoftDrive is an instance of FB_TcSoftdrive which has many methods to get entire parameter lists

This method call

 
Will gatheter all velocity parameters and stick them in the velocityParameters structure of type ST_TcSdVelcityCtrl, it is not necessary to know the structure type. If TwinCAT set to autodeclare, it will automatically provide the proper structure type when the line of code is written and the assignment is made.
The FB_TcSoftDrive contains sub blocks, one for each parameter set and these blocks contain methods to read and write individual parameters.
 
To set the Kp value for the soft drive the following code is called
If the call did not function properly (e.g. the Object ID”s have not yet been gathered) the Set Method will return an error and the error ID can be read.