TSC AUTO ID Technology Co., Ltd. 118 Copyright 2013 All Rights Reserved.
OPEN
Description
This command opens a downloaded file and establishes the file handle. Up to two file handles are
supported, thus only up to two files can be opened simultaneously. The file to be opened should be
downloaded prior to using this command. When opening a file, the firmware will search automatically
to see if the file exists in the on board flash memory or extended memory card. *Since V6.37 EZ, if the
file doesn’t exist, the printer will create this file in the onboard FLASH.
Syntax
OPEN [memory ID,]"filename",file handle
Optional. Open the file in specific memory device. *Since V6.68 EZ.
The file downloaded in the printer memory
Example
Sample code
DOWNLOAD "DATA.DAT",18,Open file in DRAM.
DOWNLOAD F,"DATA.DAT",19,Open file in FLASH.
DOWNLOAD "TEST.BAS"
data1$=""
data2$=""
data3$=""
OPEN "DATA.DAT",0
READ 0,data1$
CLOSE 0
OPEN F,"DATA.DAT",0
READ 0,data2$
CLOSE 0
KILL F,"*"
OPEN "NEW.DAT",0
SEEK 0,0
WRITE 0,"Auto create a new file in FLASH."
SEEK 0,0
READ 0,data3$
CLOSE 0
SIZE 4,1
GAP 0,0
CLS
TEXT 10,10,"3",0,1,1,data1$
TEXT 10,60,"3",0,1,1,data2$
TEXT 10,110,"3",0,1,1,data3$
PRINT 1
EOP
TEST