Instructions for WP8 TSC Bluetooth/Ethernet library functions 1. openport() Bluetooth openport(a) 說明 : 指定電腦端的輸出埠參數 : a: 字串型別直接指定 Bluetooth MacAdress, 如 00:19:0E:A0:04:E1 Ethernet openport(a,b) 說明 : 指定電腦端的輸出埠參數 : a: 字串型別輸入 IP Address, 如 : 192.168.1.50 b: 數字型別輸入連接埠, 如 : 9100 2. closeport() 說明 : 關閉指定的電腦端輸出埠 3. setup(a,b,c,d,e,f,g) 說明 : 設定標籤的寬度 高度 列印速度 列印濃度 感應器類別 gap/black mark 垂直間距 gap/black mark 偏移距離 ) 參數 : a: 數字型別, 設定標籤寬度, 單位 mm b: 數字型別, 設定標籤高度, 單位 mm c: 數字型別, 設定列印速度,( 列印速度隨機型不同而有不同的選項 ) 1.0: 每秒 1.0 吋列印速度
1.5: 每秒 1.5 吋列印速度 2.0: 每秒 2.0 吋列印速度 3.0: 每秒 3.0 吋列印速度 4.0: 每秒 4.0 吋列印速度 6.0: 每秒 6.0 吋列印速度 8.0: 每秒 8.0 吋列印速度 10.0: 每秒 10.0 吋列印速度 d: 數字型別, 設定列印濃度, 0~15, 數字愈大列印結果愈黑 e: 數字型別, 設定使用感應器類別 0 表示使用垂直間距感測器 (gap sensor) 1 表示使用黑標感測器 (black mark sensor) f: 數字型別, 設定 gap/black mark 垂直間距高度, 單位 : mm g: 數字型別, 設定 gap/black mark 偏移距離, 單位 : mm, 此參數若使用一般標籤時均設為 0 4. clearbuffer() 說明 : 清除 5. barcode(a,b,c,d,e,f,g,h,i) 說明 : 使用條碼機內建條碼列印參數 : a: 數字型別, 條碼 X 方向起始點, 以點 (point) 表示 b: 數字型別, 條碼 Y 方向起始點, 以點 (point) 表示 c: 字串型別, 128: Code 128, switching code subset A, B, C automatically 128M: Code 128, switching code subset A, B, C manually. EAN128: Code 128, switching code subset A, B, C automatically 25: Interleaved 2 of 5 25C: Interleaved 2 of 5 with check digits 39: Code 39 39C: Code 39 with check digits 93: Code 93
EAN13: EAN 13 EAN13+2: EAN 13 with 2 digits add-on EAN13+5: EAN 13 with 5 digits add-on EAN8: EAN 8 EAN8+2: EAN 8 with 2 digits add-on EAN8+5: EAN 8 with 5 digits add-on CODA: Codabar POST: Postnet UPCA: UPC-A UPCA+2: UPC-A with 2 digits add-on UPCA+5: UPC-A with 5 digits add-on UPCE: UPC-E UPCE+2: UPC-E with 2 digits add-on UPCE+5: UPC-E with 5 digits add-on d: 數字型別, 設定條碼高度, 高度以點來表示 e: 數字型別, 設定是否列印條碼明文 0: 不列印碼文 1: 列印碼文 f: 數字型別, 設定條碼旋轉角度 0: 旋轉 0 度 90: 旋轉 90 度 180: 旋轉 180 度 270: 旋轉 270 度 g: 數字型別, 設定條碼窄 bar 比例因子, 請參考 TSPL 使用手冊 h: 數字型別, 設定條碼寬 bar 比例因子, 請參考 TSPL 使用手冊 I: 字串型別, 條碼內容 6. printerfont(a,b,c,d,e,f,g) 說明 : 使用條碼機內建文字列印參數 : a: 數字型別, 文字 X 方向起始點, 以點 (point) 表示 b: 數字型別, 文字 Y 方向起始點, 以點 (point) 表示 c: 字串型別, 內建字型名稱, 共 12 種 1: 8*/12 dots 2: 12*20 dots
3: 16*24 dots 4: 24*32 dots 5: 32*48 dots TST24.BF2: 繁體中文 24*24 ( 客制化字型 ) TST16.BF2: 繁體中文 16*16 ( 客制化字型 ) TTT24.BF2: 繁體中文 24*24 ( 電信碼 ) ( 客制化字型 ) TSS24.BF2: 簡體中文 24*24 ( 客制化字型 ) TSS16.BF2: 簡體中文 16*16 ( 客制化字型 ) K: 韓文 24*24 ( 客制化字型 ) L: 韓文 16*16 ( 客制化字型 ) d: 數字型別, 設定文字旋轉角度 0: 旋轉 0 度 90: 旋轉 90 度 180: 旋轉 180 度 270: 旋轉 270 度 e: 數字型別, 設定文字 X 方向放大倍率,1~8 f: 數字型別, 設定文字 X 方向放大倍率,1~8 g: 字串型別, 列印文字內容 7. sendcommand(a) 說明 : 送印表機指令到條碼印表機 參數 : 字串型別 : 詳細指令請參考 TSPL 8. printlabel(a,b) 說明 : 列印標籤內容參數 : a: 數字型別, 設定列印標籤式數 (set) b: 數字型別, 設定列印標籤份數 (copy)
9. formfeed() 說明 : 跳頁, 該函式需在 setup 後使用 10. nobackfeed() 說明 : 設定紙張不回吐 11. putbmp(a,b,c) 說明 : 列印印表機記憶體的 BMP 圖檔參數 : a: 數字型別, 文字 X 方向起始點, 以點 (point) 表示 b: 數字型別, 文字 Y 方向起始點, 以點 (point) 表示 c: 字串型別 :BMP 檔案名稱 ( 請先下載該檔案至印表機 ) 12. putpcx(a,b,c) 說明 : 列印印表機記憶體的 PCX 圖檔參數 : a: 數字型別, 文字 X 方向起始點, 以點 (point) 表示 b: 數字型別, 文字 Y 方向起始點, 以點 (point) 表示 c: 字串型別 :PCX 檔案名稱 ( 請先下載該檔案至印表機 )
WP8 Bluetooth Example using TSCSDK; private TSCSDK.Bluetooth bluetooth = new TSCSDK.Bluetooth(); bluetooth.openport("00:19:0e:a0:7a:50"); bluetooth.clearbuffer(); bluetooth.setup(100,50,3,6,0,0,0); bluetooth.barcode(100,200,"128",100,1,0,3,3,"123456789"); bluetooth.printerfont(100,100,"3",0,1,1,"printer Font Test"); bluetooth.sendcommand("box 50,50,500,400,3\n"); bluetooth.printlabel(1,1); bluetooth.closeport(); Note: 請勾選該應用程式的以下功能 WP8 Ethernet Example using TSCSDK; private TSCSDK.Ethernet IP = new TSCSDK.Ethernet(); IP.openport("10.0.10.155", 9100); IP.clearbuffer(); IP.setup(100, 60, 4, 6, 0, 0, 0); IP.barcode(100, 200, "128", 100, 1, 0, 3, 3, "123456789"); IP.printerfont(100, 100, "3", 0, 1, 1, "Printer Font Test"); IP.sendcommand("BOX 50,50,500,400,3\n"); IP.putpcx(200,100,"UL.PCX"); IP.printlabel(1, 1); IP.closeport();