Managing Files and Memory on the NXT Icon of block

NXT的檔案與記憶體管理
Managing Files and Memory on the NXT

在某些的情況下,是需要管理NXT的檔案與記憶體. 按下控制器左上角的NXT視窗後,可以在記憶體標籤上使用該項功能.
It is sometimes necessary to manage files and memory on the NXT. You can do this by accessing the Memory tab of the NXT window that is launched from the upper left button of the controller.

Image of the controller with the NXT window button highlighted

NXT視窗的記憶體標籤有圖形化的顯示來呈現NXT的記憶體使用量. 在這裡也可以發送程式,聲音,圖像或其他檔案到NXT上,並能夠複製或刪除已存在NXT上的檔案.
The memory tab of the NXT window provides a graphical overview of memory usage on your NXT. From here you can also send programs, sounds, graphics and other files to your NXT from a PC, and copy and delete files that are already on your NXT.

Image of the controller with the NXT window button highlighted

  1. 圖形化表示已使用跟可用的記憶體.
    A graphical overview of used and available memory.
  2. 不同的檔案類型(程式,聲音,圖形等)會佔用掉NXT記憶體.點選類型的名稱會在表中顯示出該類型的檔案.
    The different file categories (programs, sounds, graphics, other...) that take up the NXT’s memory. Clicking on a category name will display these types of files in the list.
  3. 列出所選擇類型的檔案.
    A list of files in the currently selected category.
  4. 刪除. 此按鍵刪除任何NXT的檔案.
    Delete. This button deletes any selected files from the NXT.
  5. 下載. 此按鍵從PC下載檔案到NXT.
    Download. This button will download files from your PC to the NXT.
  6. 上傳. 此按鍵會從NXT複製到PC上.
    Upload. This button will copy any selected files from the NXT to your PC.
  7. 刪除所以使用者檔案. 此按鍵刪除所以使用者檔案並清空NXT記憶體.
    Delete all User Files. This button deletes all user files and cleans up the NXT’s memory.
  8. 顯示系統檔案. 勾選此項目會顯示NXT中預載的檔案.
    Show System Files. Checking this box will reveal all factory-installed files on the NXT.

NXT的記憶體
The NXT’s memory

每個NXT都有130.7 kilobytes的記憶體可供使用.有些記憶體是用來儲存當首次拿到NXT時所範例用的程式,圖形,聲音檔案. 因此剩下56 kilobytes的空間可供使用跟下載.
Each NXT has an available memory of about 130.7 kilobytes. Some of this memory is used to store example programs, graphics and sound files that are pre-loaded on the NXT device when you first get it. This leaves about 56 kilobytes for the files you create and download.

記憶體空間不足
Running out of memory

如果記憶體空間不足,可以刪除NXT中的若干檔案以增加記憶體.檢查左方圖形化的記憶體使用量(1)並看出哪種檔案佔掉最多的記憶體.點選類型名稱(2)後,該類型的檔案就會列在表中. 選取不需要的檔案並按下刪除鍵.
If you run out of memory you can delete some or all of the files on your NXT. To do this, examine the memory overview graphic to the left (1) and identify which types of files take up most memory. Click that category name (2) and its files will be displayed in the list. Select the files you don’t need in the list and click the Delete button.

檔案全數刪除
Deleting all of your files

按下刪除所有檔案按鍵即可刪除所有產生的檔案並清空NXT記憶體. 這個動作會刪除所以曾經傳送到NXT的檔案並重新整理記憶體,以便位新檔案騰出最大量的記憶體空間. 而這麼做是不會刪除預載到NXT的系統檔.
You can erase all of your created files and clean up the NXT’s memory by clicking the Delete all User Files button. This will delete all of the files you have ever sent to the NXT and re-organize the memory to leave the maximum amount free for new files. Doing this will not delete any of the system files that were pre-loaded in the NXT at the factory.

注意: 在某些情況下,當圖表顯示空餘的記憶體空間時卻會出現記憶體不足的訊息顯示. 這是因為記憶體的碎裂問題.要解決這樣的問題可以按下"刪除所以檔案"按鍵.但請記得在刪除前備份所以原先的檔案.
Note: On rare occasions you can get an out-of-memory error message even when the graphical memory overview (1) indicates there is free space available. This is caused by memory “fragmentation.” Fix this problem by using the Delete All User Files button but remember to back up any of your essential files before proceeding.

也可以使用NXT本身的按鍵來刪除檔案. 詳細的說明請參閱紙本使用手冊的NXT技術章節.
You can also delete files using the icons on the NXT itself. For details, see the NXT Technology section in the printed User Guide.

記憶體空間釋放
Freeing up as much memory as possible

如果刪除使用者檔案還不足以釋放出足夠的記憶體,還可以刪除預載的範例檔案.這些檔案視為系統檔案並佔有62 kilobytes. 包含有啟動程式,其他音效檔,範例檔跟功能測試程式.
If deleting your user files does not free up enough memory, you can also delete the demo and example files that came pre-loaded in the NXT. These files are referred to as system files and take up around 62 kilobytes. The system files include the start-up and other sounds as well as the demo and Try Me programs.

藉由重新載入韌體功能便可以重新恢復NXT裝置的記憶體到出廠預設值(包含所有系統檔). 請看以下"復原記憶體原廠設定".
You can always restore the NXT device’s memory back to factory default condition (with all of the system files) by restoring the firmware. See “Restoring an NXT’s memory...” below.

刪除系統檔,請先勾選顯出系統檔案項目.然後在選擇檔案類型與想移除的檔案.並按下刪除鍵以刪除想要從記憶體移除的檔案.
To delete system files, check the Show System Files box (8). Then select a file category (2) and choose the system files you want to remove (3). Click Delete for each file you want to erase from memory.

注意: 刪除系統檔是可以清除記憶體但同時也會讓NXT的特徵消失. 然而刪除檔案卻不能"破壞"NXT.
Note: By deleting system files you will free up memory but at the same time also remove features from the NXT. However, you cannot “break” the NXT by deleting system files.

以下表列出系統檔案跟所代表的特徵
Here is a list of the system files and the features they enable:

類型
Category
檔案名稱
File name
描述
Description
其他
Other
NVConfig.sys 睡眠時間跟音量設定都存在這個檔案中.如果這個檔被刪除,有個新檔案會自動升成.
Settings like sleep time and volume are stored in this file. If you delete this file, a new one will be created automatically.
Try-*.rtm 任何以"Try-"開始的系統檔都是特定的感應器或是輸出的測試檔. 刪除這些檔案都會消去個別在測試NXT選單中的測試程式.
Any system file starting with “Try-“ is a Try Me program for a specific sensor or output. Deleting each of these will remove the individual Try Me programs from the Try Me NXT menu.
RPGreader.sys 這個程式負責執行NXT本身的程式, 刪除這個檔將無法執行NXT軟體的程式.但是從電腦產生跟下載的程式還是可以執行.
This program lets you run NXT programs (programs that are created on the NXT itself using the NXT Program icon). Deleting this file will remove the ability to run programs made on the NXT. Programs created and downloaded from a PC will still work.
*.tmp 以".tmp"為結尾的檔案為暫時性檔案.這些檔案都是可以被刪除.
Any file ending with “.tmp” is a temporary file. Temporary files can always be deleted.
*.bak 以".bak"為結尾的檔案為暫時性檔案.這些檔案都是可以被刪除.
Any file ending with “.bak” is a temporary file. Temporary files can always be deleted.
圖片
Graphics
開始臉 faceopen Lego人物嘴巴張開的圖像,用在測試程式中.
Picture of LEGO minifig head (with mouth open) used in the Try Me programs.
關閉臉 faceclosed Lego人物嘴巴緊閉的圖像,用在測試程式中.
Picture of LEGO minifig head (with mouth closed) used in the Try Me programs.
聲音
Sounds
哎呀 Woops 使用在測試程式中的聲音檔, 刪除這個檔案會消去在程式中使用的聲音檔. 不過這個程式仍會以無聲的狀態執行.
Sound file used in the Try Me programs. Deleting this file will remove the sound from the programs it is used in. The programs will still work without the sound.
開啟 ! Startup 在NXT啟動時撥放的聲音檔,刪除這個檔會消去啟動時的聲音.
Sound file played when the NXT starts up. Deleting this file will remove the sound at start up.
卡嗒 ! Click 在NXT的按鈕被按下時所發出的聲音. 刪除這個檔會消去按鍵按下時聲音.
Sound file played when a button is pressed on the NXT. Deleting this file will remove the sound when a button is pressed on the NXT.
注意 ! Attention 當NXT遇到警告時所發出的聲音檔.刪除這個檔會消去當警告出現時的聲音.
Sound file played when the NXT issues a warning. Deleting this file will remove the sound when a warning is issued.
程式
Programs
範例 Demo 快速開始模組的範例檔. 刪除這個檔會移除NXT的範例程式.
Demo program for the Quick Start model. Deleting this will remove the Demo program from the NXT.

復原記憶體原廠設定
Restoring an NXT’s memory back to factory default condition

藉由重新安裝NXT的韌體是可以將NXT的記憶體回復到出廠預設情況.詳細操作請參閱"NXT韌體更新"章節. 請注意這樣重新安裝韌體的動作會刪掉所有記憶體裡面的檔案,所以在做這個動作前先備份想留下的檔案.
You can restore an NXT’s memory back to factory default condition by re-installing the NXT firmware. For details on this operation, see the Help topic, “Updating the NXT's Firmware.” Be aware that re-installing the NXT firmware will delete all files in the NXT’s memory -- make sure to make a back up of any personal files you want to keep before proceeding.

記憶體備份
Copying and backing up files stored on the NXT

如果要備份個人檔案或是想跟朋友交換在NXT裡的檔案.是要把檔案從NXT複製到電腦上.
To make a back up copy of your personal files or to share files stored on the NXT with friends, you should copy the files off the NXT to your PC.

首先,選取想要備份或是分享的檔案類型(2),再選擇表列(3)中的檔案. 然後再按下"上傳"(7)按鍵.最後選擇要存在電腦裡的資料夾再按OK.
,To do this, first select the file category (2) for the files you would like to back up or share. Select the desired files in the list (3) and click Upload (7). Finally, select the folder where the files will be saved on your PC and click OK.

傳輸檔案至NXT
Sending a file back to the NXT

傳送檔案至NXT只需按下"下載"(5)按鍵.選擇電腦中要複製的檔案接著按ok即完成.
To send a file back to the NXT, click the Download (5) button. Select the file you want to copy from your PC and click OK.