PTS Release Note V1.9

January 1999

This document describes the changes to the PTS software between version 1.8.5.2 and version 1.9.1.1.

CANopen I/O

PTS systems with CANbus can now access additional analogue and digital I/O on devices which implement CANOpen DS401 standard. Up to 8 groups of digital inputs or 4 16bit analogue inputs and up to 8 groups of digital outputs or 4 16bit analogue outputs can be accessed in this way. The digital I/O is mapped onto groups 10 upwards and the following commands are available:

`SO, CO, DI, EI, BI, MI, II, IO, RI, RO, LI`

The analogue inputs are mapped onto variables $EI1 to $EI4 which will updated whenever the CANopen device transmits data. The analogue outputs are mapped onto variables $EO1 to $EO4. Writing to any of these variables causes the analogue output to be updated. $EO1 to $EO4 also work for digital outputs, each writing 8 bits of data, therefore bit patterns can be written to the first 32 bits of digital outputs.

A diagnostic shell is available using the QC command. This shows the current configuration of the CANOpen I/O and allows CANopen messages to be sent and received, for one-time configuration of a CANopen device. CANOpen I/O must be enabled with a software key with the feature name canopen and a version of 0.

SERVOnet: to re-establish communications with a CANopen device use the PTS command RN61 which issues a global NMT wakeup.

Variable Assignment from RI Command

The result of a RI or RO command can now be assigned to a variable. This allows the state of a single I/O line or a group of lines to be read into a variable and used in later calculations or decisions. The following examples show how the commands work:

`$RI5=RI1:5 # Read input line 1:5 into $RI5 (gives 0 or 1)`
`$RG2=RI2: # Read input group 2 into $RG2 (gives 0 to 255)`
`$RG1=RO # Read default output group 1 into $RG1`
`$RO8=RO8 # Read output line 1:8 into $RO8`

Where a whole group is read into a variable line 1 is the least significant bit (value 1) and line 8 is the most significant bit (value 128). To optimize performance, when RI, RO and LC are assigned to a variable the commands are executed at channel level.

Bit Manipulation Operators

A number of new maths operators have been added to allow easier bit manipulation operations on variables read from input lines. The new operators in order of precedence are:

Symbol | Operation | Example
~ | Bitwise NOT | $A=0/$B=(~$A) # Result is -1
! | Logical NOT | $A=12345/$B=(!$A) # Result is 0
<< | Left shift | $A=1/$B=($A<<8) # Result is 256
>> | Right Shift | $A=256/$B=($A>>8) # Result is 1
& | Bitwise AND | $A=254/$B=($A&7) # Result is 6
^ | Bitwise XOR | $A=6/$B=($A^7) # Result is 1
| | Bitwise OR | $A=6/$B=($A|3) # Result is 7

The bitwise NOT & logical NOT are both unary operators which take a single operand on the right hand side. The bitwise NOT inverts each bit of the operand whereas the logical NOT gives either 1 (TRUE) or 0 (FALSE) depending on whether the operand is FALSE (0) or TRUE (<>0) respectively.

The shift operators shift the left operand by the number of bits given by the right operand. A left shift fills the lower bits with zeros. A left shift by 1 bit is equivalent to multiplying by 2. A right shift fills the upper bits with the sign bit (1 for a negative value, 0 for a positive value). A right shift by 1 bit is equivalent to dividing by 2.

Bitwise AND, XOR & OR perform the standard logical operations on the two operands bit by bit. The following truth table shows the effect of the 3 operations:

Left | Right | AND | XOR | OR
0 | 0 | 0 | 0 | 0
0 | 1 | 0 | 1 | 1
1 | 0 | 0 | 1 | 1
1 | 1 | 1 | 0 | 1

SynchroLink Commands on SERVOnet

All the SynchroLink commands are now available on SERVOnet systems as well. The commands are:

LK Sets current channel as a map master on SynchroLink MLn:c Map link to master axis on node n, channel c NLn:c Map link to differential axis on node n, channel c XN Execute sequence on remote SynchroLink nodes

XN Modification

If an XN command is received by a SynchroLink node which has no sequence of that number defined, the value is written to the reserved variable $XN instead.

SynchroLink Command Improvements

The SynchroLink commands LK, ML, NL & UL have been improved to make the map link checks more rigourous and to ensure that LK1 is not turned off by UL.

Host/Channel Communications

The speed of communications between host and channels on PTS Mk2 and SERVOnet systems has been improved by about 40%.

Sequence and Expression Nesting

It is now possible to nest sequences to any depth as long as there is enough system memory available. Where previously the PTS used to give a Stack Overflow error when sequence nesting went beyond 5 levels, now extra memory is allocated and execution continues.

Expressions can now be nested 10 deep and there is no longer a tradeoff between sequence nesting and expression nesting levels.

GX Improvements

Two improvements have been made to the GX command. Firstly GX in a parallel sequence will now cleanly abort other parallel branches but not its own. Secondly GX will no longer abort commands following in the same sequence as sometimes happened previously under certain circumstances.

RD Order of Restore

RD now restores sequences, then maps, then parameters, rather than restoring parameters first as previously. This avoids problems where a DI line is restored which refers to a sequence which has not yet been restored.

ES Improvements

It is no longer possible to put ES, EM, EP or ET commands inside a sequence. If an error is detected while a sequence is being entered, the error message will be displayed and the PTS will now correctly display the Sn: prompt instead of showing a channel status prompt. Errors which occur during sequence entry no longer set the VE variable or trigger the UE sequence.

Channel Level Variable Write

Channel level commands which write to variables are now executed at channel level rather than at host level as previously. This has been done to improve the execution speed since it reduces the amount of communication between host and channels.

LA Sequence Order

Sequences listed by LA are now shown in numerical order to make it easier to find your way around a PTS program.

DI Line Execution

A DI line which contains host level commands but not a CH command is now executed starting on the channel where it is defined instead of on the current channel.

Variable and DI Line Blocking at Startup

All trigger variables and DI lines are inhibited from start-up until the end of the auto-start sequence. This should make the auto-start sequence much shorter since trigger variables, etc. can now be saved by SP without any fear of them being triggered during start-up.

Two new commands have been added, GB and GE. GB blocks all DI lines on all channels while GE enables all DI lines. If a MV or GB command is put in the auto-start sequence, then variables or DI lines will remained inhibited after the auto- start sequence has finished. If however a EV or GE command is put in the auto-start sequence, then variables or DI lines will be enabled from that point.

Arithmetic Overflow

Arithmetic overflow is now detected on integer addition, subtraction and multiplication. This causes an error message to be displayed and causes the associated sequence, etc. to be aborted unless in ED mode or restoring parameters. Overflow is detected when an operation would give a result such that:

`result < -2147483648 OR result > 2147483647`

Expression Errors

Errors which occur during expression evaluation, such as an undefined variable or arithmetic overflow, are now reported with a better diagnostic of where the error occurred.

LE Enhancement

The LE command can now take an optional parameter between 1 and 10 which defines how many errors are to be listed. The 10 most recent errors are kept and some or all of them can now be listed. For compatibility with previous systems, LE with no parameter lists the last error only.

ZZ Debug Options

Two new debug options have been added. When bit 6 of ZZ is set the PTS prints a diagnostic message whenever a sequence, DI line or trigger variable is executed. When bit 7 of ZZ is set the PTS prints a diagnostic message every time a new line of a sequence is executed. This allows reasonably detailed tracing of the PTS operation without the flood of messages output by the ZZ1 option. If debug buffering has been enabled with the ZB command then output will be buffered. A summary of the diagnostic messages is shown below:

ZZ bit | Event | Message
6 | Sequence | XSnn
DI line | DIg:l
Trigger variable | $VAR>
7 | Sequence line | Snnn:l
Sequence end | Snnn:X

To make debug messages stand out from normal output they are now enclosed in braces {}.

Variable Monitoring

It is now possible to monitor changes to a restricted set of variables. The command ZM$VAR enables monitoring of the specified variable and may be used to monitor several variables at once. The command ZO$VAR disables monitoring of a variable. When a variable is being monitored its name and value are listed each time the variable is written to. ZM with no parameter causes all the variables currently being monitored to be listed with their values. ZO with no parameter disables monitoring on all variables.

Parameter Saving

The Mini Machine Controller and the Mini-PTS 2+1/3 use a serial EEPROM for saving parameters. This device has a fairly slow cycle time which led in the past to very long times for SP. The SP time has now been reduced by a factor of 3 on these platforms to ease this problem.

All PTS platforms now display a rotating bar while sequences, maps and parameters are being saved or restored. This gives an indication that the PTS is still working so that it is less likely to be turned off prematurely. Also when the save or restore is finished, the PTS prints "Done" as a confirmation that it is safe to turn off, etc.

DG Display

Two problems with the DG display have been fixed. The first was that the data was misaligned if TI was used. The second was that the sample at the start of the buffer contained incorrect data.

Trace Data Synchronization

The method of capturing trace data on the SERVOnet and rack systems has been modified to ensure that data from different nodes is correctly synchronized. This has been done to cure a problem where data from different nodes could come from different clock ticks and therefore showed an inaccurate picture. This change has also had the effect of speeding the rate of data capture in scope mode (TR, DM with no parameter). On a Machine Controller it is now possible to capture data over Ethernet at up to 128 samples/second.

SERVOnet Restore with No Channels

Previously if parameters were saved on a SERVOnet system, the unit powered down and then powered up with no SERVOnet connection, the system failed with a bus error when trying to restore ME or UE. This problem has now been fixed.

SY Command

SY now takes a binary parameter. Bit 0 turns channel prompts on or off as before. Bit 1 disables echo of characters entered on port A when set. This new feature is primarily meant to be used by the PTS Toolkit to improve file download performance. A summary of the parameter is shown below:

Bit | Value | Meaning
--- | --- | ---
0 | 0 | Channel status prompt disabled
1 | Prompt enabled (default)
1 | 0 | Command echo enabled (default)
1 | Command echo disabled

XM Query

When XM is entered without a parameter the map being executed on the current channel is displayed. It is not possible to change the map number using this method. If no map is being executed the XM command returns zero but in this case the mapping state can be found from the channel prompt.

Expansion Board

The SRV-4 based systems now support a new I/O expansion board (SRVX-2424) in addition to the existing one (SRVX-248). The new board has 24 inputs and 24 outputs, giving a total of 40 inputs and 32 outputs. It also retains the 4:1 analogue multiplexer as on the SRVX-248 unit. When the new expansion board is fitted, there are 5 input groups and 4 output groups available, and the virtual inputs and outputs are removed.

The timer/counter functions are now always enabled. They were previously disabled when the expansion board is fitted.

Motor Error/Motor Off Ramp

The open loop analogue output ramp time set by the EA parameter now applies to the MO motor off command as well as to any motor error shutdown.

Motor Brake

All systems now support an automatic motor brake function. Operation of the motor brake is as follows: When a channel is switched from motor off to position control mode, the drive is enabled before releasing the brake. When a channel is shut down to motor off, the brake is engaged before disabling the drive. The delay time between enabling the drive and releasing the brake, or engaging the brake and disabling the drive, is set by the BD brake delay parameter. On systems with an external drive, the brake control output line is defined with the OB command. On Q-Drive systems, an internal brake is available as an option, and the OB command is not required unless an external brake is also used.

Display Following Error

The FE command displays the motor following error. This allows the following error value to be used with variables if required.

Initialisation of Q-Drives with DZ1

Q-Drive systems now support an initialisation function designed to mimic the action of a normal motor and encoder with a marker pulse. If the Q-Drive motor channel is using the resolver position data, the IN command normally sets the channel position to the raw resolver position value without moving the motor. If DZ is set to 1, then the IN command moves the motor to the zero position defined by the resolver data.

Mapping with Reference Error Correction

A new option has been added to the LW link options word, which changes the master position data sent to its slave axes. In normal operation, any reference corrections on the master axis are executed by the master axis (or by the slave axis if correction is suppressed on the master). The new feature adds the reference correction into the position data sent to the slave axis, such that the slave follows the master position including any reference correction. This is useful in applications where the master and slave axes are linked by the material passing through the machine to prevent the material being stretched or losing tension between the two motors.

Tension Control at Low Speed

The tension control action has been extended to provide better control at low machine speeds. In addition to the existing ratio control action, a speed control term has been added to the tension control loop. The tension control speed term has its own pid gain parameters independent of the ratio control pid terms. The new gain commands are VP, VI and VD.

A slave axis in tension control now has two components to its motion. It is mapped to the master axis with the speed ratio between master and slave determined by the tension control loop using AP, AI and AD gain terms, as before. The new speed control loop uses VP, VI and VD to calculate an additional speed term for the slave axis, added to the mapped master speed. In this way, at high machine speeds the ratio control term dominates, while at low speeds, when the ratio control loop acts very slowly, the speed control term remains active.

Local Slave Axis Delay

When a slave axis is linked to a master axis on a different board or node, there is always a 1 tick delay between the master and slave positions. This is required by the data transmission from master to slave on both bus based and SERVOnet systems. However, a slave axis linked to a local master axis on the same unit does not have this delay, as the single processor on the unit can ensure that the master position is updated before the slave axis uses it in the same tick.

This difference between slaves linked to local or remote master axes can be a nuisance in some applications, where it is important to keep all slave axes consistent. A new option in LW is now available that adds in the same delay for local slave axes, to make them behave in the same way as slaves linked to remote masters.

Software Clutch

The software clutch function has been modified to reduce processing time. It is now defined by a distance (in master axis counts) rather than by a time. The CT command has been replaced by a new CL command which sets the clutch length.

Support for SinCos on Q-Drive

IRT have added support for high resolution position feedback into the latest versions of the drive firmware, using the Stegmann SinCos devices. The NB command has been modified to allow the PTS to make use of this. When the unit is set up to use the drive position feedback, the NB parameter sets the number of position data bits per turn of the motor. The normal resolver provides 12 data bits (4096 counts) per turn. The NB command now allows the channel to use up to 16 bits (65536 counts) per turn, where the appropriate data is available from the drive.

New Hardware Versions

There are two new units available at this release.

1. The MiniPTS 1+1 is a standalone version of the Q-Drive SERVOnet controller for use with external drives. It has two incremental encoder inputs, two +/-10V analogue outputs, one drive enable relay, eight digital inputs and outputs. It also has the CANbus interface for SERVOnet applications.
2. The Stepper controller is a new unit which controls up to three 2-phase bipolar stepper motors for use with SERVOnet systems. It also has eight digital inputs and outputs.

Obsolete Commands

The following commands are obsolete and have been removed:

`BL, IT, SC, TQ & XT`

Other Improvements

A number of additional small improvements have been made. Some of these are listed here.

- Incremental encoder position readings are more accurate.
- Fixed map table interpolation with large MS values (>256).
- When MW bit 1 is set, initial map position now wraps around on both master and slave axis bound values, and also works correctly when GM is negative.
- Deceleration ramp on IN now always starts at correct speed.
- All Q-Drive alarm bits are supported, and give error messages.
- Maximum speed for SV depends on encoder type set by FS.
- MG and BG operate correctly when two inputs change in the same tick, allowing the lower numbered input and masking or blocking the higher numbered input.
- Executing the FS command on a master axis no longer causes map timeout errors on slave axes of all masters on the same unit.
- Removed time delays in FC and VM commands.
- Improved handling of SB and RF when RL > SB.
- RH timer is reset to zero if reference is detected and then ignored.
- Absolute encoder IN now allows full encoder count range.

Bugs Fixed

The following problems have been fixed between Release 1.8.5.2 and Release 1.9.1.1. In each case the problem reference number and a brief description of the problem are given followed by information on the fix.

214

The WI command with no following sign does not return an error although it is incorrect. Fixed at V1.9.1.1.

215

A new prompt is not always displayed following error messages, etc. This problem has been reduced at V1.9.1.1.

MPTS-339

The DM display does not always show the reference error value in the right-hand column of the display. Fixed at V1.9.1.1.

MPTS-360

On 1.8.5.2, motor error numbers are not accessible to Modbus or Ethernet at the defined parameter address. Fixed at V1.8.5.3.

MPTS-361

On 1.8.5.2 Q-Drive, QP command (QPaa/nn) in a sequence cannot be restored from NVM. Fixed at V1.9.1.1.

MPTS-362

Operator Panel version 1.9 shows BUSY on start, but does not clear it when alive. Fixed at V1.9.1.1 (Operator V1.10).

MPTS-363

When using VM2 virtual mode with real encoder data, it is not possible to map a slave axis to the real encoder position, but only to the virtual position as for VM1. Fixed at V1.9.1.1. Now uses LW bit 0 to select between virtual (demand) position and real (measured) position.

MPTS-364

Default parameters for a MiniPTS give a parameter out of range error when restored at power up or an RD command. Error occurs on CH5/FC5. Fixed at V1.9.1.1. FC5 no longer gives parameter out of range.

MPTS-366

SERVOnet and PTS Mk2: PO7+/$A/($B+1000) can lose the second value due to bus traffic interruption. Fixed at V1.9.1.1.

MPTS-368

Under certain circumstances when a slave axis finishes its map alignment move or clutch ramp very quickly, the state change from A or C to X is not displayed on the LEDs or the terminal prompt. Fixed at V1.9.1.1.

MPTS-369

XN is limited to 1023 (manual states 65535). Fixed at V1.9.

MPTS-370

On Q-Drive systems when using AO1 to enable the drive for open-loop operation, any motor error, MO or GF command disables the drive. Also, the AO1 command does not immediately light up the decimal point on the LED display. It lights up correctly after the next state change. Fixed at V1.9.1.1. If AO1 is defined, drive remains enabled on any motor off action.

MPTS-371

On Q-Drive PTS systems QPaa/nn does not work for negative nn. No error report is given. Fixed at V1.9.1.1.

MPTS-372

Reference error is not always correct on a virtual axis, a Q-Drive axis, or one using an ssi encoder. Fixed at V1.8.5.3.

MPTS-373

DIg:n without + or - sign does not fully clear the line definition, and gives a "line in use" error. Fixed at V1.9.1.1.

MPTS-374

Saving and restoring sequences applies bracketing to clarify mathematics. This may cause nesting level limits to be exceeded. Fixed at V1.9.1.1.

MPTS-375

IB may give a non-integer SB value, the fractional part of which is not visible to the user. Fixed at V1.9.1.1.

MPTS-376

On MiniPTS 2+1/3 and MiniPTS 4, MiniPanel data save may say FAIL erroneously. Fixed at V1.9.1.1 (Mini Panel V1.9).

MPTS-377

Reference error on channel 2 of a Q-Drive is not correct. Fixed at V1.8.5.4.

MPTS-378

Variable accesses on a SERVOnet system sometimes give silly values. May appear as though the value for one variable is being put into another variable. Fixed at V1.8.5.5.

MPTS-381

A heavily loaded system running a lot of concurrent threads can give an occasional motor position error for no apparent reason. Fixed at V1.8.5.6.

MPTS-382

Q-Drive 1+1 or SERVOnet with new IRT firmware (V2204 or V2205) reports "No response from drive" at power-up. Also fails to restore position from battery backed ram correctly, setting position to stored value plus drive shaft position. Fixed at V1.9.1.1.

MPTS-383

Tension control move to setpoint fails if AW bit 7 is set to 1. This problem was introduced at V1.8.5.1. Fixed at V1.9.1.1.