Prepare Disk on Key (DOK) or SD card to work with PLC
Alex Karpov
Jun-11th, 2019 11:22

There may be number of conditions, leading to problems with SD/Disk on key mount and read at PC and (UniStream) PLC.
*This example processed with 8 GB SD card and SD to USB adapter
*If you have important files at SD/Disk on key - make backup.
1. If use Virtual Machine.
Please check that selected USB port is linked to this VM
2. Open DOS prompt (Administrative) at VM.
3. Run "diskpart"
4. Enter "list disk". This command will list disks at your Windows VM.
DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          465 GB      0 B
  Disk 1    Online          931 GB      0 B

For example, you have 2 disks, as listed.
5. Insert your SD/Disk on key to linked to this VM USB or SD slot.
6. Enter "list disk". This command will list disks at your Windows VM.
DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          465 GB      0 B
  Disk 1    Online          931 GB      0 B
* Disk 2    Online         7580 MB      0 B

New disk should be listed. If new disk is not listed, than there is a problem you should solve by IT.
7. Suppose that a new disk listed.
Enter "select disk 2".

DISKPART> select disk 2

Disk 2 is now the selected disk.


8. Enter "list partition"

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
* Partition 1    Primary           7580 MB      0 B

Offset should not be 0 B

9. Enter "clean"

DISKPART> clean


This will clean partition information from selected disk. TAKE CARE TO SELECT new listed disk.
EVERYTHING will be deleted from selected disk.

This will take some time to prosess.

Be patient.

10. When finished, message will be displayed:
DISKPART> clean

DiskPart succeeded in cleaning the disk.

11. Enter "list disk".
DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          465 GB      0 B
  Disk 1    Online          931 GB      0 B
* Disk 2    Online         7580 MB      0 B

New disk should be listed and marked by *.
12. Suppose that a new disk listed.
Enter "select disk 2".
13. Enter "list partition"
DISKPART> list partition

There are no partitions on this disk to show.

14. Enter "create partition primary"
DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

15. Enter "list partition"

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
* Partition 1    Primary           7579 MB  1024 KB

Offset should not be 0 B

16. Enter "detail partition"
DISKPART> detail partition

Partition 1
Type  : 06
Hidden: No
Active: No
Offset in Bytes: 1048576

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 4     E                RAW    Removable   7579 MB  Healthy

File system is RAW (not formatted)

17. Format new disk from VM Windows File Explorer with cluster size 4096.
18. Enter "detail partition"
DISKPART> detail partition

Partition 1
Type  : 0B
Hidden: No
Active: No
Offset in Bytes: 1048576

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 4     E                FAT32  Removable   7579 MB  Healthy

File system is FAT32

19. Enter "exit"to close diskpart.

DISKPART> exit

Leaving DiskPart...

C:\>

20. You can close DOD prompt.
21. Eject SD/Disk on key from OS and detach it from PC USB port.
22. Insert SD/Disk on key to SAD slot or to USB connector at PLC.
23. Go to UniApps at PLC.
24. Select Memory->File Browser.
25. For SD card you can see list of default directories.


26. For Disk on key DOK you can see list of files or directories, if presented.

Hope this helps to make SD/Disk on key working.


Was this article helpful?
0 out of 0 found this helpful