Introduction
The NB*-TW01B series is equipped with a USB HOST port, which is a USB A-type port. Through this port, USB memory can be connected to perform uploading, downloading, project operation and storage of related data.
This article explains the different options that are available when using an USB stick with the HMI.
USB memory stick
An USB flash drive is a data storage device that includes flash memory with an integrated Universal Serial Bus (USB) interface.
Flash drives use little power, have no fragile moving parts, and for most capacities are small and light. Data stored on flash drives is not sensitive to mechanical shock, magnetic fields, scratches and dust. These properties make them suitable for transporting data from place to place and keeping the data readily at hand.
Like all flash memory devices, flash drives can sustain only a limited number of write and erase cycles before the drive fails. This should be a consideration when using a flash drive to run application software or when using them for data logging.
USB flash drives use the USB mass storage standard, supported natively by modern operating systems such as Microsoft Windows, Mac OS X, Linux and other Unix-like systems, as well as many BIOS boot ROMs.
The memory in flash drives is commonly engineered with multi-level cell (MLC) based memory that is good for around 3,000-5,000 program-erase cycles, but some flash drives have single-level cell (SLC) based memory that is good for around 100,000 writes.
Industrial grade single-level cell (SLC) USB flash memory drives are designed for industrial, medical, and military applications and are much more durable and reliable than the consumer grade and the "industrial" consumer-grade multi-level cell (MLC) USB flash disks. The industrial grade USB flash disks are built to endure severe operating environments such as extreme cold and hot temperatures, continuous vibration, high shock impact, intensive read-write cycles, etc. The industrial grade USB flash memory disk features vital benefits such as wear-leveling, error correction, sustained write speed, shock and vibration strength, and temperature range extension. Such features are essential to industries that require a more robust and rugged digital storage option to ensure repeatable and reliable operation.
There are many memory sticks available on the market in various capacities and designs. Even though most makers of USB devices, including Omron, design according the USB standard (www.usb.org), it is good to know that not all memory sticks will be recognized by the USB driver of the NB HMI.
The industrial memory sticks of the bigger brands are the most stable and reliable, but ordinary consumer sticks also can work. The differences between the two are explained in this article but it is difficult to say in advance which one will work as the offer in the market is constantly changing.
With the attached NB HMI program USB memory sticks can be tested if they are recognized by the HMI and if the Read and Write functions work properly. See Section 9: How to test if a memory stick works.
Content
1. Import/export HMI Program and Recipe files
2. Using Picture from Extended Memory
3. Historical Event Storage
4. Operation Log
5. Data Encryption
6. Save Screenshot
7. Project downloads via USB Disk
8. System registers
9. Program example
1. Import/export HMI Program and Recipe files
The USB stick can be used to transfer the NB HMI project to/from NB HMI screen or transferring recipe files.
System Menu options:
• USB<-HMI: Uploads the user project file (.pkg) required by the HMI operation to the USB memory. And the upload password is required during the export. If the upload password is not set, it needs to use the default password of 888888.
• USB->HMI: Downloads the user project file (.pkg) in USB memory to HMI.
• RCP<-HMI: Uploads the recipe data file (.rcp) in HMI to the USB memory.
• RCP->HMI: Downloads the recipe data file (.rcp) in USB memory to HMI.
Function key options:
When this function is selected, touching the Function Key can realize the import or export of project data and recipe data. This function needs to be used in combination with the File List Window. The File List is used to display the file information of the external storage device.This is only applicable to the HMI with USB Host.
2. Using Picture from Extended Memory
NB-Designer also supports to load the pictures directly from the external memory in order to save memory space of the HMI.
3. Historical Event Storage
Historical Data Display, Trend Curve and XY Plot can be stored in the external devices only by checking the [Save to External Device] option in the [Historical Events Storage] tab in the [HMI Attribute] dialog box.
4. Operation Log
The Operation Log component can be used to record and display the operations done by the users of the HMI. The operation log will be stored into the external memory in CSV format.
5. Data Encryption
For the data stored in the external memory (USB stick), data encryption function can be used to limit the user to make modifications, editing and so on to the data files in CSV format on the USB stick.
6. Save Screenshot
The “.bmp” pictures stored in the external storage device is named in storage time form (i.e. “yyyy-mmdd, hour: minute; second; millisecond” form) by default, such as “2010-09-01, 10:12:50:203.bmp”. But the picture name can be customized by the user through the system register LW9470 to control the prefix title of the picture file.
Note: After the “Save Screenshot to The Extended Memory” operation is performed, wait about 1 minute, before the external storage is removed to ensure the successful storage of the screenshot.
7. Project downloads via USB Disk
When the project is too large, it can be directly downloaded to the external storage device to operate it from this memory.
8. System registers
LW9154
USB stick insertion and removal status When the USB stick is inserted, it will turn ON and it should be turned OFF before removal to ensure the safe removal of USB stick.
LW9470
Name of the file on USB stick. The prefix character string with a Word Length of 16 (read/write) is the prefix name of file copied into USB stick by screenshot method.
LWB9297.10
USB disk1Full. Will be ON when there is not enough space on the USB stick to perform the action.
LB9154
Used for setting “USB Disk 1 Safely Remove”. When the USB disk is inserted, it will turn ON automatically and it should be turned OFF before removal to ensure the safe removal of USB disk.
LB9157
Used for clearance of the folders in USB disk 1. All the folders generated by HMI in the USB disk 1 will be cleared.
LW9470~LW9485
Used for the prefix title of the print-screen file, i.e. the prefix character string in the name of the file copied into USB disk by print-screen method.
9. Program example
The example program that’s attached to this article shows the possibility to test if the USB stick is recognized.
Also functions like Historical Event Display, Historical Data display, Trend Curve, Operation log, File list, Bitmap from memory disk and Screenshot that create files are in this example program. There is also a NB Setup screen to Adjust settings like Date, Time, Buzzer, Screen Saver, Brightness adjust and Calibrate screen (tap on the NB in the Main screen).
How to test if a Memory stick works:
1. Extended image load:
Copy example.jpg file to USB memory.
2. USB Memory plug in and plug out:
Plug in USB memory stick, wait some seconds, USB icon will change to green color.
Press Eject Icon.
Wait some seconds, USB icon will be change to red color and then Remove USB memory stick.
3. Save screenshot to USB Memory
Plug in USB memory stick, wait some seconds.
Press the “Save Screenshot” key several times.
Note the number of times that is pressed.
4. Customize the user-defined Screenshot name
Input a ASCII name by text input component.
Press the “Save Screenshot” button several times.
Wait some minutes and Remove USB memory stick.
Confirm the Screenshots has been saved in USB memory “scr” directory.
5. Event login save
Press the “event” button several times.
Wait some minutes and Remove USB memory stick.
Confirm the event info has been saved in USB memory “event/Event” directory.
Confirm the information content and the event information number is correctly.
6. Empty the log data of USB memory
Wait some minutes, press the “Clear” button and Remove USB memory stick.
Confirm that the log info has been deleted in USB memory ”log” directory.
Notes
Supported Disk formats:
- FAT
- FAT32
The project directly copied into the external storage device doesn’t work.
When downloading project from NB-Designer or transferring project from the USB disk to the NB Unit, if there is a message like “Please update Kernel and Rootfs (NB-D v1.22 or later).” or “Please update Kernel and Rootfs in the NB-Designer.” displayed, it means user should update the NB Kernel and root file system (See article: How To Update The NB Kernel And Root File System).
The data in ERW will be stored into the specified external memory with “erp” as the file format and the storage path of “/exmem/erwx.erp”. (x = 0, 1, 2)
When connecting the equipment with the USB HOST connector, make sure the supply equipment’s current capacity is below 150mA before using it. The DC+5V voltage output of the NB Unit is +5V (±5%), and the maximum current is 150mA.
Do not perform the following operations during the communication of the USB memory:
• Turn off the power supply of the NB Unit.
• Press the Reset button on the NB Unit.
• Remove the USB memory.
Do not use the USB memory in the environment subject to strong vibration.
References
Host Connection Manual (Cat. No. V108)
NB-Designer Operation Manual (Cat. No. V106)
Setup Manual (Cat. No. V107)
Startup Guide Manual (Cat. No. V109)
NB-series Manuals are installed within NB-Designer.
Program versions: NB-Designer version 1.23