NT Motor&Encoder Module CLI: Difference between revisions

From STorM32-BGC Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
Accessing the CLI of a NT motor&encoder module requires using a standard terminal program, such as [http://www.der-hammer.info/terminal/index.htm HTerm].  
The CLI of a NT motor&encoder module can be accesses either by using the "NT Module CLI Tool" located in the {{GUI|Tools}} menu, or by using a standard terminal program, such as [http://www.der-hammer.info/terminal/index.htm HTerm].  


It can be done in two ways:
For accessing the CLI, the STorM32 main board is used, so to say, as a USB-TTL adapter to connect the NT module to the PC. That is, the NT motor module is connected to the STorM32 main board on the NT bus and the STorM32 main board is connected to a PC, typically via the main board's USB port. Before the CLI can be accessed, the STorM32 main board has first to be put into a pass-through mode by sending the special command "xQTNTQMODE0X" to it, where X = 4 for accessing the pitch NT motor module, X = 5 for roll, and X = 6 for yaw. The STorM32 board then works as tunnel connecting the PC with the selected NT module. In the terminal program the baud rate is typically set to 115200 bps.
* '''''Direkt Connection:''''' The NT motor module is connected on its NT port directly to a PC via a USB-TTL adapter, pretty much as one would do for [[NT_Data_Logging#Live_Recording|Live Recording]], except that now both the Tx and Rx lines need to be connected to the USB-TTL adapter. In the terminal program the baud rate must be set to 2000000 bps.


* '''''Via STorM32 Main Board:''''' In this configuration, a STorM32 main board is used, so to say, as USB-TTL adapter. The NT motor module is connected to the STorM32 main board via the NT bus, as for normal operation. The STorM32 main board is connected to a PC, typically via the main board's USB port. The STorM32 main board has first to be put into a pass-through mode by sending the special command "xQTNTQMODE0X" to it, where X = 4 for accessing the pitch NT motor module, X = 5 for roll, and X = 6 for yaw. The STorM32 board then works as tunnel connecting the PC with the selected NT module. In the terminal program the baud rate is typically set to 115200 bps.
{{COMMENT|The CLI can also be accessed by connecting the NT motor module on its NT port directly to a PC via a USB-TTL adapter, pretty much as one would do it for the [[NT_Data_Logging#Live_Recording|Live Recording]], except that now both the Tx and Rx lines need to be connected to the USB-TTL adapter. In the terminal program the baud rate must be set to 2000000 bps.}}


{| class="wikitable"
{| class="wikitable"
Line 17: Line 16:
|-
|-
| reval; || run the display encoder raw values sequence, send a character to stop it
| reval; || run the display encoder raw values sequence, send a character to stop it
|-
|
|-
| moveby X; || moves the motor by the given value (can be positive or negative)
|-
| moveto X; || moves the motor to the position specified by the given value (can be positive or negative)
|-
| movevmax X; || set the motor power in percent
|-
|
|-
| r2ppofs; || run the ranged motor pole pairs and offset determination sequence
|-
| r2sppofs X; || run the ranged motor pole pairs and offset determination sequence, with the number of the pole pairs fixed to the given value
|-
| r2ofs; || run the ranged motor offset determination sequence
|-
| r2setrange X; || set the range used in the r2 commands
|-
| r2setvmax X; || set the motor power in percent used in the r2 commands
|-
|
|-
| setlpf2n; || set LPF for potentiometric encoders
|-
| clrlpf2n; || disable LPF for potentiometric encoders
|-
|-
|
|
Line 26: Line 51:
| clrofs; || set the current offset to zero  
| clrofs; || set the current offset to zero  
|-
|-
| setpp X; || set the current pole pairs to the given value
| setpp X; || set the current pole pairs to the given value
|-
|-
| setofs X; || set the current poffset to the given value
| setofs X; || set the current poffset to the given value
Line 47: Line 72:
|-
|-
| clrid; || set the module's ID to ID = 0
| clrid; || set the module's ID to ID = 0
|-
| setmodeltle5012b; || set the module's encoder to TLE5012B (spi)
|-
| setmodelas5048a; || set the module's encoder to AS5048A (spi)
|-
| setmodelpotadc5; || set the module's encoder to a resistive sensor (poti) on ADC5
|-
| clrmodel; || set the module's encoder to NONE
|-
|-
|
|
Line 62: Line 95:
|
|
|-
|-
| @Q || resets main board and module
| @Q || resets main board and module, note: don't add a ';' at the end
|-
|-
| RESTART || restarts QMODE
| RESTART; || restarts QMODE
|}
|}

Latest revision as of 07:04, 9 July 2019

The CLI of a NT motor&encoder module can be accesses either by using the "NT Module CLI Tool" located in the [GUI:Tools] menu, or by using a standard terminal program, such as HTerm.

For accessing the CLI, the STorM32 main board is used, so to say, as a USB-TTL adapter to connect the NT module to the PC. That is, the NT motor module is connected to the STorM32 main board on the NT bus and the STorM32 main board is connected to a PC, typically via the main board's USB port. Before the CLI can be accessed, the STorM32 main board has first to be put into a pass-through mode by sending the special command "xQTNTQMODE0X" to it, where X = 4 for accessing the pitch NT motor module, X = 5 for roll, and X = 6 for yaw. The STorM32 board then works as tunnel connecting the PC with the selected NT module. In the terminal program the baud rate is typically set to 115200 bps.

Comment: The CLI can also be accessed by connecting the NT motor module on its NT port directly to a PC via a USB-TTL adapter, pretty much as one would do it for the Live Recording, except that now both the Tx and Rx lines need to be connected to the USB-TTL adapter. In the terminal program the baud rate must be set to 2000000 bps.

CLI command effect
rrange; run the encoder range test sequence
rpp; run the motor pole pairs determination sequence
rofs; run the motor offset determination sequence
reval; run the display encoder raw values sequence, send a character to stop it
moveby X; moves the motor by the given value (can be positive or negative)
moveto X; moves the motor to the position specified by the given value (can be positive or negative)
movevmax X; set the motor power in percent
r2ppofs; run the ranged motor pole pairs and offset determination sequence
r2sppofs X; run the ranged motor pole pairs and offset determination sequence, with the number of the pole pairs fixed to the given value
r2ofs; run the ranged motor offset determination sequence
r2setrange X; set the range used in the r2 commands
r2setvmax X; set the motor power in percent used in the r2 commands
setlpf2n; set LPF for potentiometric encoders
clrlpf2n; disable LPF for potentiometric encoders
getcal; display the current pole pair and offset settings
clrpp; set the current pole pairs to zero
clrofs; set the current offset to zero
setpp X; set the current pole pairs to the given value
setofs X; set the current poffset to the given value
retrieve; retrieve module settings from EEPROM
store; store module settings into EEPROM
getsetup; display current module settings
clrsetup; set current module settings to default
setidpitch; set the module's ID to pitch (ID = 4)
setidroll; set the module's ID to roll (ID = 5)
setidyaw; set the module's ID to yaw (ID = 6)
clrid; set the module's ID to ID = 0
setmodeltle5012b; set the module's encoder to TLE5012B (spi)
setmodelas5048a; set the module's encoder to AS5048A (spi)
setmodelpotadc5; set the module's encoder to a resistive sensor (poti) on ADC5
clrmodel; set the module's encoder to NONE
r4; run the torque cogging sequence
getdt; display the determined time constants
r5; run the speed sequence
getspeed; display the determined speed constants
streamX; enable stream at rate X, X = 1,2,3,4
@Q resets main board and module, note: don't add a ';' at the end
RESTART; restarts QMODE