NanoJ program A NanoJ program may be executed on the motor controller. Carry out the following steps to load and launch a program on the motor controller: Write and compile your program as described in the "Programming with NanoJ" section. Connect the voltage supply to the controller and switch on the voltage supply. Connect the motor controller to your PC by using the USB cable. After the PC has recognized the device as a removable storage medium, open a file explorer and delete file "vmmcode.usr" on the motor controller Use the explorer to navigate to the directory with your program. The compiled file has the same name as the source code file, only with the file name extension ".usr". Rename this file to "vmmcode.usr". Now copy file "vmmcode.usr" to the motor controller. Disconnect the voltage supply from the motor controller for approx. 1 second. Reconnect the voltage supply. At the next start of the motor controller, the new NanoJ program is read-in and launched. Tip You can also copy an empty file reset.txt to the motor controller in order to restart the motor controller. This restarts the motor controller. The file reset.txt is deleted at the restart. Note The NanoJ program on the motor controller must have the file name "vmmcode.usr". If the NanoJ program was deleted, an empty file with name "vmmcode.usr" is created at the next startup. Tip Deletion of the old NanoJ program and copying of the new one can be automated with a script file. In Windows you can create a file with file extension bat and the following content: Copy <SOURCE PATH>\<OUTPUT>.usr <TARGET>:\vmmcode.usr. For example: copy c:\test\main.usr n:\vmmcode.usr For Linux you can create a script with file extension sh and the following content: #!/bin/bash cp <SOURCE PATH>/<OUTPUT>.usr <TARGET PATH>/vmmcode.usr
NanoJ program A NanoJ program may be executed on the motor controller. Carry out the following steps to load and launch a program on the motor controller: Write and compile your program as described in the "Programming with NanoJ" section. Connect the voltage supply to the controller and switch on the voltage supply. Connect the motor controller to your PC by using the USB cable. After the PC has recognized the device as a removable storage medium, open a file explorer and delete file "vmmcode.usr" on the motor controller Use the explorer to navigate to the directory with your program. The compiled file has the same name as the source code file, only with the file name extension ".usr". Rename this file to "vmmcode.usr". Now copy file "vmmcode.usr" to the motor controller. Disconnect the voltage supply from the motor controller for approx. 1 second. Reconnect the voltage supply. At the next start of the motor controller, the new NanoJ program is read-in and launched. Tip You can also copy an empty file reset.txt to the motor controller in order to restart the motor controller. This restarts the motor controller. The file reset.txt is deleted at the restart. Note The NanoJ program on the motor controller must have the file name "vmmcode.usr". If the NanoJ program was deleted, an empty file with name "vmmcode.usr" is created at the next startup. Tip Deletion of the old NanoJ program and copying of the new one can be automated with a script file. In Windows you can create a file with file extension bat and the following content: Copy <SOURCE PATH>\<OUTPUT>.usr <TARGET>:\vmmcode.usr. For example: copy c:\test\main.usr n:\vmmcode.usr For Linux you can create a script with file extension sh and the following content: #!/bin/bash cp <SOURCE PATH>/<OUTPUT>.usr <TARGET PATH>/vmmcode.usr