发表于:2009/9/12 19:29:29
#0楼
dim cnvt
dim temp()
dim obj_s_com
dim soutput
set cnvt = createobject(ads.arrayconvert)
set obj_s_com = screenitems(m_com)
obj_s_com.commport = 1
redim temp(2)
temp(0) = &heb
temp(1) = &h90
temp(2) = &h71
dim v,v1,v2,v3,v4
v = temp
hmiruntime.trace the v is: & vartype(v) & &typename(v) &vbcrlf
obj_s_com.output = v
v1 = cnvt.cvoctetstr2vstr(v)
hmiruntime.trace the v1 is: & vartype(v1) & &typename(v1) & &vbcrlf
obj_s_com.output = v1
v2= cnvt.cvstr2voctetstr(v1)
hmiruntime.trace the v2 is: & vartype(v2) & &typename(v2) & &vbcrlf
obj_s_com.output = v2
v3 = cnvt.cvoctetstr2vhexstr(v)
hmiruntime.trace the v3 is: & vartype(v3) & &typename(v3) & &vbcrlf
obj_s_com.output = v3
v4 = cnvt.cvhexstr2voctetstr(v3)
hmiruntime.trace the v4 is: & vartype(v4) & &typename(v4) & &vbcrlf
obj_s_com.output = v4
可以发现比如>&h7e的ansi字码也可以通过串口正常发送。
vds.dll的下载地址:
http://support.microsoft.com/kb/250344/en-us
----------------------------------------------
此篇文章从博客转发
原文地址: Http://blog.gkong.com/more.asp?id=100310&Name=jczwfy
dim temp()
dim obj_s_com
dim soutput
set cnvt = createobject(ads.arrayconvert)
set obj_s_com = screenitems(m_com)
obj_s_com.commport = 1
redim temp(2)
temp(0) = &heb
temp(1) = &h90
temp(2) = &h71
dim v,v1,v2,v3,v4
v = temp
hmiruntime.trace the v is: & vartype(v) & &typename(v) &vbcrlf
obj_s_com.output = v
v1 = cnvt.cvoctetstr2vstr(v)
hmiruntime.trace the v1 is: & vartype(v1) & &typename(v1) & &vbcrlf
obj_s_com.output = v1
v2= cnvt.cvstr2voctetstr(v1)
hmiruntime.trace the v2 is: & vartype(v2) & &typename(v2) & &vbcrlf
obj_s_com.output = v2
v3 = cnvt.cvoctetstr2vhexstr(v)
hmiruntime.trace the v3 is: & vartype(v3) & &typename(v3) & &vbcrlf
obj_s_com.output = v3
v4 = cnvt.cvhexstr2voctetstr(v3)
hmiruntime.trace the v4 is: & vartype(v4) & &typename(v4) & &vbcrlf
obj_s_com.output = v4
可以发现比如>&h7e的ansi字码也可以通过串口正常发送。
vds.dll的下载地址:
http://support.microsoft.com/kb/250344/en-us
----------------------------------------------
此篇文章从博客转发
原文地址: Http://blog.gkong.com/more.asp?id=100310&Name=jczwfy
日本人说中日友好,中国人民笑了:你丫骗谁呢?
日本人说自己爱和平,亚洲人民笑了:说的是人话吗?
日本人说自己要维护世界和平,美国人民笑了:问你大爷没?
日本人说自己是人,全世界的狗都叫了:兄弟,做狗要厚道,不能忘本!
欢迎访问我的博客http://blog.gkong.com/blog.asp?name=jczwfy
在线PLC触摸屏问题解答加Q号2*7*5*4*7*0*0*6,加好友注明工控网
日本人说自己爱和平,亚洲人民笑了:说的是人话吗?
日本人说自己要维护世界和平,美国人民笑了:问你大爷没?
日本人说自己是人,全世界的狗都叫了:兄弟,做狗要厚道,不能忘本!
欢迎访问我的博客http://blog.gkong.com/blog.asp?name=jczwfy
在线PLC触摸屏问题解答加Q号2*7*5*4*7*0*0*6,加好友注明工控网