Configuration via USB General The following options are available for configuring the controller via USB: Configuration file This file can be saved to the controller via the USB connection. For further information, read chapters USB connection and Configuration file. NanoJ program This program can be programmed, compiled and then transferred to the controller with NanoJ via USB. For further information, read chapters NanoJ program and Programming with NanoJ. After connecting to a voltage supply, the controller reads out the configuration in the following order: The configuration file is read out and processed. The NanoJ program is started. USB connection Notice image/svg+xml Damage to the product and/or external hardware caused by differences in potential at the USB. Connecting the USB cable while the electronics are being supplied (hot plugging) may result in damage. ► Connect USB before switching on the supply voltage. ► If possible, equalize differences in potential between PC and product or use USB isolator. ► First connect the USB cable to the product, then to the PC. If the controller is connected to a PC via a USB cable, an MTP device that contains a data carrier is created in the Windows file explorer. Up to three files are displayed, the configuration file (cfg*.txt), the firmware (*.fw) and the NanoJ program (nanoj*.usr), which is stored internally immediately after restarting the controller and is no longer displayed. You can thereby store the configuration file or the NanoJ program on the controller. The voltage supply of the controller must also be connected during USB operation. Note: Only use a standard USB cable, type C. Never use a USB cable that manufacturers of mobile phones include with their products. These USB cables could have a different plug shape or pin assignment. Do not save any files on the controller other than those listed below: cfg*.txt nanoj*.usr reset.txt Other files are not accepted by the controller. PowerShell scripts In the download area of the product website at nanotec.com, you can find file mtp.ps1 with examples for the Windows PowerShell console. You can use this to: List all stored files:.\mtp.ps1 -Action list -DeviceName N6-1-1-1 Copy a file from the current script folder to the device:.\mtp.ps1 -Action copy -DeviceName N6-1-1-1 -FileName cfg_Example.txt Delete a file:.\mtp.ps1 -Action delete -DeviceName N6-1-1-1 -FileName cfg_Example.txt MTP in LinuxNanotec recommends the following: MTP Tools. If the GVfs often included in Linux distributions is already installed, uninstall it first:sudo apt remove gvfsThen install MPT Tools and libmtp and restart: sudo apt-get install mtp-tools sudo apt-get install libmtp-runtime reboot After connecting the USB, check whether the device is detected:mtp-detectThe device responds to this with its properties (manufacturer, product name, serial number, etc.), similar to the following figure.You can now: List all stored files with their ID:mtp-files Copy a file from the current script folder to the device (the name must be identical):mtp-sendfile cfg_Out.txt cfg_Out.txt Copy a file from the device (file ID listed as with mtp-files):mtp-getfile 1072922872 cfg_Or.txt Delete a file:mtp-delfile -f cfg_Example.txt Configuration file General The cfg.txt configuration file is used to preset values for the object dictionary to a certain value during startup. This file uses a special syntax to make accessing the objects of the object dictionary as easy as possible. The controller evaluates all assignments in the file from top to bottom. Note: If you delete the configuration file, the controller recreates the file (without content) on the next restart. Reading and writing the file How to access the file: Connect the controller to your PC using the USB cable. Connect and switch on the voltage supply. After the PC has detected the device as a removable storage device, navigate in the Explorer to the directory of the controller. File cfg*.txt is stored there. Open this file with a simple text editor, such as Notepad or Vi. Do not use any programs that use markup (LibreOffice or similar). After you have made changes to the file, proceed as follows to apply the changes through a restart: Save the file if you have not yet already done so. Disconnect the voltage supply from the controller for approx. 1 second until the power LEDs stop flashing. Reconnect the voltage supply. When the controller is now restarted, the values in the configuration file are read out and applied. Tip: To restart the controller, you can also copy an empty reset.txt file to the controller. This restarts the controller. The reset.txt file is deleted on the next restart. Structure of the configuration file Comments Lines that begin with a semicolon are ignored by the controller. Example ; This is a comment line Assignments Note: Before setting a value, determine its data type (see chapter Description of the object dictionary)! The controller does not validate entries for logical errors! Values in the object dictionary can be set with the following syntax: <Index>:<Subindex>=<Value> <Index> This value corresponds to the index of the object and is interpreted as a hexadecimal number. The value must always be specified with four digits. <Subindex> This value corresponds to the subindex of the object and is interpreted as a hexadecimal number. The value must always be specified with two digits and can be omitted if the subindex is 00h. <Value> The value that is to be written in the object is interpreted as a hexadecimal number. Hexadecimal numbers are to be prefixed with "0x". You can also set individual bits: Set bit 3202:00.01=1 Reset bit 3202:00.01=0 Bitwise OR 3202:00|=0x01 Bitwise AND 3202:00&=0x01 Example Set object 6075h:00 (rated current) to the value "600" (mA):6075:00=600 Set object 3202h:00 to the value "1" (activate closed-loop mode): 3202:00=1 or only set bit 0 3202:00.00=1 Note: There must be no blank characters to the left and right of the equal sign. The following assignments are not correct: 6040:00 =5 6040:00= 5 6040:00 = 5 The number of places must not be changed. The index must be four characters long and the subindex two characters long. The following assignments are not correct: 6040:0=6 6040=6 Blank spaces at the start of the line are not permitted. NanoJ program A NanoJ program can be executed on the controller. To load and start a program on the controller, proceed as follows: Write and compile your program as described in chapter Programming with NanoJ. Connect the voltage supply to the controller and switch on the voltage supply. Connect the controller to your PC using the USB cable. After the PC has detected the device as a removable storage device, open an Explorer window and delete file nanoj*.usr on the controller. Navigate in the Explorer to the directory with your program. The compiled file has the same name as the source code file, only with file extension .usr. Rename this file nanoj*.usr. Copy file nanoj*.usr to the controller. Disconnect the voltage supply from the controller for approx. 1 second until the power LEDs stop flashing. Reconnect the voltage supply. When the controller now starts, the new NanoJ program is read in and started. Tip: To restart the controller, you can also copy an empty reset.txt file to the controller. This restarts the controller. The reset.txt file is deleted on the next restart. Note: The NanoJ program on the controller must have file name nanoj*.usr.
Configuration via USB General The following options are available for configuring the controller via USB: Configuration file This file can be saved to the controller via the USB connection. For further information, read chapters USB connection and Configuration file. NanoJ program This program can be programmed, compiled and then transferred to the controller with NanoJ via USB. For further information, read chapters NanoJ program and Programming with NanoJ. After connecting to a voltage supply, the controller reads out the configuration in the following order: The configuration file is read out and processed. The NanoJ program is started. USB connection Notice image/svg+xml Damage to the product and/or external hardware caused by differences in potential at the USB. Connecting the USB cable while the electronics are being supplied (hot plugging) may result in damage. ► Connect USB before switching on the supply voltage. ► If possible, equalize differences in potential between PC and product or use USB isolator. ► First connect the USB cable to the product, then to the PC. If the controller is connected to a PC via a USB cable, an MTP device that contains a data carrier is created in the Windows file explorer. Up to three files are displayed, the configuration file (cfg*.txt), the firmware (*.fw) and the NanoJ program (nanoj*.usr), which is stored internally immediately after restarting the controller and is no longer displayed. You can thereby store the configuration file or the NanoJ program on the controller. The voltage supply of the controller must also be connected during USB operation. Note: Only use a standard USB cable, type C. Never use a USB cable that manufacturers of mobile phones include with their products. These USB cables could have a different plug shape or pin assignment. Do not save any files on the controller other than those listed below: cfg*.txt nanoj*.usr reset.txt Other files are not accepted by the controller. PowerShell scripts In the download area of the product website at nanotec.com, you can find file mtp.ps1 with examples for the Windows PowerShell console. You can use this to: List all stored files:.\mtp.ps1 -Action list -DeviceName N6-1-1-1 Copy a file from the current script folder to the device:.\mtp.ps1 -Action copy -DeviceName N6-1-1-1 -FileName cfg_Example.txt Delete a file:.\mtp.ps1 -Action delete -DeviceName N6-1-1-1 -FileName cfg_Example.txt MTP in LinuxNanotec recommends the following: MTP Tools. If the GVfs often included in Linux distributions is already installed, uninstall it first:sudo apt remove gvfsThen install MPT Tools and libmtp and restart: sudo apt-get install mtp-tools sudo apt-get install libmtp-runtime reboot After connecting the USB, check whether the device is detected:mtp-detectThe device responds to this with its properties (manufacturer, product name, serial number, etc.), similar to the following figure.You can now: List all stored files with their ID:mtp-files Copy a file from the current script folder to the device (the name must be identical):mtp-sendfile cfg_Out.txt cfg_Out.txt Copy a file from the device (file ID listed as with mtp-files):mtp-getfile 1072922872 cfg_Or.txt Delete a file:mtp-delfile -f cfg_Example.txt Configuration file General The cfg.txt configuration file is used to preset values for the object dictionary to a certain value during startup. This file uses a special syntax to make accessing the objects of the object dictionary as easy as possible. The controller evaluates all assignments in the file from top to bottom. Note: If you delete the configuration file, the controller recreates the file (without content) on the next restart. Reading and writing the file How to access the file: Connect the controller to your PC using the USB cable. Connect and switch on the voltage supply. After the PC has detected the device as a removable storage device, navigate in the Explorer to the directory of the controller. File cfg*.txt is stored there. Open this file with a simple text editor, such as Notepad or Vi. Do not use any programs that use markup (LibreOffice or similar). After you have made changes to the file, proceed as follows to apply the changes through a restart: Save the file if you have not yet already done so. Disconnect the voltage supply from the controller for approx. 1 second until the power LEDs stop flashing. Reconnect the voltage supply. When the controller is now restarted, the values in the configuration file are read out and applied. Tip: To restart the controller, you can also copy an empty reset.txt file to the controller. This restarts the controller. The reset.txt file is deleted on the next restart. Structure of the configuration file Comments Lines that begin with a semicolon are ignored by the controller. Example ; This is a comment line Assignments Note: Before setting a value, determine its data type (see chapter Description of the object dictionary)! The controller does not validate entries for logical errors! Values in the object dictionary can be set with the following syntax: <Index>:<Subindex>=<Value> <Index> This value corresponds to the index of the object and is interpreted as a hexadecimal number. The value must always be specified with four digits. <Subindex> This value corresponds to the subindex of the object and is interpreted as a hexadecimal number. The value must always be specified with two digits and can be omitted if the subindex is 00h. <Value> The value that is to be written in the object is interpreted as a hexadecimal number. Hexadecimal numbers are to be prefixed with "0x". You can also set individual bits: Set bit 3202:00.01=1 Reset bit 3202:00.01=0 Bitwise OR 3202:00|=0x01 Bitwise AND 3202:00&=0x01 Example Set object 6075h:00 (rated current) to the value "600" (mA):6075:00=600 Set object 3202h:00 to the value "1" (activate closed-loop mode): 3202:00=1 or only set bit 0 3202:00.00=1 Note: There must be no blank characters to the left and right of the equal sign. The following assignments are not correct: 6040:00 =5 6040:00= 5 6040:00 = 5 The number of places must not be changed. The index must be four characters long and the subindex two characters long. The following assignments are not correct: 6040:0=6 6040=6 Blank spaces at the start of the line are not permitted. NanoJ program A NanoJ program can be executed on the controller. To load and start a program on the controller, proceed as follows: Write and compile your program as described in chapter Programming with NanoJ. Connect the voltage supply to the controller and switch on the voltage supply. Connect the controller to your PC using the USB cable. After the PC has detected the device as a removable storage device, open an Explorer window and delete file nanoj*.usr on the controller. Navigate in the Explorer to the directory with your program. The compiled file has the same name as the source code file, only with file extension .usr. Rename this file nanoj*.usr. Copy file nanoj*.usr to the controller. Disconnect the voltage supply from the controller for approx. 1 second until the power LEDs stop flashing. Reconnect the voltage supply. When the controller now starts, the new NanoJ program is read in and started. Tip: To restart the controller, you can also copy an empty reset.txt file to the controller. This restarts the controller. The reset.txt file is deleted on the next restart. Note: The NanoJ program on the controller must have file name nanoj*.usr.
General The following options are available for configuring the controller via USB: Configuration file This file can be saved to the controller via the USB connection. For further information, read chapters USB connection and Configuration file. NanoJ program This program can be programmed, compiled and then transferred to the controller with NanoJ via USB. For further information, read chapters NanoJ program and Programming with NanoJ. After connecting to a voltage supply, the controller reads out the configuration in the following order: The configuration file is read out and processed. The NanoJ program is started.
USB connection Notice image/svg+xml Damage to the product and/or external hardware caused by differences in potential at the USB. Connecting the USB cable while the electronics are being supplied (hot plugging) may result in damage. ► Connect USB before switching on the supply voltage. ► If possible, equalize differences in potential between PC and product or use USB isolator. ► First connect the USB cable to the product, then to the PC. If the controller is connected to a PC via a USB cable, an MTP device that contains a data carrier is created in the Windows file explorer. Up to three files are displayed, the configuration file (cfg*.txt), the firmware (*.fw) and the NanoJ program (nanoj*.usr), which is stored internally immediately after restarting the controller and is no longer displayed. You can thereby store the configuration file or the NanoJ program on the controller. The voltage supply of the controller must also be connected during USB operation. Note: Only use a standard USB cable, type C. Never use a USB cable that manufacturers of mobile phones include with their products. These USB cables could have a different plug shape or pin assignment. Do not save any files on the controller other than those listed below: cfg*.txt nanoj*.usr reset.txt Other files are not accepted by the controller. PowerShell scripts In the download area of the product website at nanotec.com, you can find file mtp.ps1 with examples for the Windows PowerShell console. You can use this to: List all stored files:.\mtp.ps1 -Action list -DeviceName N6-1-1-1 Copy a file from the current script folder to the device:.\mtp.ps1 -Action copy -DeviceName N6-1-1-1 -FileName cfg_Example.txt Delete a file:.\mtp.ps1 -Action delete -DeviceName N6-1-1-1 -FileName cfg_Example.txt MTP in LinuxNanotec recommends the following: MTP Tools. If the GVfs often included in Linux distributions is already installed, uninstall it first:sudo apt remove gvfsThen install MPT Tools and libmtp and restart: sudo apt-get install mtp-tools sudo apt-get install libmtp-runtime reboot After connecting the USB, check whether the device is detected:mtp-detectThe device responds to this with its properties (manufacturer, product name, serial number, etc.), similar to the following figure.You can now: List all stored files with their ID:mtp-files Copy a file from the current script folder to the device (the name must be identical):mtp-sendfile cfg_Out.txt cfg_Out.txt Copy a file from the device (file ID listed as with mtp-files):mtp-getfile 1072922872 cfg_Or.txt Delete a file:mtp-delfile -f cfg_Example.txt
Configuration file General The cfg.txt configuration file is used to preset values for the object dictionary to a certain value during startup. This file uses a special syntax to make accessing the objects of the object dictionary as easy as possible. The controller evaluates all assignments in the file from top to bottom. Note: If you delete the configuration file, the controller recreates the file (without content) on the next restart. Reading and writing the file How to access the file: Connect the controller to your PC using the USB cable. Connect and switch on the voltage supply. After the PC has detected the device as a removable storage device, navigate in the Explorer to the directory of the controller. File cfg*.txt is stored there. Open this file with a simple text editor, such as Notepad or Vi. Do not use any programs that use markup (LibreOffice or similar). After you have made changes to the file, proceed as follows to apply the changes through a restart: Save the file if you have not yet already done so. Disconnect the voltage supply from the controller for approx. 1 second until the power LEDs stop flashing. Reconnect the voltage supply. When the controller is now restarted, the values in the configuration file are read out and applied. Tip: To restart the controller, you can also copy an empty reset.txt file to the controller. This restarts the controller. The reset.txt file is deleted on the next restart. Structure of the configuration file Comments Lines that begin with a semicolon are ignored by the controller. Example ; This is a comment line Assignments Note: Before setting a value, determine its data type (see chapter Description of the object dictionary)! The controller does not validate entries for logical errors! Values in the object dictionary can be set with the following syntax: <Index>:<Subindex>=<Value> <Index> This value corresponds to the index of the object and is interpreted as a hexadecimal number. The value must always be specified with four digits. <Subindex> This value corresponds to the subindex of the object and is interpreted as a hexadecimal number. The value must always be specified with two digits and can be omitted if the subindex is 00h. <Value> The value that is to be written in the object is interpreted as a hexadecimal number. Hexadecimal numbers are to be prefixed with "0x". You can also set individual bits: Set bit 3202:00.01=1 Reset bit 3202:00.01=0 Bitwise OR 3202:00|=0x01 Bitwise AND 3202:00&=0x01 Example Set object 6075h:00 (rated current) to the value "600" (mA):6075:00=600 Set object 3202h:00 to the value "1" (activate closed-loop mode): 3202:00=1 or only set bit 0 3202:00.00=1 Note: There must be no blank characters to the left and right of the equal sign. The following assignments are not correct: 6040:00 =5 6040:00= 5 6040:00 = 5 The number of places must not be changed. The index must be four characters long and the subindex two characters long. The following assignments are not correct: 6040:0=6 6040=6 Blank spaces at the start of the line are not permitted.
General The cfg.txt configuration file is used to preset values for the object dictionary to a certain value during startup. This file uses a special syntax to make accessing the objects of the object dictionary as easy as possible. The controller evaluates all assignments in the file from top to bottom. Note: If you delete the configuration file, the controller recreates the file (without content) on the next restart.
Reading and writing the file How to access the file: Connect the controller to your PC using the USB cable. Connect and switch on the voltage supply. After the PC has detected the device as a removable storage device, navigate in the Explorer to the directory of the controller. File cfg*.txt is stored there. Open this file with a simple text editor, such as Notepad or Vi. Do not use any programs that use markup (LibreOffice or similar). After you have made changes to the file, proceed as follows to apply the changes through a restart: Save the file if you have not yet already done so. Disconnect the voltage supply from the controller for approx. 1 second until the power LEDs stop flashing. Reconnect the voltage supply. When the controller is now restarted, the values in the configuration file are read out and applied. Tip: To restart the controller, you can also copy an empty reset.txt file to the controller. This restarts the controller. The reset.txt file is deleted on the next restart.
Structure of the configuration file Comments Lines that begin with a semicolon are ignored by the controller. Example ; This is a comment line Assignments Note: Before setting a value, determine its data type (see chapter Description of the object dictionary)! The controller does not validate entries for logical errors! Values in the object dictionary can be set with the following syntax: <Index>:<Subindex>=<Value> <Index> This value corresponds to the index of the object and is interpreted as a hexadecimal number. The value must always be specified with four digits. <Subindex> This value corresponds to the subindex of the object and is interpreted as a hexadecimal number. The value must always be specified with two digits and can be omitted if the subindex is 00h. <Value> The value that is to be written in the object is interpreted as a hexadecimal number. Hexadecimal numbers are to be prefixed with "0x". You can also set individual bits: Set bit 3202:00.01=1 Reset bit 3202:00.01=0 Bitwise OR 3202:00|=0x01 Bitwise AND 3202:00&=0x01 Example Set object 6075h:00 (rated current) to the value "600" (mA):6075:00=600 Set object 3202h:00 to the value "1" (activate closed-loop mode): 3202:00=1 or only set bit 0 3202:00.00=1 Note: There must be no blank characters to the left and right of the equal sign. The following assignments are not correct: 6040:00 =5 6040:00= 5 6040:00 = 5 The number of places must not be changed. The index must be four characters long and the subindex two characters long. The following assignments are not correct: 6040:0=6 6040=6 Blank spaces at the start of the line are not permitted.
Comments Lines that begin with a semicolon are ignored by the controller. Example ; This is a comment line
Assignments Note: Before setting a value, determine its data type (see chapter Description of the object dictionary)! The controller does not validate entries for logical errors! Values in the object dictionary can be set with the following syntax: <Index>:<Subindex>=<Value> <Index> This value corresponds to the index of the object and is interpreted as a hexadecimal number. The value must always be specified with four digits. <Subindex> This value corresponds to the subindex of the object and is interpreted as a hexadecimal number. The value must always be specified with two digits and can be omitted if the subindex is 00h. <Value> The value that is to be written in the object is interpreted as a hexadecimal number. Hexadecimal numbers are to be prefixed with "0x". You can also set individual bits: Set bit 3202:00.01=1 Reset bit 3202:00.01=0 Bitwise OR 3202:00|=0x01 Bitwise AND 3202:00&=0x01 Example Set object 6075h:00 (rated current) to the value "600" (mA):6075:00=600 Set object 3202h:00 to the value "1" (activate closed-loop mode): 3202:00=1 or only set bit 0 3202:00.00=1 Note: There must be no blank characters to the left and right of the equal sign. The following assignments are not correct: 6040:00 =5 6040:00= 5 6040:00 = 5 The number of places must not be changed. The index must be four characters long and the subindex two characters long. The following assignments are not correct: 6040:0=6 6040=6 Blank spaces at the start of the line are not permitted.
NanoJ program A NanoJ program can be executed on the controller. To load and start a program on the controller, proceed as follows: Write and compile your program as described in chapter Programming with NanoJ. Connect the voltage supply to the controller and switch on the voltage supply. Connect the controller to your PC using the USB cable. After the PC has detected the device as a removable storage device, open an Explorer window and delete file nanoj*.usr on the controller. Navigate in the Explorer to the directory with your program. The compiled file has the same name as the source code file, only with file extension .usr. Rename this file nanoj*.usr. Copy file nanoj*.usr to the controller. Disconnect the voltage supply from the controller for approx. 1 second until the power LEDs stop flashing. Reconnect the voltage supply. When the controller now starts, the new NanoJ program is read in and started. Tip: To restart the controller, you can also copy an empty reset.txt file to the controller. This restarts the controller. The reset.txt file is deleted on the next restart. Note: The NanoJ program on the controller must have file name nanoj*.usr.