---------------------------------------------------- Precision MicroControl Corp. MFX-ETH Firmware Revision History Copyright 2002-2016 Precision MicroControl Corp. $Id: revision.txt 155 2016-07-08 16:43:29Z brian $ ---------------------------------------------------- CONFIDENTIAL AND PROPRIETARY: This file contains confidential and proprietary information that is the sole property of Precision MicroControl Corp. This confidential information is not to be copied, disclosed or reproduced in whole or in part by any means (including photocopying or storage in an information storage/retrieval system) or transmitted in any form or by any means except as authorized by written contract with Precision MicroControl Corp. Baseline PM1 Rev. 4.5a =============================================================================== 4/1/07 Imported MFXPCI code base Changes for Rev. 4.6a =============================================================================== 05/27/07 Added new parameter to Input Mode (IM) command to allow changing default polarity of home sensor input edge detection during execution of Latch Edge (LE) controller command. Default was rising edge for normally-open switches. Asserting bit 4 (i.e. IM(16)) in the mode register has the effect of changing the polarity to falling edge for normally-closed switches. 11/15/07 Added support for MFX-ETH1442 version of the controller. This is a 4 axis PWM servo, 4 axis stepper controller. Axes 1 thru 4 are configured as servos, 5 thru 8 are configured as steppers. The distinction to this board is the distribution of axes on each connector: J1: Axis 7 J2: Axis 8 J3: Axes 1 2 5 J4: Axes 3 4 6 This architecture was proposed by David who noticed that a 1440-type board could be created from lower-cost 1040-1 hardware by using the stepper encoder inputs for the servo axes. In addition, the customer can have 6 axes on only two connectors in this configuration. Changes for Rev. 4.6b =============================================================================== 01/08/08 Added support for hardware high-speed strobe function for MFX-ETH1440 version of the controller. This feature extends the capability of the compare circuit by providing a new OC mode 5 that produces a set of strobe pulses starting at the axis compare position. Rather than a firmware- mediated set of pulses, the fpga now produces a train of strobe pulses at regular encoder count intervals. The MCConfigureCompare() and MCEnableCompare() functions, as well as the corresponding MCCL calls were expanded to support the additional fpga registers required for this function. The following sequence of commands illustrates the revision: 1OC5 // set output compare mode to 5 for hardware strobe function 1LC1000 // set compare start position to 1000 counts 1NC400 // set PW = 10 uS (25E-9 * 400) 1OP10 // set strobe period to 10 encoder counts 1BC100 // start compare and issue 100 strobe pulses 01/15/08 Embedded Web server configuration support was expanded from network configuration only to add the following functions: - firmware upgrade (alternative to flash wizard) - board reconfiguration (alternative to pcdiag) Now, all non-volatile user configuration data and applications can be modified via the web server. 02/02/08 Added support for non-volatile macros. Now, all macros (0 - 1999) can be either ram-based or flash-based. Macro 0 still has no special significance and the stand-alone MC0 function will be added after the next revision of PCB when external switch inputs will be provided to override the feature. 02/10/08 Implemented jog mode (per DCX-PCI model). A resistive joystick can now be connected to any one of the ADC inputs and used as a jog mode controller. The MCJOG data structure and MCCL calls were maintained for compatability. One new function had to be added to specify which ADC port is connected to the joystick controlling the axis. aJCn JoystickChannel (a = axis; n = ADC channel) 02/15/08 Support was added to MFX-ETH1040 board type for high-speed strobe compare outputs. This feature requires a 1040-1 type controller since encoders are required for this circuit. 04/01/08 Modifications to strobe circuit - function will only exist on 1040 and 1440 stepper axes - logic modified to drive strobe circuit from encoder inputs only, for both open and closed loop modes Changes for Rev. 4.7a =============================================================================== 09/08/08 Initial release of code for 70.461.A production hardware 09/12/08 Added support for Macro 0 call. This feature can be disabled by means of dip switch(5) on the PCB to insure against fatal errors coded into flash-based macros. 09/16/08 Added support for adjustment of digital potentiometers for servo DACs. These are X9252 256-tap U/D control pots that are driven by state machine in fpga using the SO (cmd 300) MCCL call aSOn (a = axis n = signed up/down count) 09/20/08 Added support for 4MB flash and separated fpga images from RTMES load image by creating static pointers in PMON to fixed offsets. This was necessary to support the larger Spartan 3E 500 images and to allow a reasoanble RTEMS FTP file size for firmware upgrades. 9/25/08 Revised DAC logic to allow for continuous data writes to all eight devices with a free-running state machine in the fpga. There is a 2-stage latch that allows asynchronous command values from the o/s while the current value is written. Effective update rate is around 50 kHz (all channels) Changes for Rev. 4.7b =============================================================================== 10/08/08 Initial release of code for 70.600.A production hardware 10/08/08 Re-mapped auxilliary fpga I/O to support 3-bit personality field from interconnect boards and added dedicated 4-wire SPI interface to support port expander on ICN-125 board and other devices. 10/12/08 Created fpga and embedded support for 8-axis 1840 board type 11/15/08 Added strobe support for all axis types on all board architectures. 11/20/08 Completed prototype testing of direct sine commutation for 1440 and 1840 board types. Expanded OM command to support this feature, as follows: OM0x8000 commutation mode (offset angle = 0) OM0xC000 commutation mode (offset angle from encoder) OM0xA000 reset commutation logic The existing MCCL for older implementations of sine commutation were carried through with some simplfication since the FPGA now calculates prescale and repeat counts based on a single encoder resolution description using the LR command (see tech notes) 12/08/08 Modified IORST mechanism in CPLD, boot rom and application to insure that reset is held active until after the fpga is loaded. The only impact on the application is that IORST has to be released through a memory-mapped register write to the CPLD. 12/18/08 Added support for autonomous motor data broadcasts (for Gerber Innovations). This consists of network layer (IP) broadcasts to the default host that contains a sparse payload of motor data for every axis that has enabled broadcasts using a new BroadcastInterval MCCL command aBIn (n = 0 disable n = 1 enable) The data payload now consists of DAC command value, position, error and other motor table entities and will probably evolve over time. 01/08/09 Added support for the 1848 board architecture. The FPGA now contains logic that constantly writes to the 4 open-collector driver ports and reads the state of the 16 opto-input ports and stores the value in a memory-mapped register. The embedded code was modified to map the AmpEn open-collector ouput and AmpFault, CoarseHome and +/- Limits opto inputs for axes 9-12 to the offboard port expander on the ICN-125 board. New configuration files have been generated for the 1848 that specify the offboard input channels as 65-80 and output channels as 81-96. A pair of new motor table variables were created to specify the location and register offsets of the input and output ports. Changes for Rev. 4.7c =============================================================================== 01/23/09 Provided modifications to ascii command processor to eliminate latencies associated with excessive packets and acknowledges. The reply file flush operations are sprinkled throughout the embedded code, making it difficult to implement a common return point enhancement to reply data processing. This version of firmware has been changed to suppress the file flush that occurred inside the command execution processor and replacing it with a file rewind and flush when control passes back to the telnet server process. This seems to have the effect of always having the prompt character bundled with the previous response, reducing TCP packets and the resulting ACK latencies that have been observed. 02/09/09 Implemented digital control panel on web server. This will provide an API-independent configuration utility for support of 12 axes as well as the additional axis I/O located on the ICN-125 board Changes for Rev. 4.8a =============================================================================== 02/13/09 Resolved inconsistencies in all FPGA designs and produced new board type. The MFX_ETH 1800 is an 8 servo axis variety with axes numbered 1-8, unlike the 1840. It has no stepper axes, allowing for any combination of up to 8 analog servo/PWM axes and 4 sine-commutated axes. It assumes the use of an ICN-125 board to allow consistency of the amp enable pins on all 8 dsub connectors. All of the FPGA work called for a roll of the revision number to 4.8. For this and all subsequent releases of the embedded system, the FPGA revision number (e.g. 4.8) will match the major revision number of the RTEMS release (e.g. 4.8a). 02/17/09 The FPGA designs that support ICN-125 interconnect boards have been merged for each controller type such that a single FPGA image supports both ICN-120 and ICN-125 boards. The init() routine will now sense and report the attached ICN board but will not do sanity checking on the configuration data file (i.e. a config file that specifies off-board axis I/O can be installed and run with an ICN-120 board attached). An entirely new set of configuration data files (as well as exhaustive instructions on the web server to guide the proper selection) has been developed to support this unified approach to the logic. The format of the config files is as follows: mfxeth1440_3_120 ICN-120 board mfxeth1440_3_125 ICN-125 board etc... 02/18/09 A final board type (1400) was added to fill out the full range of axis counts and types. The full range of available MFX-ETH board types and the associated interconnect board options are: 1040-0 (ICN-120) 4 steppers 1040-1 (ICN-120) 1040-2 (ICN-120) 1040-3 (ICN-120) 1400-0 (ICN-120) 4 servos 1400-2 (ICN-120) 4 servos 1440-0 (ICN-120/ICN-125) 4 steppers/4 servos 1440-1 (ICN-120/ICN-125) 4 steppers/4 servos 1440-2 (ICN-120/ICN-125) 4 steppers/4 servos 1440-3 (ICN-120/ICN-125) 4 steppers/4 servos 1800-0 (ICN-120/ICN-125) 8 servos 1800-2 (ICN-120/ICN-125) 8 servos 1840-0 (ICN-120/ICN-125) 4 steppers/8 servos 1840-2 (ICN-120/ICN-125) 4 steppers/8 servos There is now distinct FPGAs and configuration files available for each of these architectures. The 1448 and 1848 are deprecated. 02/20/09 Added configuration filename string to MFX_FIRMWARE_CONFIG structure (mfxconfig.h) to allow reporting of this data through the web browser configuration utility panel 03/06/09 Added additional parameter to IM command to allow selecting alternate home input source for stepper axes that are shared with servo axes on 1440 and 1840 board types. aIM(0x40) causes the selected axis to select the alternate home sensor input port based on the following mapping: axis alternate home input 5 Digital In 3 (DI[2]) 6 Digital In 4 (DI[3]) 7 Digital In 11 (DI[10]) 8 Digital In 12 (DI[11]) This allows the JEOL ICN-190 board to perform homing of stepper axes 5 and 6 using the LE command since their stepper axis home opto inputs are mapped as shown on the interconnect board. Changes for Version PM1 Rev. 4.9a =============================================================================== 12/31/09 Added support for MFX-ETH 1080 architecture. This is an 8 pulse axis controller that requires the use of the ICN-126 interconnect board to provide the additional open-collector outputs and additional dedicated opto-isolated inputs as on the ICN-125. The final list of available configurations for the MFX-ETH are: 1040-0 (ICN-120) 4 steppers 1040-1 (ICN-120) 1040-2 (ICN-120) 1040-3 (ICN-120) 1400-0 (ICN-120) 4 servos 1400-2 (ICN-120) 1440-0 (ICN-120/ICN-125) 4 steppers/4 servos 1440-1 (ICN-120/ICN-125) 1440-2 (ICN-120/ICN-125) 1440-3 (ICN-120/ICN-125) 1080-0 (ICN-126) 8 steppers 1080-1 (ICN-126) 8 steppers 1080-2 (ICN-126) 8 steppers 1080-3 (ICN-126) 8 steppers 1800-0 (ICN-120/ICN-125) 8 servos 1800-2 (ICN-120/ICN-125) 1840-0 (ICN-120/ICN-125) 4 steppers/8 servos 1840-2 (ICN-120/ICN-125) 01/19/10 Added workaround support for CNC functions. LOF command does not work correctly since earlier bus controllers expected file stream on STDIN (RS-232 port on MFX-ETH). Since the Telnet socket task is the main ASCII command interface for API functions, the file stream does not open. The workaround was to create a /home/user in the rootfs to allow the user to directly transfer configuration and part files via FTP. This appears to work properly but will create code compatibility for users migrating from older platforms. 02/02/10 Corrected problem in background task execution that was revealed by G-code part file containing an M-code instruction which was not being executed in foreground, as expected. The macro call did not occur until completion of the part file. The revisions consisted of changing the task creation calls for the binary and ascii command interfaces from pre-empting to time slice and to setting both priorities to COMMAND_INTERFACE_TASK. The fact that the command executor was called by a pre-empting thread prevented the inline execution of the macro pointed to by the GT instruction since that task was a lower-priority time-slice background task. Also resolved a bug from 4.7c where the change to avoid the response file flush in cmdexe() also had the unwanted effect of suppressing calls to the escape() function. 02/11/10 Added functionality to allow transfer and execution of large MCCL configuration files via FTP rather than Telnet. The change consists of resurrecting the EC (execute command) function that had been deprecated. With a few modifications to allow string literal filenames, the function opens the command file that has been FTP'd to /home/user, parses each line and passes them to the ASCII command interpreter. The command syntax is EC"" Based upon the changes to the mechanism for transfering data files, the following functions will be deprecated LO load file LOF load config file RUE run part file enable RCE run config file enable RWE run work file enable RTE run tool file enable 03/09/10 Testing of the ICN-125 board on 09/03/09 revealed a failure of the SPI interface. The new logic has been built on ISE 10.1 and the variation of place and route revealed a flaw on the SPI clock output. It was a combinatorial term and a small glitch was seen following the 16th clock pulse - enough for the port expander to detect. The fix was to register the SPI CLK and SPI DIN outputs. Also, the DCM divisor was changed to 8, resulting in a change in the SPI clock frequency to 2 MHz from the previous 4 MHz, to reduce power and noise. 03/23/10 Added function to allow direct query of all G-code system variables. New extended command mnemonic is GetCncVariable (function # 408) GCVn n = variable number (returns double in accumulator) 04/01/10 Added developer command to allow direct writes to DAC by channel - not by axis number. This was done to simplify the production test macros that are used to measure the outputs of 8 analog channel controllers. Command mnemonic is WritedaC (WC = function 166). It takes an axis number 1-8 but ignores the error checking of the system and maps the axis to the DAC channel, regardless of board type. The function wc() is in misccmd.c 06/22/10 Added capability to set default power-on PID loop rate from dip switch. Code was added to init.c to test the state of dip_sw(5) and set the loop rate divisor as follows sw(5) divisor PID rate off 4 4 kHz on 1 16 kHz Changes for Version NM1 Rev. 4.9a =============================================================================== 06/20/10 Added support NanoMotion piezo motor modfications. This includes the following elements in the PID loop: 1. An integrator preload value for positive and negative position moves can be programmed that result in a one cycle command voltage output which is intended to overcome the piezo motor stiction. 2. A position dead band zone max and min can be programmed that has the effect of setting the command voltage to zero when the current position is within the minimum deadband of target at the end of a position move. When at target, the position is monitored for exit from the maximum deadband and if this occurs, 1/2 the integrator preload is applied and the PID is re-enabled to pull the motor back in. 3. A velocity feedforward dead band zone can be programmed that has the effect of removing the VFF term defined by VFF = d/dt (POSopt * Kd) whenever the position is within the dead band count of the target. To support these changes, the following commands, motor variables and status bits were created: 1. Added command parameter to OM command to place axis in Piezo mode and set state of outctrl status bit: OM(4) Set Piezo mode (mtr->outctrl |= PIEZOMODE) (#define PIEZOMODE 0x800) 2. Added ID(12) parameter to show status of all piezo mode settings 3. Added commands to set integrator preload value (in units of volts) aIZn set axis a positive integrator preload to n mtr->intseedp (function 301) aIYn set axis negative integrator preload to n mtr->intseedn (function 302) 4. Added commands to set dead band zone minimum and maximum (units of counts) aYYn set axis a dead band zone maximum to n mtr->dzmax (function 303) aYZn set axis a dead band zone minimum to n mtr->dzmin (function 304) 5. Added command to set VFF position dead band (units of counts) aYXn set axis a VFF dead band zone to n mtr->vfflim (function 305) 07/26/10 Problem was reported on pulse axes in s-curve profile mode where axis was stalling one count short of target without assertion of At Target and Trajectory Complete. The PID code was modified to remove the one count pulse axis deadband for open-loop steppers in s-curve mode only to resolve the problem. 07/28/10 Modified logic in micwcc.v to address problem in gantry mode on pulse axes. The slave axis pulse count was found to be incorrect in almost all position moves. This was traced to the lack of implementation of the breakpoint latch, relying instead on position error and velocity to terminate the move. The fix involved adding muxes to all stepper interfaces that allowed the slave axis step and direction outputs to be identical to those of the master axis. The SM command was modified to write a 2-bit mux select to a new fpga register in the slave axis which switches in the signals from the master axis. 08/31/10 Modified hardware configuration file open function to relax restrictions on filenames of config files that are FTP'd to controller. Now, the following filenames are all acceptable: mfxeth_1040.hex, mfx_eth_1040_0_120.hex, mfx_eth_1040_1_120.hex, ... etc. Also, removed instructions on web server that indicated the necessity to strip the trailing numeric fields (_0_120,... etc) during FTP transfer. 09/08/10 Corrected a bug discovered in the WA command when executed in a background task. With the interrupt rate changed to 16 kHz, the system call to RTEMS sleep function was not scaling correctly and produced waits of 1/4 the expected time. This was fixed in misccmd.c Changes for Version NM1 Rev. 4.9b =============================================================================== 11/29/10 Dropped support for 16 kHz PID rate. The 1840 architecture was shown to exhibit anomolous behavior of the NanoMotion motor when a sufficiently high load was put on the CPU. The 4 kHz rate seems to perform well and the next revision will contain a logic implemenation of a breakpoint latch for dead-zone detection. 03/11/11 Modified motor data broadcast mechanism to support variable broadcast frequency. The following relevant commands are now in place BIn Broadcast Interval (function 254) frequency = 1 kHz / n (at default motor update rate) aBEn Broadcast Enable (function 255) a = axis n = 0 (disable) 1 (enable) 03/20/11 Modified network initialization to allow user to change default ethernet network prefix of 192.168.1. The web browser interface was modified to support this change. No boot rom config field was added - the default is still copied into flash and if the user modifies the prefix, that is copied back into flash. The prefix is extracted from the IP address in flash and the default route (gateway address, log host address) is created by appending a .1 to the network prefix and storing that in a string array read at initialization time. 04/08/11 Corrected flaw involving VFF correction always active, regardless of state of PIEZOMODE flag. OM0 was not turning off the VFF function in the motor update routine. Changes for Rev. 4.9c =============================================================================== 04/15/11 Added support for network discovery tool. This is an application that will allow users to query a network for the presence of MFX-ETH controllers whose IP addresses may not be known. The tool allows querying, resetting and reconfiguring controllers remotely using the discovery application which communicates by broadcast UDP datagrams containing custom data fields to allow recognition by the MFX-ETH. The operation of motor data broadcasts was modified to change from an Ethernet unicast to a broadcast UDP datagram containing the motor data structures. 04/27/11 Added VR command for compatibility with PM1 firmmware. aVRn Velocity Ratio = n (double) (function 309) mtr->velratio motor table variable (added to lookup) The ratio defaults to 0 in which case the MV and SV commands work as always. If mtr->velratio is set to a non-zero value, MV returns without changing the minimum velocity. The minimum will instead be set based on the ratio to the maximum and will track changes to the SV and VR commands. When the ratio is set back to zero, the previously programmed value for minimum will be restored. 04/28/11 Changed function number of VR command to eliminate conflict with piezo mode functions that will likely be merged into the PM1 code Updated RTEMS_WEBSERVER code which was considerably down-level and didn't include recent changes to config filename conventions, etc. Changes for Rev. 5.0a =============================================================================== 04/29/11 Merged PM1 production build with NM1 4.9a nanomotion custom as well as TT1 4.9a G-code modifications. This version will be in beta until full regression testing is complete. 05/11/11 Added fix to address problem associated with zero-value integrator preload value. The preload logic required a non-zero value to initiate the algorithm to set the integral accumulator, otherwise with piezo mode active a zero value would cause the term to blow up. The fix was to add 1 uV of constant bias to the preload value, satisfying the logic but having no effect on the DAC output. 06/20/11 Added inversion mask support for SPI-based opto inputs (ICN-125) to allow user to change limit polarity. This required a third diginv integer to support the upper 16 bits of input and 4 of output 07/19/11 Corrected bug on SPI interface initialization that caused Amp Enable outputs to be intermittently non-functional. The port intitialization write code was sensing the Busy status going inactive when in fact the command had not had time to assert Busy on the port expander and therefore looked as if the command had already completed. 07/22/11 Bug fix for spline contouring when using synchronized motion. It was found that a zero-length move resulted in divide-by-zero fpu exception and a crash. This was fixed in pre_process_spline() in ctrcmd.c 08/11/11 Perturbation of the PID loop was seen to occur when the network binary interface was heavily loaded with status and position queries. This was traced back to excessive overhead to service the 62.5 uS interrupt for 16 kHz loop rates. This feature is being dropped and the default 4 kHz interrupt will be restored. 09/12/11 Fixed minor bug in high-speed strobe compare function. The BC-1 command was not doing a complete reset of the strobe logic state machine and that problem is now corrected. 10/04/11 Enhancement to high-speed strobe logic that supports bi-directional position moves (previously only + motion). Also modified the state machine to eliminate a spurious 25 nS pulse at the end of the programmed strobe output. 10/18/11 Corrected bug that was causing the ICN board id field from being read before the processor PIO registers were initialized, causing the spi init routine to be invoked (and hang) when no board was present. 10/20/11 Corrected bugs in 1008 FPGA which did not include the previous fix for pulse axis master/slave mode. Partial testing done but complete test not possible until ICN-126 board is prototyped. 11/11/11 Implemented Position Following Error Limit feature to allow user to specify an allowable interval during which the axis exceeds the programmed following error. This is useful for excursions outside the limit during accel and decel that may not be as of much interest as constant-velocity error. The new function is aFXn - sets axis a to a following error time (function 169) limit to n mSec before asserting the error The motor variables that can be looked up are: poserrcnt (int) PID loop error counter poserrlim (int) position error limit (loop counts) poserrtime (long) position error limit (mSec) 11/30/11 Implemented a 4-channel PWM controller for the 1040 platform. The outputs are placed on general-purpose digital outputs as follows: PWM channel Digital Out (channel) 1 10 (42) 2 11 (43) 3 14 (46) 4 15 (47) The digital outputs are still available for use if the PWM circuit is disabled. The duty cycle of each channel is independent but there is a common clock and prescaler used by all 4 channels. The two command mnemonics that are used to control these circuits are: PKn - set PWM frequency (f = n * 50 Hz) aPGn - set duty cycle of channel a (function 183) (duty cycle = n / 65535) Notes: 1. To disable the PWM circuit, command a duty cycle of zero to the desired channel (aPG0). 2. The base frequency of 50 Hz is approximate (50.86 Hz) 12/05/11 The Spartan2 DLL allows fewer frequency synthesis options so in order to maintain compatability between PCI and ETH versions, the base frequency of the PWM circuits had to be changed. The new value is PKn - set PWM frequency (f = n * 38 Hz) It was also noted that a frequency scaler value that is an exact power of 2 (8, 32, 1024,...) results in a more jitter-free pulse train. At other values and high frequencies, the jitter can be as great as 500 nS. This will be addressed and fixed in a future release. 12/12/11 Added back command mnemonic (aYXn - function 305) for VFF limit set to command table. This was mistakenly deleted from a previous pilot build. 01/22/12 Added data logging capability developed earlier for prototype builds. This mechanism is different than data recording in that data files are created in the root file system and written to on every pass through the motor service routine. The user can then FTP this file to the host for analysis. The data record structure was made to look identical to the one used in data recording: log_rec.rec1 = (int)mtr->status; log_rec.rec2 = mtr->cmdcount; log_rec.rec3 = mtr->poscount; log_rec.rec4 = mtr->dacval; The recording is enabled by the following command aLGn - log n records for axis a on next position move (function 316) The recording begins on the next call to movtopos() and terminates on count. The filename convention for the log file is \home\user\data_log_a (a = axis number) 08/18/12 Added support for slave-to-contour motion with two axes performing contour moves and a third axis slaved to the contour controller. This required enhancement to the slave ratio command to support upadating a new motor variable mtr->slvoffset. This variable accounts for changes in slave ratio and avoids the slave axis jumping to a new position when the ratio changes and the contour axis has not moved. The new function is aRSn - change slave ratio for axis a to n and (function 168) update mtr->slvoffset The offset is changed according to the following expression mtr->slvoffset = mtr->optimal - (ratio * (motor[mtr->master1 - 1].prfpos - mtr->mstrinit)); 08/18/12 Added function to explicitly open data log file from command line. This allows beginning data logging from an MCCL script at an arbitrary point in time. Previously, the data log file was only opened at the first entry into movetopos() in order to capture position moves. The new function is aOL - open data log file for axis a, if logging enabled (function 167) 09/14/12 Implemented s-curve trajectory planner based upon trapezoidal accel/decel in addition to the current sinusoidal profile. This mode is selected by calling the exisitng S-curve select function with a non-zero parameter aPSn select S-curve profile for axis a n = 0 sinusoidal accel/decel function 0 < n < 0.5 trapezoidal accel/decel function ramp = n The ramp value is defined as the percentage of the accel time ramping to full acceleration. A value of 0.1 will provide a .1/.8/.1 trapezoid. The value of this parameter can be determined by the lookup variable mtr->scrvramp (double ramp value) 09/18/12 Added DAC scaling/offset capability. This allows the user to change the dynamic range of the analog servo DAC with console commands. The default +10/-10 volt range can be changed by accessing two motor variables: dacrange (double) specifies DAC range in +/- volts dacoffset (double) specifies DAC offset in volts There is no parameter error checking as the DAC is always clipped at +10/-10 Changes for Rev. 5.0b =============================================================================== 03/29/13 Added DAC output null motor variable that represents an offset in counts to allow fine adjustment of the command voltage. The variable is mtr->nulldac unsigned int (lookup "nulldac") An MCCL command was added to set the variable as follows: aNDn a - axis n - increment/decrement DAC offset in counts[ (n = 0 resets offset to 0) (a = 0 stores all axis offsets in flash configuration space) The value of each axis offset is stored in the configuration space of flash memory by assigning a new int to the fwconfig structure (see mfxconfig.h). This allows the offset values to be non-volatile and available at power up. The recording buffers were increased from 1024 to 2048. 04/11/13 Added new trapezoidal trajectory generator without on-the-fly position change capability. This was to allow latitude in debug, anomolous stepper behavior, etc. Only stepper axes can utilize this function by selecting the type of trapezoidal trajectory. Servo axes will always use the on-the-fly trajectory generator. The choice of which trajectory generator is dynamically selected, based on the state of the following new motor variables: mtr->otf otf state flag (selects trajectory generator) mtr->otfmode otf mode (enable/disable/count-based) mtr->otfcnt otf count threshold An MCCL command, added to support the new variables, and its command arguments are as follows: aFYn Trapezoid On the Fly control (a - pulse axis) (function 307) n mtr->otfmode mtr->otfcnt on-the-fly trajectory -------------------------------------------------------------- 0 1 0 always on <0 -1 0 always off >0 0 n on (move > n) off (move < n) Usage examples: 5fy0 ;axis 5 otf trapezoidal trajectory always selected 3fy-1 ;axis 3 non-otf trapezoidal trajectory always selected 5fy100 ;axis 5 move distance >100 otf trapezoidal trajectory selected ; move distance <100 non-otf trapezoidal trajectory selected 04/25/13 Revised control methodology of trapezoidal on-the-fly to improve clarity and flexibility for future h/w and f/w enchancements. The motor variables, MCCL command syntax and their effect are as follows: aFYn Trapezoid On the Fly control (a - axis) (function 307) n mtr->otfmode trajectory generator on-the-fly mode -------------------------------------------------------------- 0 0 type 0 on 1 1 type 1 on 2 2 type 1 off The trajectory generators are defined as type 0: trprof.c [trapezoidal_trajectory()] original implementation of trapezoidal trajectory planner that was created to support on-the-fly position changes type 1: trprof.c [trap_traj()] new parameterized implementation of trapezoidal trajectory planner that is more robust and immune to math errors on short, high-velocity moves. This trajectory planner now supports on-the-fly moves with the temporary limitation that axis stops occur on all commanded position changes. This slight limitation will be corrected in a future release. 05/06/13 Added new motor variables to insure additional pass through path generator to eliminate spurious enables on STEPENA signal in fpga. The variables are mtr->stpdly - specifies number of passes through path generator after AT latch fires (default = 1). This value can be inspected/set by a lookup of "stpdly" mtr->stptimer - timer variable This mechanism is applicable only in mode 1 and 2 trapezoidal trajectory planners on open-loop pulse axes. 06/18/13 Corrected problem that prevented execution of Stop command in velocity mode whe trapezoidal trajectory planner mode 2 was selected. When velocity mode is selected now, type 0 trajectory will be switched in to provide stop function. When position mode is re-selected, the previously selected trapezoidal trajectory planner mode will be reinstated. 06/18/13 Corrected problem related to stop command issued during position move on pulse axes. The optimal position was not set to the final target position after the stop and Trajectory Complete was frequently not set. This was corrected by updating the breakpoint latch target position following deceleration calculation performed in the ST command function. Changes for Rev. 5.0c =============================================================================== 07/16/13 Corrected problem involoving stop mode during +/- hardware limit detect when in trapezoidal mode 2. The problem was identical in nature to the one found to effect the ST command where a trapezoidal rampdown was not being calculated. 08/20/13 Corrected problem in velocity ratio command. The profile velocity was not getting updated correctly after the VR command unless a subsequent SV command was issued. 09/03/13 Restored LO and LOF commands and performed modifications to allow proper behavior over Telnet ASCII interface. Also modified TY (file type) command to send response to correct terminal (either serial port or telnet socket). The file load functions require a Ctl-Z delimiter which currently cannot be passed by WinControl. In the interim, an alternative inline EOF delimiter will be used consisting of the following line: ;*; When this string is parsed, the file will be closed and loading from the ASCII command port terminated. 09/18/13 Corrected flaw in movtopos() that was miscalculating times and distances associated with moves wherein full velocity was never reached and the accel was not equal to decel. Changes for Rev. 5.1a =============================================================================== 09/25/13 Revised logic in movetopos() that was being used to determine completion of previous move. Changed qualifier from profiler trajectory complete to motor trajectory complete and added additional check for pulse disable. 10/15/13 Release version 5.1 to indicate viable FY1 on-the-fly functionality. This is still a preliminary release which performs on-the-fly moves during constant velocity but will hopefully represent significant uplift in speed. A version to manage otf moves during acceleration will follow. Changes for Rev. 5.1b =============================================================================== 10/15/13 Implemented feature from bl_4.7 source tree that inhibits execution of successive MA commands to the same position (other than 0). This had been shown to provide significant speed improvement in some applications. 10/20/13 Implemented on-the-fly processing for accleration phase of trapezoid 10/22/13 Implemented on-the-fly processing for triangular velocity profiles 10/24/13 Corrected error in triangle otf processing whereby max velocity was ignored during calculation of new accel/decel times. Added logic in SA, DS, SV, and MV commands to inhibit changes to any of these parameters while an axis is in motion if in FY1 mode. Changes for Rev. 5.2a =============================================================================== 12/01/13 Revised algorithm for processing on-the-fly position changes to correct fundamental flaw in triangular profile processing/generation. Also revised mechanism to capture otf velocity/accel/decel commands but have not completed the full implementation in this release to allow proceeding with testing of position changes only. 012/02/13 An MCCL command was added to allow programmatic control of unused bits in the motor status word (for PCI compatability) aSUn set mtr->status(31:30) to n on axis a (function 138) 01/13/14 Development build that includes logic to record and display statistics related to on-the-fly moves. This includes percentage of otf moves that can be processed by controller and the estimated move time savings of FY1 mode compared to FY2. The statistics are displayed by entering aID13 a - axis number Changes for Rev. 5.3a =============================================================================== 08/04/14 Corrected flaw that was causing pulses to be disabled when a pulse axis was placed in contour mode. Modified MN command to enable pulses when axis is in slave or contour mode. Removed on-the-fly statistics recording from previous build due to processing overhead. Changes for Version 5.4.0 =============================================================================== Version numbering has been changed from a numeric/alpha hybrid (e.g. 5.4a) to a pure numeric format with an aditional build number generated out of the version control system (e.g. 5.4.0.32). C-Preprocessor is now using C99 standards (more modern features and better code checking). Changes for Version 5.5.0 25-Mar-2016 =============================================================================== Added CNC enhancements found in TT1_4.7a to current branch. Large cleanup of codebase, including more static (compile time) checking of code for accuracy. Internal rounding code standadized to "round away from zero" style and made consistent throughout code (bug# 100242). Dropped numeric coprocessor in favor of gnulib. Implemented tests for AT TARGET deadband and delay for stepper axes in closed loop mode (bug #100248). Code was added at some point to the OM (Output Mode) command to invert the home input of a stepper motor. Inverting the stepper home was already supported (and documented) by the IM (Input Mode) command. The result is that the OM command could silently interfere with this feature. Support has been removed from the OM command, users should use the documented IM command (bug #100253). A new custom mode for stepper operation that allows an open loop stepper to use the AT TARGET status to be generated from the auxiliary encoder, using the deadband and delay settings of AT TARGET. The auxiliary encoder must have a 1:1 ratio with the stepper pulses and the axis is placed into this mode by OR'ing in the flag value of 0x100 with any other parameters to the IM command. Note that version 4.4.1 and earlier of the MCAPI is not aware of this flag and may reset it without warning (e.g. in the stock axis setup dialog). Work on this feature is ongoing. The ASCII mode prompt character command (PC) was never implemented for the MFX-ETH (bug #100247). It has now been implemented. In addition, the MFX-ETH will maintain separate prompt character settings for the Ethernet and the serial port interfaces. The ASCII mode echo commands (EF/EN) were never implemented for the MFX-ETH (bug #100246). They have now been implemented. In addition, the MFX-ETH will maintain separate echo settings for the Ethernet and the serial port interfaces. The default behavior is echo off on the Ethernet ASCII interface, and on for the serial port. Also, while echo on does work on the Ethernet interface it is not particularly useful (interface is line oriented, so the echo comes all at once) and may break MCAPI programs. A problem with pulse axis motion stopping abruptly when negative user scaing is used has been corrected (bug #100258). Changes for Version 5.5.1 9-Jun-2016 =============================================================================== Fix for the longstanding firmware file ftp upload problem (bug #100259). Please see the file FTP_Fix_Readme.txt included in the version 5.5.1 firmware zip file for instructions. Note that this process can not be used with version 5.5.0 firmware because of a checksum bug that was introduced in version 5.5.0 (that error is fixed in 5.5.1). Please contact the factory if you have any questions. Fixed a bug in the firmware download checksum routine that first appeared in version the 5.5.0. Continued work on cleanup of code and merging of code with the ETH platform (where appropriate). Changes for Version 5.5.2 5-July-16 =============================================================================== A code regression in the 5.5a release broke the operation of limit switches in hardware jogging mode. This mode was introduced in 5.5a but limits were broken somwhere before the final release and stayed broken though 5.5.1 (bug #100265). Added variable lookup support for the hardware jogging variables. This will enable the next version of the MCAPI to fully support hardware jogging. The hardware jog mode was calling both the jog profile calculation and the velocity profile calculation in the update loop, resulting in effective accel / decel rates that were double of what was programmed and lots of needless processing. It is no longer necessary to put the controller in velocity mode to use the hardware jog feature, this will be handled automatically by the Jog On (JN) command. A problem with limit switches in jog mode has been fixed. Limits are now direction sensitive and it is possible to re-enable the motor and drive in the opposite direction of the tripped limit switch in jog mode (bug #100265). A bug introduced in version 5.5.1 that affected the reset command (RT) has been fixed (bug #100266). Changes for Version 5.5.3 8-July-16 =============================================================================== A bug in the Stop on Error command (SE, or following error) that has existed since version 5.5.a would leave motors stopped but energized when a following error was detected. The correct behavior is to turn the motor off. This version fixes the SE command (bug #100273).