キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

serial communication missing bytes

hello everyone,

i am trying to communicate serially with a tester at 9600 baud, flow control xon-xoff. I am using duplicate visa session to use the same port to read and write simultaneously. when i use the vi on two diffeerent computers or if i do a loopback on the same computer, i am getting all the bytes, but when i try to communicate with the tester i miss out on some bytes.

i am using bytes at port and visa read inside a while loop.

 

I tried using hyper terminal and there i didnt miss even a single byte, but in labview its very unpredictable, at times i receive all the bytes and at other instances the data received appears meaningless due to loss of bytes here and there

Suggestions please.

Thanks

0 件の賞賛
メッセージ1/62
3,938件の閲覧回数

Hi buddy,

               First of all you are using serial communication so reading and writing simultanously is not a good idea. In the loopback you are first writing then only you are reading.

 

As you says that you are VISA read and byte at port inside while loop. It may possible that this is posing problem.

 

Post your VI. it will be good to debug then.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 件の賞賛
メッセージ2/62
3,926件の閲覧回数

Hi,

     

     Whould you mind to post snapshot of your block diagram?? So that we can analyse what might be wrong.

 

 

 

Thanking you,
Sushmith
0 件の賞賛
メッセージ3/62
3,925件の閲覧回数

Thanks Ranjeet and sushmith for your prompt response.

I am attaching a snapshot of my read sequence below.

Thanks

0 件の賞賛
メッセージ4/62
3,916件の閲覧回数

What is your requirment. Tell me what you want to implement ? I will  try to do that in simple manner.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 件の賞賛
メッセージ5/62
3,904件の閲覧回数

One more thing, You are repeating the while loop in the delay of 2 ms. Dont you think this is very less time.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 件の賞賛
メッセージ6/62
3,902件の閲覧回数

I have a really old tester that replies to the commands sent to it from the pc. each charachter that is written to it is echoed back and thus i had to use duplicate visa session so that both the write and read operations could be done simultaneously. and all this needs to be displayed on the screen.

0 件の賞賛
メッセージ7/62
3,898件の閲覧回数

See after you write command to the tester then it will take some time to respond. If it is echoed back also it will take some time to respond then why simultanously ? 

 

 

You dont need simultanously because once it is written into buffer untill it is written again or read it will be there.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 件の賞賛
メッセージ8/62
3,892件の閲覧回数

there are times when the tester is sending data continuously and in order to stop it from sending more i am required to send a few characters to it to signal it to stop

0 件の賞賛
メッセージ9/62
3,890件の閲覧回数

Continously i.e. there will be some interval right ?

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 件の賞賛
メッセージ10/62
3,887件の閲覧回数