From: Graham McKechnie on 27 Aug 2007 16:08 You'll find this one even better http://www.serial-port-monitor.com/index.html Graham "Dave Francis" <dave.is.a.spam.free.zone(a)suilven.com> wrote in message news:5jfpr5F3t9179U1(a)mid.individual.net... > Henk, > > I have never used this but it is where I would start... > > http://www.microsoft.com/technet/sysinternals/utilities/portmon.mspx > > HTH > > Dave Francis > > "Henk Kortstra" <henk75(a)gmail.com> wrote in message > news:1188197216.236746.326980(a)d55g2000hsg.googlegroups.com... >> Hi All, >> >> I have a question about sending messages to a rs232 port. >> I'm sending messagest to a device that gives me info about registered >> persons. >> The problem is, that I can't initialise the device from VO. >> But after I used the demo app, VO also can read the device. >> It is just like the demo app initialises the device, and after that VO >> can als send/read from the device. >> >> I'm using portmon to track what kind of codes are send to the device, >> but I can't see what I'm missing, or how I can solve (initialise) the >> device with VO. >> >> Below this message I have put results from Portmon: >> >> 1) First try with VO, before the demo app has started. >> The VO-app doens't work. >> >> 2) First try with the Demo App, what does work >> >> 3) Second try with VO, what now also does work >> >> I'm using the serial class. >> The code i'm using is: >> >> oSer := Serial{} >> IF ! oSer:Open("COM5",9600,"N",8,1) >> ErrorBox{,"Promag:(1) cannot open COM5"}:show() >> exit >> Endif >> >> //LOGIN >> oSer:Write(CHR(2)) >> oSer:Write("L") >> oSer:Write("0000") >> oSer:Write(CHR(13)) >> >> dwDummy := Asc(oSer:Read(1)) >> if dwDummy==0 >> ErrorBox{self,"Login failed"}:show() >> exit >> endif >> >> Can anyone see, what I have to do, to initialise the device with VO, >> so that the first try with VO also works, without using the demo-app >> first? >> >> Regards >> Henk Kortstra. >> >> 1) First try with VO: >> >> 0 0.13356838 Partner.DBG IRP_MJ_CREATE Serial3 SUCCESS Options: Open >> 1 0.00000185 Partner.DBG IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS >> InSize: 4096 OutSize: 4096 >> 2 0.00000268 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: >> TXABORT RXABORT TXCLEAR RXCLEAR >> 3 0.00000071 Partner.DBG IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS >> RI:-1 RM:500 RC:1000 WM:0 WC:1000 >> 4 0.00000067 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS >> 5 0.00000042 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 >> SUCCESS >> 6 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS >> 7 0.00000037 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS >> 8 0.00000065 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS >> 9 0.00000045 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 >> SUCCESS >> 10 0.00000038 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS >> 11 0.00000037 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS >> 12 0.05350680 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS >> Rate: 9600 >> 13 0.00298947 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS >> 14 0.00297631 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS >> 15 0.00000078 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 >> INVALID PARAMETER StopBits: 1.52 Parity: NONE WordLength: 8 >> 16 0.00000072 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS >> 17 0.00000064 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 >> SUCCESS >> 18 0.00000061 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS >> 19 0.00000051 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS >> 20 0.05447063 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS >> Rate: 1200 >> 21 0.00242558 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS >> 22 0.00297565 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS >> 23 0.00398295 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 >> SUCCESS StopBits: 1 Parity: NONE WordLength: 7 >> 24 0.00000114 Partner.DBG IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 >> ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 >> 25 0.00696934 Partner.DBG IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS >> Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 >> 26 0.00091875 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . >> 27 0.00093789 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: L >> 28 0.00093976 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 4: 0000 >> 29 0.00093980 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . >> 30 1.50002063 Partner.DBG IRP_MJ_READ Serial3 TIMEOUT Length 0: >> 31 0.00000414 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: >> TXABORT RXABORT TXCLEAR RXCLEAR >> 32 0.00270768 Partner.DBG IOCTL_SERIAL_CLR_DTR Serial3 SUCCESS >> 33 0.00294357 Partner.DBG IOCTL_SERIAL_CLR_RTS Serial3 SUCCESS >> 34 0.00000119 Partner.DBG IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS >> 35 0.00000206 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: >> TXABORT RXABORT TXCLEAR RXCLEAR >> 36 0.03006611 Partner.DBG IRP_MJ_CLEANUP Serial3 SUCCESS >> 37 0.08773053 Partner.DBG IRP_MJ_CLOSE Serial3 SUCCESS >> >> 2) First try with the demo-app: >> >> 0 0.13308018 MSR120.exe IRP_MJ_CREATE Serial3 SUCCESS Options: Open >> 1 0.00000239 MSR120.exe IRP_MJ_FLUSH_BUFFERS Serial3 SUCCESS >> 2 0.00000136 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS >> 3 0.00000081 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 >> SUCCESS >> 4 0.00000066 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS >> 5 0.00000064 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS >> 6 0.00000068 MSR120.exe IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS >> RI:-1 RM:0 RC:0 WM:0 WC:0 >> 7 0.00000064 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS >> 8 0.00000060 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 >> SUCCESS >> 9 0.00000057 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS >> 10 0.00000053 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS >> 11 0.00000063 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS >> 12 0.00000058 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 >> SUCCESS >> 13 0.00000056 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS >> 14 0.00000052 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS >> 15 0.05348187 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS >> Rate: 9600 >> 16 0.00257213 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS >> 17 0.00297741 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS >> 18 0.00000075 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS >> StopBits: 1 Parity: NONE WordLength: 7 >> 19 0.00000087 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 >> ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 >> 20 0.00695588 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS >> Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 >> 21 0.00000148 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS >> 22 0.00000054 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 >> SUCCESS >> 23 0.00000051 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS >> 24 0.00000046 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS >> 25 0.05375837 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS >> Rate: 9600 >> 26 0.00215867 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS >> 27 0.00297495 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS >> 28 0.00000070 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS >> StopBits: 1 Parity: NONE WordLength: 7 >> 29 0.00000083 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 >> ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 >> 30 0.00695350 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS >> Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 >> 31 0.00000078 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS >> 32 0.00000081 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 >> SUCCESS >> 33 0.00000060 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS >> 34 0.00000057 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS >> 35 0.05416480 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS >> Rate: 9600 >> 36 0.00271702 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS >> 37 0.00297862 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS >> 38 0.00398937 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS >> StopBits: 1 Parity: NONE WordLength: 8 >> 39 0.00000124 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 >> ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 >> 40 0.00695856 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS >> Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 >> 41 0.00000100 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS >> 42 0.00000066 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 >> SUCCESS >> 43 0.00000059 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS >> 44 0.00000060 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS >> 45 0.00000102 MSR120.exe IOCTL_SERIAL_SET_WAIT_MASK Serial3 SUCCESS >> Mask: RXCHAR RXFLAG TXEMPTY CTS DSR RLSD BRK RING >> 46 0.00000037 MSR120.exe IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS >> InSize: 1024 OutSize: 256 >> 47 0.00000103 MSR120.exe IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: >> TXABORT TXCLEAR >> 48 0.00000082 MSR120.exe IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: >> RXABORT RXCLEAR >> 49 0.00000039 MSR120.exe IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS >> 50 0.00000034 MSR120.exe IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS >> 51 0.00286683 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS >> 52 0.00297183 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS >> 53 0.00291440 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS >> 54 0.00690560 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 55 0.00298020 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS >> 56 0.00094354 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 57 0.00098412 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 58 0.00096501 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 59 0.00098642 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 60 0.00096843 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 61 0.00098604 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 62 0.00096879 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 63 0.00098561 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 64 0.00096857 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 65 0.00098422 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 66 0.00096828 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 67 0.00098851 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 68 0.00097018 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 69 0.00098516 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 70 0.00096742 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 71 0.00098716 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 72 0.00096774 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 73 0.00098673 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 74 0.00096929 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 75 0.00098290 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 76 0.00096711 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 77 0.00098835 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 78 0.00097126 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 79 0.00098652 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 80 0.00097014 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 81 0.00098546 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 82 0.00096915 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 83 0.00098654 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 84 0.00096919 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 85 0.00098689 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 86 0.00096960 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 87 0.00098720 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 88 0.00097034 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 89 0.00098509 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 90 0.00096888 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 91 0.00098498 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 92 0.00096786 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 93 0.00098678 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 94 0.00096822 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 95 0.00098731 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 96 0.00096981 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 97 0.00099082 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 98 0.00097378 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 99 0.00098137 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 100 0.00097086 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 101 0.00097074 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 102 0.00095348 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 103 0.00098126 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 104 0.00096880 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 105 0.00097121 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 106 0.00094678 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 107 0.00098237 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 108 0.00096766 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 109 0.00098791 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 110 0.00097027 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 111 0.00098557 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 112 0.00096850 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 113 0.00097090 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 114 0.00094687 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 115 0.00098532 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 116 0.00096972 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 117 0.00098683 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 118 0.00096923 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 119 0.00098165 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 120 0.00097080 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. >> 121 0.04099233 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 122 0.00000153 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 >> SUCCESS >> 123 0.00000204 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . >> 124 0.00090323 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 125 0.00000107 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 >> SUCCESS >> 126 0.00000128 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: N >> 127 0.00088289 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 128 0.00000077 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 >> SUCCESS >> 129 0.00000124 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 >> 130 0.00095234 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 131 0.00000097 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 >> SUCCESS >> 132 0.00000127 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 >> 133 0.00087157 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 134 0.00000082 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 >> SUCCESS >> 135 0.00000126 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . >> 136 0.11098306 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 137 0.00000276 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 >> SUCCESS >> 138 0.00000202 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . >> 139 0.00062712 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 140 0.00000083 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 >> SUCCESS >> 141 0.00000138 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: N >> 142 0.00093919 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 143 0.00000078 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 >> SUCCESS >> 144 0.00000122 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 >> 145 0.00094818 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 146 0.00000099 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 >> SUCCESS >> 147 0.00000134 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 >> 148 0.00096052 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS >> 149 0.00000083 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 >> SUCCESS >> 150 0.00000128 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . >> 151 0.00000000 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 >> >> 3) Second try with VO, now succesful >> >> 0 0.13302574 Partner.DBG IRP_MJ_CREATE Serial3 SUCCESS Options: Open >> 1 0.00000185 Partner.DBG IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS >> InSize: 4096 OutSize: 4096 >> 2 0.00000267 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: >> TXABORT RXABORT TXCLEAR RXCLEAR >> 3 0.00000071 Partner.DBG IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS >> RI:-1 RM:500 RC:1000 WM:0 WC:1000 >> 4 0.00000076 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS >> 5 0.00000041 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 >> SUCCESS >> 6 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS >> 7 0.00000036 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS >> 8 0.00000066 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS >> 9 0.00000042 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 >> SUCCESS >> 10 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS >> 11 0.00000036 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS >> 12 0.05460763 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS >> Rate: 9600 >> 13 0.00230041 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS >> 14 0.00298118 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS >> 15 0.00000091 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 >> INVALID PARAMETER StopBits: 1.52 Parity: NONE WordLength: 8 >> 16 0.00000064 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS >> 17 0.00000072 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 >> SUCCESS >> 18 0.00000061 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS >> 19 0.00000060 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS >> 20 0.05416702 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS >> Rate: 9600 >> 21 0.00272547 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS >> 22 0.00297768 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS >> 23 0.00398864 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 >> SUCCESS StopBits: 1 Parity: NONE WordLength: 8 >> 24 0.00000109 Partner.DBG IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 >> ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 >> 25 0.00696641 Partner.DBG IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS >> Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 >> 26 0.00090581 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . >> 27 0.00092436 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: L >> 28 0.00093736 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 4: 0000 >> 29 0.00095309 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . >> 30 0.06796323 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . >> 31 0.00090810 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: A >> 32 0.00095601 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . >> 33 0.00093294 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . >> 34 0.00095755 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: N >> 35 0.00096111 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . >> 36 0.11092513 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . >> 37 0.00088118 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: A >> 38 0.00092209 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 >> 39 0.00054886 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 >> 40 0.00092590 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 >> 41 0.00093440 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 4 >> 42 0.00093624 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 >> 43 0.00093655 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 5 >> > >
From: DaveP on 27 Aug 2007 16:23 does the device talk in xon/xoff or dtr/dsr eithe way ..once u have handshaking for the right protocol..look for hi/low signals from the device davep "Henk Kortstra" <henk75(a)gmail.com> wrote in message news:1188197216.236746.326980(a)d55g2000hsg.googlegroups.com... > Hi All, > > I have a question about sending messages to a rs232 port. > I'm sending messagest to a device that gives me info about registered > persons. > The problem is, that I can't initialise the device from VO. > But after I used the demo app, VO also can read the device. > It is just like the demo app initialises the device, and after that VO > can als send/read from the device. > > I'm using portmon to track what kind of codes are send to the device, > but I can't see what I'm missing, or how I can solve (initialise) the > device with VO. > > Below this message I have put results from Portmon: > > 1) First try with VO, before the demo app has started. > The VO-app doens't work. > > 2) First try with the Demo App, what does work > > 3) Second try with VO, what now also does work > > I'm using the serial class. > The code i'm using is: > > oSer := Serial{} > IF ! oSer:Open("COM5",9600,"N",8,1) > ErrorBox{,"Promag:(1) cannot open COM5"}:show() > exit > Endif > > //LOGIN > oSer:Write(CHR(2)) > oSer:Write("L") > oSer:Write("0000") > oSer:Write(CHR(13)) > > dwDummy := Asc(oSer:Read(1)) > if dwDummy==0 > ErrorBox{self,"Login failed"}:show() > exit > endif > > Can anyone see, what I have to do, to initialise the device with VO, > so that the first try with VO also works, without using the demo-app > first? > > Regards > Henk Kortstra. > > 1) First try with VO: > > 0 0.13356838 Partner.DBG IRP_MJ_CREATE Serial3 SUCCESS Options: Open > 1 0.00000185 Partner.DBG IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS > InSize: 4096 OutSize: 4096 > 2 0.00000268 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT RXABORT TXCLEAR RXCLEAR > 3 0.00000071 Partner.DBG IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS > RI:-1 RM:500 RC:1000 WM:0 WC:1000 > 4 0.00000067 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 5 0.00000042 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 6 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 7 0.00000037 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 8 0.00000065 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 9 0.00000045 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 10 0.00000038 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 11 0.00000037 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 12 0.05350680 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 13 0.00298947 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 14 0.00297631 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 15 0.00000078 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > INVALID PARAMETER StopBits: 1.52 Parity: NONE WordLength: 8 > 16 0.00000072 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 17 0.00000064 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 18 0.00000061 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 19 0.00000051 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 20 0.05447063 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 1200 > 21 0.00242558 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 22 0.00297565 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 23 0.00398295 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > SUCCESS StopBits: 1 Parity: NONE WordLength: 7 > 24 0.00000114 Partner.DBG IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 25 0.00696934 Partner.DBG IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 26 0.00091875 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 27 0.00093789 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: L > 28 0.00093976 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 4: 0000 > 29 0.00093980 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 30 1.50002063 Partner.DBG IRP_MJ_READ Serial3 TIMEOUT Length 0: > 31 0.00000414 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT RXABORT TXCLEAR RXCLEAR > 32 0.00270768 Partner.DBG IOCTL_SERIAL_CLR_DTR Serial3 SUCCESS > 33 0.00294357 Partner.DBG IOCTL_SERIAL_CLR_RTS Serial3 SUCCESS > 34 0.00000119 Partner.DBG IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS > 35 0.00000206 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT RXABORT TXCLEAR RXCLEAR > 36 0.03006611 Partner.DBG IRP_MJ_CLEANUP Serial3 SUCCESS > 37 0.08773053 Partner.DBG IRP_MJ_CLOSE Serial3 SUCCESS > > 2) First try with the demo-app: > > 0 0.13308018 MSR120.exe IRP_MJ_CREATE Serial3 SUCCESS Options: Open > 1 0.00000239 MSR120.exe IRP_MJ_FLUSH_BUFFERS Serial3 SUCCESS > 2 0.00000136 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 3 0.00000081 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 4 0.00000066 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 5 0.00000064 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 6 0.00000068 MSR120.exe IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS > RI:-1 RM:0 RC:0 WM:0 WC:0 > 7 0.00000064 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 8 0.00000060 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 9 0.00000057 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 10 0.00000053 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 11 0.00000063 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 12 0.00000058 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 13 0.00000056 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 14 0.00000052 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 15 0.05348187 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 16 0.00257213 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 17 0.00297741 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 18 0.00000075 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS > StopBits: 1 Parity: NONE WordLength: 7 > 19 0.00000087 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 20 0.00695588 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 21 0.00000148 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 22 0.00000054 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 23 0.00000051 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 24 0.00000046 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 25 0.05375837 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 26 0.00215867 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 27 0.00297495 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 28 0.00000070 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS > StopBits: 1 Parity: NONE WordLength: 7 > 29 0.00000083 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 30 0.00695350 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 31 0.00000078 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 32 0.00000081 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 33 0.00000060 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 34 0.00000057 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 35 0.05416480 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 36 0.00271702 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 37 0.00297862 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 38 0.00398937 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS > StopBits: 1 Parity: NONE WordLength: 8 > 39 0.00000124 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 40 0.00695856 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 41 0.00000100 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 42 0.00000066 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 43 0.00000059 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 44 0.00000060 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 45 0.00000102 MSR120.exe IOCTL_SERIAL_SET_WAIT_MASK Serial3 SUCCESS > Mask: RXCHAR RXFLAG TXEMPTY CTS DSR RLSD BRK RING > 46 0.00000037 MSR120.exe IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS > InSize: 1024 OutSize: 256 > 47 0.00000103 MSR120.exe IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT TXCLEAR > 48 0.00000082 MSR120.exe IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > RXABORT RXCLEAR > 49 0.00000039 MSR120.exe IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS > 50 0.00000034 MSR120.exe IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS > 51 0.00286683 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 52 0.00297183 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 53 0.00291440 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 54 0.00690560 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 55 0.00298020 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 56 0.00094354 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 57 0.00098412 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 58 0.00096501 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 59 0.00098642 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 60 0.00096843 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 61 0.00098604 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 62 0.00096879 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 63 0.00098561 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 64 0.00096857 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 65 0.00098422 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 66 0.00096828 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 67 0.00098851 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 68 0.00097018 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 69 0.00098516 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 70 0.00096742 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 71 0.00098716 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 72 0.00096774 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 73 0.00098673 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 74 0.00096929 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 75 0.00098290 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 76 0.00096711 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 77 0.00098835 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 78 0.00097126 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 79 0.00098652 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 80 0.00097014 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 81 0.00098546 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 82 0.00096915 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 83 0.00098654 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 84 0.00096919 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 85 0.00098689 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 86 0.00096960 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 87 0.00098720 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 88 0.00097034 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 89 0.00098509 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 90 0.00096888 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 91 0.00098498 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 92 0.00096786 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 93 0.00098678 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 94 0.00096822 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 95 0.00098731 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 96 0.00096981 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 97 0.00099082 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 98 0.00097378 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 99 0.00098137 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 100 0.00097086 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 101 0.00097074 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 102 0.00095348 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 103 0.00098126 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 104 0.00096880 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 105 0.00097121 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 106 0.00094678 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 107 0.00098237 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 108 0.00096766 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 109 0.00098791 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 110 0.00097027 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 111 0.00098557 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 112 0.00096850 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 113 0.00097090 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 114 0.00094687 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 115 0.00098532 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 116 0.00096972 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 117 0.00098683 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 118 0.00096923 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 119 0.00098165 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 120 0.00097080 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > 121 0.04099233 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 122 0.00000153 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 123 0.00000204 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . > 124 0.00090323 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 125 0.00000107 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 126 0.00000128 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: N > 127 0.00088289 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 128 0.00000077 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 129 0.00000124 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 130 0.00095234 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 131 0.00000097 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 132 0.00000127 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 133 0.00087157 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 134 0.00000082 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 135 0.00000126 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . > 136 0.11098306 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 137 0.00000276 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 138 0.00000202 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . > 139 0.00062712 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 140 0.00000083 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 141 0.00000138 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: N > 142 0.00093919 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 143 0.00000078 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 144 0.00000122 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 145 0.00094818 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 146 0.00000099 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 147 0.00000134 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 148 0.00096052 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > 149 0.00000083 MSR120.exe IOCTL_SERIAL_GET_COMMSTATUS Serial3 > SUCCESS > 150 0.00000128 MSR120.exe IRP_MJ_READ Serial3 SUCCESS Length 1: . > 151 0.00000000 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 > > 3) Second try with VO, now succesful > > 0 0.13302574 Partner.DBG IRP_MJ_CREATE Serial3 SUCCESS Options: Open > 1 0.00000185 Partner.DBG IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS > InSize: 4096 OutSize: 4096 > 2 0.00000267 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > TXABORT RXABORT TXCLEAR RXCLEAR > 3 0.00000071 Partner.DBG IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS > RI:-1 RM:500 RC:1000 WM:0 WC:1000 > 4 0.00000076 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 5 0.00000041 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 6 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 7 0.00000036 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 8 0.00000066 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 9 0.00000042 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 10 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 11 0.00000036 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 12 0.05460763 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 13 0.00230041 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 14 0.00298118 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 15 0.00000091 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > INVALID PARAMETER StopBits: 1.52 Parity: NONE WordLength: 8 > 16 0.00000064 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > 17 0.00000072 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > SUCCESS > 18 0.00000061 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > 19 0.00000060 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > 20 0.05416702 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > Rate: 9600 > 21 0.00272547 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > 22 0.00297768 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > 23 0.00398864 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > SUCCESS StopBits: 1 Parity: NONE WordLength: 8 > 24 0.00000109 Partner.DBG IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > 25 0.00696641 Partner.DBG IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > 26 0.00090581 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 27 0.00092436 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: L > 28 0.00093736 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 4: 0000 > 29 0.00095309 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 30 0.06796323 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . > 31 0.00090810 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: A > 32 0.00095601 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . > 33 0.00093294 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 34 0.00095755 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: N > 35 0.00096111 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > 36 0.11092513 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: . > 37 0.00088118 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: A > 38 0.00092209 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 39 0.00054886 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 40 0.00092590 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 41 0.00093440 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 4 > 42 0.00093624 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 0 > 43 0.00093655 Partner.DBG IRP_MJ_READ Serial3 SUCCESS Length 1: 5 >
From: Henk Kortstra on 28 Aug 2007 02:54 If I compare the startup with VO the first time (that fails) and the last time (that succees after having started the demo-app), the differences are: IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_GET_BAUD_RATE: Retrieve Baud Rate) first try is B0 04 00 00 (1200) second try is 80 25 00 00 (9600) IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_GET_LINE_CONTROL: Retrieve line control) first try is 00 00 07 second try is 00 00 08 this repeats a couple of times. But after that there is also a differense IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_SET_BAUD_RATE: Set baud rate) also a difference with 1200 / 9600 So in my opinion it looks like that the device doesn't accept commands from my Vo app. After starting the demo-app it does, just like some 'trigger' has been set. In the demo-app output (from the serial port monitor) I also see a line: IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_WAIT_ON_MASK: Wait for event) I don't see such a line (wait for event) in the VO-output, but I don't know if this is important for the working of the device... You can view the output in the following files: 1. Try with VO before the demo app (fail): http://spreadsheets.google.com/pub?key=p-03AzJrAm0tL0AwuPVQ9PQ 2. Try with the demo app (success): http://spreadsheets.google.com/pub?key=p-03AzJrAm0tksbV-YITnUQ 3. Try with VO after the demo app (success): http://spreadsheets.google.com/pub?key=p-03AzJrAm0ujJJdQ7BycCA Hopefully this info gives a clue what te problem is, because I can't see what's going on unfortionally... If you want to see other output with the serial monitor, just let it know, and I will publish it here. Thank you for your time. Henk. On 27 aug, 22:08, "Graham McKechnie" <gmknos...(a)bigpond.net.au> wrote: > You'll find this one even betterhttp://www.serial-port-monitor.com/index.html > Graham > > "Dave Francis" <dave.is.a.spam.free.z...(a)suilven.com> wrote in message > > news:5jfpr5F3t9179U1(a)mid.individual.net... > > > Henk, > > > I have never used this but it is where I would start... > > >http://www.microsoft.com/technet/sysinternals/utilities/portmon.mspx > > > HTH > > > Dave Francis > > > "Henk Kortstra" <hen...(a)gmail.com> wrote in message > >news:1188197216.236746.326980(a)d55g2000hsg.googlegroups.com... > >> Hi All, > > >> I have a question about sending messages to a rs232 port. > >> I'm sending messagest to a device that gives me info about registered > >> persons. > >> The problem is, that I can't initialise the device from VO. > >> But after I used the demo app, VO also can read the device. > >> It is just like the demo app initialises the device, and after that VO > >> can als send/read from the device. > > >> I'm using portmon to track what kind of codes are send to the device, > >> but I can't see what I'm missing, or how I can solve (initialise) the > >> device with VO. > > >> Below this message I have put results from Portmon: > > >> 1) First try with VO, before the demo app has started. > >> The VO-app doens't work. > > >> 2) First try with the Demo App, what does work > > >> 3) Second try with VO, what now also does work > > >> I'm using the serial class. > >> The code i'm using is: > > >> oSer := Serial{} > >> IF ! oSer:Open("COM5",9600,"N",8,1) > >> ErrorBox{,"Promag:(1) cannot open COM5"}:show() > >> exit > >> Endif > > >> //LOGIN > >> oSer:Write(CHR(2)) > >> oSer:Write("L") > >> oSer:Write("0000") > >> oSer:Write(CHR(13)) > > >> dwDummy := Asc(oSer:Read(1)) > >> if dwDummy==0 > >> ErrorBox{self,"Login failed"}:show() > >> exit > >> endif > > >> Can anyone see, what I have to do, to initialise the device with VO, > >> so that the first try with VO also works, without using the demo-app > >> first? > > >> Regards > >> Henk Kortstra. > > >> 1) First try with VO: > > >> 0 0.13356838 Partner.DBG IRP_MJ_CREATE Serial3 SUCCESS Options: Open > >> 1 0.00000185 Partner.DBG IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS > >> InSize: 4096 OutSize: 4096 > >> 2 0.00000268 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > >> TXABORT RXABORT TXCLEAR RXCLEAR > >> 3 0.00000071 Partner.DBG IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS > >> RI:-1 RM:500 RC:1000 WM:0 WC:1000 > >> 4 0.00000067 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > >> 5 0.00000042 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > >> SUCCESS > >> 6 0.00000039 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > >> 7 0.00000037 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > >> 8 0.00000065 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > >> 9 0.00000045 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > >> SUCCESS > >> 10 0.00000038 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > >> 11 0.00000037 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > >> 12 0.05350680 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > >> Rate: 9600 > >> 13 0.00298947 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > >> 14 0.00297631 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > >> 15 0.00000078 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > >> INVALID PARAMETER StopBits: 1.52 Parity: NONE WordLength: 8 > >> 16 0.00000072 Partner.DBG IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > >> 17 0.00000064 Partner.DBG IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > >> SUCCESS > >> 18 0.00000061 Partner.DBG IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > >> 19 0.00000051 Partner.DBG IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > >> 20 0.05447063 Partner.DBG IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > >> Rate: 1200 > >> 21 0.00242558 Partner.DBG IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > >> 22 0.00297565 Partner.DBG IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > >> 23 0.00398295 Partner.DBG IOCTL_SERIAL_SET_LINE_CONTROL Serial3 > >> SUCCESS StopBits: 1 Parity: NONE WordLength: 7 > >> 24 0.00000114 Partner.DBG IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > >> ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > >> 25 0.00696934 Partner.DBG IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > >> Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > >> 26 0.00091875 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > >> 27 0.00093789 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: L > >> 28 0.00093976 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 4: 0000 > >> 29 0.00093980 Partner.DBG IRP_MJ_WRITE Serial3 SUCCESS Length 1: . > >> 30 1.50002063 Partner.DBG IRP_MJ_READ Serial3 TIMEOUT Length 0: > >> 31 0.00000414 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > >> TXABORT RXABORT TXCLEAR RXCLEAR > >> 32 0.00270768 Partner.DBG IOCTL_SERIAL_CLR_DTR Serial3 SUCCESS > >> 33 0.00294357 Partner.DBG IOCTL_SERIAL_CLR_RTS Serial3 SUCCESS > >> 34 0.00000119 Partner.DBG IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS > >> 35 0.00000206 Partner.DBG IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > >> TXABORT RXABORT TXCLEAR RXCLEAR > >> 36 0.03006611 Partner.DBG IRP_MJ_CLEANUP Serial3 SUCCESS > >> 37 0.08773053 Partner.DBG IRP_MJ_CLOSE Serial3 SUCCESS > > >> 2) First try with the demo-app: > > >> 0 0.13308018 MSR120.exe IRP_MJ_CREATE Serial3 SUCCESS Options: Open > >> 1 0.00000239 MSR120.exe IRP_MJ_FLUSH_BUFFERS Serial3 SUCCESS > >> 2 0.00000136 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > >> 3 0.00000081 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > >> SUCCESS > >> 4 0.00000066 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > >> 5 0.00000064 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > >> 6 0.00000068 MSR120.exe IOCTL_SERIAL_SET_TIMEOUTS Serial3 SUCCESS > >> RI:-1 RM:0 RC:0 WM:0 WC:0 > >> 7 0.00000064 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > >> 8 0.00000060 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > >> SUCCESS > >> 9 0.00000057 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > >> 10 0.00000053 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > >> 11 0.00000063 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > >> 12 0.00000058 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > >> SUCCESS > >> 13 0.00000056 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > >> 14 0.00000052 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > >> 15 0.05348187 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > >> Rate: 9600 > >> 16 0.00257213 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > >> 17 0.00297741 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > >> 18 0.00000075 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS > >> StopBits: 1 Parity: NONE WordLength: 7 > >> 19 0.00000087 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > >> ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > >> 20 0.00695588 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > >> Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > >> 21 0.00000148 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > >> 22 0.00000054 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > >> SUCCESS > >> 23 0.00000051 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > >> 24 0.00000046 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > >> 25 0.05375837 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > >> Rate: 9600 > >> 26 0.00215867 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > >> 27 0.00297495 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > >> 28 0.00000070 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS > >> StopBits: 1 Parity: NONE WordLength: 7 > >> 29 0.00000083 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > >> ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > >> 30 0.00695350 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > >> Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > >> 31 0.00000078 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > >> 32 0.00000081 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > >> SUCCESS > >> 33 0.00000060 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > >> 34 0.00000057 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > >> 35 0.05416480 MSR120.exe IOCTL_SERIAL_SET_BAUD_RATE Serial3 SUCCESS > >> Rate: 9600 > >> 36 0.00271702 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > >> 37 0.00297862 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > >> 38 0.00398937 MSR120.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial3 SUCCESS > >> StopBits: 1 Parity: NONE WordLength: 8 > >> 39 0.00000124 MSR120.exe IOCTL_SERIAL_SET_CHAR Serial3 SUCCESS EOF:0 > >> ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 > >> 40 0.00695856 MSR120.exe IOCTL_SERIAL_SET_HANDFLOW Serial3 SUCCESS > >> Shake:1 Replace:40 XonLimit:2048 XoffLimit:512 > >> 41 0.00000100 MSR120.exe IOCTL_SERIAL_GET_BAUD_RATE Serial3 SUCCESS > >> 42 0.00000066 MSR120.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial3 > >> SUCCESS > >> 43 0.00000059 MSR120.exe IOCTL_SERIAL_GET_CHARS Serial3 SUCCESS > >> 44 0.00000060 MSR120.exe IOCTL_SERIAL_GET_HANDFLOW Serial3 SUCCESS > >> 45 0.00000102 MSR120.exe IOCTL_SERIAL_SET_WAIT_MASK Serial3 SUCCESS > >> Mask: RXCHAR RXFLAG TXEMPTY CTS DSR RLSD BRK RING > >> 46 0.00000037 MSR120.exe IOCTL_SERIAL_SET_QUEUE_SIZE Serial3 SUCCESS > >> InSize: 1024 OutSize: 256 > >> 47 0.00000103 MSR120.exe IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > >> TXABORT TXCLEAR > >> 48 0.00000082 MSR120.exe IOCTL_SERIAL_PURGE Serial3 SUCCESS Purge: > >> RXABORT RXCLEAR > >> 49 0.00000039 MSR120.exe IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS > >> 50 0.00000034 MSR120.exe IOCTL_SERIAL_SET_BREAK_OFF Serial3 SUCCESS > >> 51 0.00286683 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > >> 52 0.00297183 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > >> 53 0.00291440 MSR120.exe IOCTL_SERIAL_SET_RTS Serial3 SUCCESS > >> 54 0.00690560 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > >> 55 0.00298020 MSR120.exe IOCTL_SERIAL_SET_DTR Serial3 SUCCESS > >> 56 0.00094354 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > >> 57 0.00098412 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > >> 58 0.00096501 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > >> 59 0.00098642 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 SUCCESS > >> 60 0.00096843 MSR120.exe IRP_MJ_WRITE Serial3 SUCCESS Length 3: .O. > >> 61 0.00098604 MSR120.exe IOCTL_SERIAL_WAIT_ON_MASK Serial3 > > ... > > meer lezen ยป
From: Henk Kortstra on 28 Aug 2007 08:57 Ginny, I didn't had the EnableEvents method called. If I put the line: oSer:EnableEvents(EV_RXCHAR) before my first attempt to write to the device, this returns True. Unfortionally there is no difference in the reaction of the device after this... It did however remind me of another problem with a serial connection, where I first opened it with stopbits 0, flushed it en closed it. Then opening with te normal and it worked. I've tried this also with the current device and it seems to work! So now, I'm initializing: --- oSer:Open("COM5",9600,"N",8,0) oSer:DisableEvents() oSer:Flush() oSer:Close() IF ! oSer:Open("COM5",9600,"N",8,1) ErrorBox{,"Promag:(1) cannot open COM5"}:show() exit Endif oSer:SetProtocol() oSer:EnableEvents(EV_RXCHAR) --- And this works! Thanks all for your info, without it I didn't had found this solution. Henk. On 28 aug, 13:34, "Ginny Caughey" <ginny.caughey.onl...(a)wasteworks.com> wrote: > Henk, > > Are you calling EnableEvents and then waiting for the event that indicates > that there is data present to read before calling Read? > > -- > Ginny > > "Henk Kortstra" <hen...(a)gmail.com> wrote in message > > news:1188299900.990613.106230(a)57g2000hsv.googlegroups.com... > > > Thanks for your suggestion. > > > I've debugged the open-method from the Serial class. > > The following lines are being processed: > > > --- > > > IF !self:GetProtocol() > > BREAK > > ENDIF > > self:Baud := 9600 > > self:Parity := "N" > > self:ByteSize := 8 > > self:StopBits := 1 > > > IF !self:SetProtocol() > > BREAK > > ENDIF > > > --- > > > After the last line (SetProtocol) the open method is breaking, so the > > SetProtocol Failes > > It seems to fail with errorcode 87, does somebody knows what that > > means? > > > It is assumable that this is also the cause that my device is not > > working. > > Assuming that after running the demo-app, the speed / parity / etc is > > set correct by the demo-app. > > > Any suggestions how I can find out what causes the not executing > > SetProtocol? > > > Henk.
From: Alessandro Antonangeli on 28 Aug 2007 07:06 Cannot be a speed problem? I dont know what Ser:Open does, but may be that the port has to be open at 1200 and then set speed at 9600 Ciao Alessandro
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: New xHarbour Builder demo Next: Error 5333 Using bBrowser and AdoServer |