LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -1073807253 by using 2 serial ports

Hello,
 
when I use 2 Com-Ports, I get "Error 1073807253 occured at VISA Read in XXX.vi Possible reason(s): VISA: (HEX 0xBFFF006B) A framing error occurred during transfer".
If I start --> stop the VI a few times, the program works fine but it is annoying to do this every time.
How can I solve that problem? In the attachment you can see the simpified VI. 
 
Win 2000
LV6.i
 
 
Regards ThomasD
 
 
 
0 Kudos
Message 1 of 14
(4,421 Views)

Not sure if this is related to your problem, but avoid reading the serial port with zero chars in : add a case structure (1, default) around the read operation.

Chilly Charly    (aka CC)
0 Kudos
Message 2 of 14
(4,399 Views)

Hello CC,

I don´t think, that the zero characters are the problem. I think, it is the problem that the beginning of the read in does not start at a defined value (start bit) but somewhere in the transfer. The question is how to get defined start conditions for the com ports.  

0 Kudos
Message 3 of 14
(4,384 Views)
Hi
 
I think what you need is VISA events, to trigger the com-ports. But I don't know if these are available in LV6i.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 4 of 14
(4,383 Views)
Hi!
   A framing error occurs when, (I'm not 100% shure...) the port controller detect some communication, but is unable to detect the byte (checksum failed, bit overlaps, and so on....).
   To get an accurate description,   http://digital.ni.com/public.nsf/allkb/13A20C0F9DF265FB86256FC60066D9C2

   This may occur mainly because you are "writing on the cable" at same time from the 2 ends.  This causes the bytes to be confused, and you get framing error (it happened to me...)
   
   It would be good to check for your cable too to be ok ....

   Let me know if this helps!!

   Have a nice day!

graziano
Message 5 of 14
(4,375 Views)
VISA event functions are available in LV6.i. I tried something with the "VISA Enable Event" but it did not work. Error -1073807322 ... the specified event type is not supported by the resouce. How do I have connect this VISA Events? Do you have an example?
0 Kudos
Message 6 of 14
(4,376 Views)

I used VISA events in two projects and in the beginning I also had such problems.

I'll search my source control for the vis according to this topic and post them as soon as possible. Or at least a picture of it (LV7.0 can't save the vis for LV6i).

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 7 of 14
(4,376 Views)
Ok - here is a vi I used to communicate with a 3rd party transport system.
Hope this helps.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Download All
0 Kudos
Message 8 of 14
(4,369 Views)

@ Thomas

Thank you!

 

@ Graziano

Yes, that´s the problem! when I first used one while-loop with one com-port the VI worked fine and there were no problems. Then, when I added the second while-loop and the second com-port (realized with a USB-->RS232 converter) the error occured.

I don´t no, if this will happen "This may occur mainly because you are "writing on the cable" at same time from the 2 ends.  This causes the bytes to be confused, and you get framing error (it happened to me...)" but how could this checked? The cable is ok.

0 Kudos
Message 9 of 14
(4,367 Views)
Just write 2 application; one for each PC. The first application sends bytes, the second application, at the other side, receive only.  So you won't get the risk to communicate simultaneously over RS232 by 2 PC!

let me know....

graziano
0 Kudos
Message 10 of 14
(4,359 Views)