首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

400分悬赏SATO DR360 条形码打印命令解决办法

2012-02-16 
400分悬赏SATO DR360 条形码打印命令目前我在SATO DR360用CODE128来打印条形码,已经CODE128的编码已经完成

400分悬赏SATO DR360 条形码打印命令
目前我在SATO DR360用CODE128来打印条形码,已经CODE128的编码已经完成了,但是不知道如何用什么命令向SATO DR360发送打印命令,
已经知道CODE39在SATO DR360是怎么工作的。
付上CODE39的打印命令。

VB code
Dim STX, ETX, ESC, CHR127Dim i As IntegerDim J As IntegerSTX = Chr(2)ETX = Chr(3)ESC = Chr(27)CHR127 = Chr(127)mscommpbc.CommPort = comportnmscommpbc.PortOpen = TrueDim prtxt(20) As StringDim tsize As Integer    J = 1        tsize = Len(labeltitle)    If tsize <= 12 Then        prtxt(J) = "L01" & "1020031" & Trim(Str(Int(383 + 24 * (12 - tsize) / 2))) _                    & "001" & IIf(tsize < 10, "0" + Trim(Str(tsize)), Trim(Str(tsize))) _                    & "1100000000000000000000000000000000000000000000000000"    Else        prtxt(J) = "L01" & "1010031" & Trim(Str(Int(399 + 12 * (25 - tsize) / 2))) _                    & "001" & Trim(Str(tsize)) _                    & "2100000000000000000000000000000000000000000000000000"    End If    prtxt(J + 1) = "D01" & labeltitle        J = J + 2    Select Case btype:                Case "CODE39":            prtxt(J) = "L02" & "7010063390001" & IIf(Len(sBarcodeData) < 10, "0" + Trim(Str(Len(sBarcodeData))), Trim(Str(Len(sBarcodeData)))) _                        & "0106400000000000000000000000000000000000000000000000"            prtxt(J + 1) = "D02" & "*" & sBarcodeData & "*"            prtxt(J + 2) = "L03" & "1010128420003" & IIf(Len(sBarcodeData) < 10, "0" + Trim(Str(Len(sBarcodeData))), Trim(Str(Len(sBarcodeData)))) _                        & "1100000000000000000000000000000000000000000000000000"            prtxt(J + 3) = "D03" & sBarcodeData            J = J + 4        Case "EAN13":            prtxt(J) = "L02" & "7030063390003" & IIf(Len(sBarcodeData) < 10, "0" + Trim(Str(Len(sBarcodeData))), Trim(Str(Len(sBarcodeData)))) _                    & "0206410000000000000000000000000000000000000000000000"            prtxt(J + 1) = "D02" & sBarcodeData            prtxt(J + 2) = "L03" & "1010128420003" & IIf(Len(sBarcodeData) < 10, "0" + Trim(Str(Len(sBarcodeData))), Trim(Str(Len(sBarcodeData)))) _                    & "1100000000000000000000000000000000000000000000000000"            prtxt(J + 3) = "D03" & sBarcodeData            J = J + 4        Case Else:    End Select        prtxt(J) = "L04" & "1010144380001202105300000000000000000000000000000000000000000000000"    If chkPrefix.Value = vbChecked Then        prtxt(J + 1) = "D04" & txtPrefix.Text    Else        prtxt(J + 1) = "D04"    End If    J = J + 2        prtxt(J) = "L05" & "2020146" & IIf(prtxt(J - 1) = "D04", "400", "420") & "001201105300000000000000000000000000000000000000000000000"    If checkprice.Value = Checked Then        prtxt(J + 1) = "D05" & PAD(Trim(sPrice), 20)    Else        prtxt(J + 1) = "D05"    End If    J = J + 2        prtxt(J) = "L06" & "1010174390003301100000000000000000000000000000000000000000000000000"    If checkdesp.Value = Unchecked Then        sInvDescription = ""    End If    prtxt(J + 1) = "D06" & sInvDescription    J = J + 2        mscommpbc.Output = STX    WaitTime 0.01    mscommpbc.Output = ESC & "A"    WaitTime 0.01    mscommpbc.Output = ESC & "M" & "0240000020+00+000000137"    WaitTime 0.01    For i = 1 To J - 1        If prtxt(i) <> "" Then            mscommpbc.Output = ESC & prtxt(i)            WaitTime 0.01        End If    Next i         mscommpbc.Output = ESC & "Q" & Trim(Str(CInt(qty)))    WaitTime 0.01        mscommpbc.Output = ESC & "Z"    WaitTime 0.01        mscommpbc.Output = ETX    WaitTime 0.01        mscommpbc.PortOpen = False 





[解决办法]
我也不会这个问题,要吗你把分给我,我也去问下?

 
[解决办法]
探讨
我也不会这个问题,要吗你把分给我,我也去问下?

[解决办法]
SATO DR360没有用过,要看具体的接口定义
一般写好接口直接用 
Call setup(30, 7, 2, cont, 3, 0)

Call sendcommand("W80") '指定标签的宽度
Call sendcommand("^P1")
Call sendcommand("^L") '开始打印
Call sendcommand(s) '打印内容和起始位置
'ecTextOutR(40, 152, 30, "宋体", Label3.Caption, 0, 40, 0)
Call ecTextOutR(60, 172, 30, "宋体", sPrnStrName, 0, 40, 0)
Call sendcommand("E") '结束打印
Call closeport '关闭所开启的输出埠
[解决办法]
探讨
不过又要变成负翁了,

[解决办法]
找到了说明书,问题就解决了。

热点排行