Hello to everyone,
i'm experiencing a strange problem with RS232.
I'm developing with Micro2442 + SDK, Microsoft Visual studio 2008, win CE
6.0, framework 3.5
I build a software for these hardware and i fit in 7 /8 pieces to test
with our machines.
I have an IO.exception when i'm trying to OPEN / CLOSE the COM3 on the
device.
The strange thing is that occurs only on 2 /3 out of 7 /8 pieces mounted.
The other strange thing is that the device works for few startup and then
stuck with this error. And the only street to bring back it to work is
reload image of OS. Then it'll work for other few times and stop.
The other samples are currently working with same soft. version.
Initially i just have the error on third line
COM1.open()
COM2.open()
COM3.open() *** IO.exception
It neer change even if i open only 3, just 1 and 3 or 2 and 3. It always
gives error on 3.
I tried to replace with below code, nothing change...
Any suggestions?
Thank you
********** CODE
'COM 1 per comunicazione con PL30
Try
If PL30Com.IsOpen Then PL30Com.Close()
PL30Com.PortName = "COM1"
PL30Com.BaudRate = 9600
If Not PL30Com.IsOpen Then PL30Com.Open()
Catch ex As Exception
MsgBox("Seriale 1 - " + ex.Message)
End Try
System.Threading.Thread.Sleep(200)
'COM 2 per comunicazione STAT o dati
'Try
' If StatCom.IsOpen Then StatCom.Close()
' StatCom.PortName = "COM2"
' StatCom.BaudRate = 9600
' If Not StatCom.IsOpen Then StatCom.Open() *** !!! ERROR LINE
!!!! ****
'Catch ex As Exception
' MsgBox("Seriale 2 - " + ex.Message)
'End Try
'System.Threading.Thread.Sleep(200)
'COM 3 per comunicazione con stampante
Try
If SecondCom.IsOpen Then SecondCom.Close()
SecondCom.PortName = "COM2"
SecondCom.BaudRate = 2400
If Not SecondCom.IsOpen Then SecondCom.Open()
Catch ex As Exception
MsgBox("Seriale 2 - " + ex.Message)
End Try
System.Threading.Thread.Sleep(200)
***** /CODE

