Frequently Asked Questions & Tech Notes
Explore FAQs
How do I convert the NST USB Adapter to a COM port?
The Pathway Installation flash drive, or downloaded zip, contains an NST_DOC folder which includes a document titled Making an NST USB Adapter Appear as a COM Port_V2.pdf. The document provides instructions for making the adapter appear as a COM port as well as how to set the baud rate.
Note that the default baud rate for the USB adapter is 250000. However, with a COM port, 115200 baud is often preferred. Be sure to also follow the directions on changing the baud rate if you don’t want to continue to use 250000 baud.
Is there a library I can use from MATLAB or LabVIEW?
The latest Pathway software installation includes a 32-bit and a 64-bit ActiveX control which is a library of functions that can be used to control an M3 module. The ActiveX is called NstSquiggleCtrl.ocx. The Pathway software installation flash drive or downloaded zip contains an NST_DOCAdditional folder which includes a PDF document titled NstSquiggleCtrlActiveX_RevA.
Note, however that MATLAB may no longer support ActiveX. In light of that, a .NET Framework library alternative is available. The 64-bit NstMotorCtrl.dll library offers a similar set of functions to the NstSquiggleCtrl ActiveX. On request, a drop-box link can be made available. The link includes an example C# program that uses the NstMotorCtrl library.
Do you have a python example?
Yes, the Pathway Installation flash drive, or downloaded zip, contains an ExamplesPython folder which includes Python source code for a console application. The application assumes the connection to the piezo controller is via a COM port. The folder also includes instructions on how to convert the NST USB Adapter to a COM port.
The COM port syntax in the example python source code is specific to Windows. It will have to be modified to the Linux port syntax to function on a Linux PC.
Do you have a Raspberry Pi example?
No, we do not have a Raspberry Pi example.
Do you have an Arduino example?
We have two Arduino examples, one that illustrates control of an M3-L using the I2C bus and another that illustrates the use of the SPI to control up to three M3-x modules. In either case it’s important to note that the Arduino’s internal 3.3V regulator does not have the capacity to power an M3-x module’s motor. A separate power supply is needed.
We don’t have the Arduino examples online, contact NST to have the Arduino examples sent to you.
Do you have a C++ example?
The Examples folder Pathway installation flash drive (or downloaded zip) contains two zipped C++ examples (one built with VS2003 and the other with VS2013) that illustrate how to direct one or more piezo controller via our NstSquiggleCtrl ActiveX.
Do you have a C# or VB.NET example?
Our C# example uses the NstMotorCtrl.dll (.NET Framework) library to illustrate how our stages may be directed. This example is available by request.
We have two VB.NET examples in the Examples folder of the Pathway software installation flash drive. One example uses our NstSquiggleCtrl ActiveX directly (NstVbDemo), the other uses the NstControllerLib.dll which is a .NET Framework wrapper for our NstSquiggleCtrl ActiveX (NstVbDemo2), that also adds support for some of the features in the Pathway program (e.g., Frequency Sweep Viewer, Performance Log Viewer, Script Control).
My M3 stage worked fine when I tested on the desktop, but when I screwed it down to my instrument mount (or screwed down a load to the carriage), it stopped working.
The mounting surface on which the stage sits must be flat. The flatness must be less than the stage’s runout which is stated in the datasheet (typically < 10 um). If screwed down to a non-flat surface the aluminum frame of the stage may be distorted.
Another possibility is the screw length. Whether screwing down from the top or up from the bottom, no part the screw should protrude into travel area of the carriage. Similarly, if attaching a load to the carriage, the screw must not extend below the carriage. Please check the integration guide for maximum screw length recommendations.
Why is it recommended that I command a frequency calibration of the motor following a power cycle?
The default drive frequency of the motor (stored as a period count) is set at the factory while at room temperature. Since end user operating conditions may vary, you must perform a frequency calibration on startup.
Note that the calibration generates a series motor drive signal bursts over a range of frequencies to move. If motor displacement is a concern or, if power draw is a concern, a single phase (instead of both drive phases) can be used. See command 87 in the modules command and control reference document.
Please see the tech note Frequency Calibration is Essential: https://newscaletech.com/wp-content/uploads/TechBulletin_Frequency-Calibration-is-essential.pdf
How can I prevent my stage from jamming; or my stage has jammed; how can I unjam it?
A jam (in which the motor can no longer move the load or even back away) can occur if the carriage encounters a hard stop and stall detection is not enabled or the stall tolerance, specifically the incremental stall tolerance, is set too high.
To prevent a jam, it is recommended that stall detection be enabled so that the motor will be turned off as soon as it is detected that it has stopped making progress. If stall detection is enabled but the motor still jammed after hitting a hard stop, it may be necessary to reduce the incremental stall threshold (this setting is available on the Pathway software’s Axis Attributes tab).
To unjam a motor, performs a frequency sweep in the direction away from the jam. It may require multiple frequency sweeps to free the motor from the jam.
Soft travel limits should be used to prevent the motor from encountering a hard stop. Soft travel limits can be set from the Pathway software’s Axis Attributes tab.
For more details on how to enable stall detection as well as how to perform a frequency sweep, see the tech note on our website: https://newscaletech.com/wp-content/uploads/TechNote_Prevent-or-Recover-from-M3-LS-Stage-Jamming-Caused-by-Physical-Obstruction.pdf
The stage oscillates about the target position; how can I prevent that?
First make sure that the Min Motor Drive Amplitude is set to zero (see the lower left corner of the Pathway software Axis Attributes tab or use command 45).
Make sure that the stage or carriage has not lost preload. Inside the stage or focus module, there is a preload spring that keeps the load pressed against the screw tip. If the spring is broken, missing or too weak, it will be difficult to hold position.
The KI PID parameter (on the Pathway software Axis Attributes tab) is the dominant parameter in calculating motor gain while attempting to hold position. If it is set too high, it can cause oscillations about the target. Try reducing the value and click the nearby Apply button. If you are controlling the M3 module from your own hardware, you can use command 43 to query or set the PID coefficients. See the module’s command and control reference for details.
Always query the PID coefficients before changing them because they are non-volatile parameters. To set the PID coefficients on every startup use command 58 to put the M3 module into a RAM cache only mode so that the flash memory isn’t rewritten. See the command and control reference for details)
My stage reported a stall after clicking the Calibrate Frequency button (or sending command 87). Why did that happen?
Some M3 modules will try to move the carriage back to its original position after a frequency calibration is performed. If stall detection is enabled but the stall incremental threshold value is too low, the displacement caused by the calibration may be enough to make it appear that the motor stalled. You can go to the Pathway software Axis Attributes tab and click on the button to the right of the Ena. Stall Detection check box. The incremental threshold should be at least 10000.
I changed a parameter on the Pathway Axis Attributes tab, and a few seconds later there was a communications timeout. What happened?
Most of the NST piezo controllers write non-volatile parameter (NVP) settings to the flash memory of the processor (rather than to an external EEPROM). Once an NVP is changed, the controller waits 5 seconds before committing the change to flash memory to make sure there are no other NVPs being updated. To update the flash memory, the processor must first erase the entire block of flash memory reserved for NVPs. During the erase the processor is unable to respond to commands resulting in a communications timeout.
If you want to prevent changes to NVPs from being written to flash memory (at least temporarily), you can put the controller into a RAM cache mode. Any change to the NVP will only be written to a RAM cache of all the NVP settings but not to the flash memory. See command 58 in the controller’s Command and Control reference for details. The command also allows you to write NVP changes to flash memory later.
Technical Notes
M3-LS-U2-8
- Best Practices to Operate M3-LS-U2-8 Stages in Extended Life and High Duty Cycle Applications – January 2025
M3-LS-3.4-15
- Confirming Proper Stage Orientation Relative to Gravity – June 2023
- Prevent or Recover from M3-LS Stage Jamming Caused by Physical Obstruction – June 2025
M3-LS-1.8-6
M3-L
- M3-L SPI-SS ChipSelect – Aug. 2025