Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

serial write sometimes missing characters

Hi All,

I am communicating using a USB serial port device, to a microcontroller. The micro echoes back what it is sent.

Using hyperterminal/putty I can reliably use the serial port (100% success echo back, so I know the micro is working ok), but with LabVIEW VISA routines, a lot of the time it seems to not send all the characters (it randomly drops characters).  I have narrowed it down to the Tx as it is not echoing back all the characters, and also the control string is not having the desired affect on the micro (As mentioned, this is 100% reliable in hyperterminal).

I have been over all the standard stuff many times (checking baud rates, termination characters, etc etc etc), I dont think I am making any fundamental errors. If I open the Basic Serial Write and Read example in LV I see the same behaviour that my application is doing, so I am really confused now.

Does any one know what could be wrong??

Also, I am trying to find a set of serial port drivers I came accross once before. They use a DLL and not the VISA routines (and are useful if an application does not want VISA to be installed), I want to see if this makes any difference. I cannot find them anywhere! I think they were from a German website.

Many thanks!
nrp
0 Kudos
Message 1 of 4
(4,014 Views)

Hi nrp,

When you send with Hyperterminal do you type in characters or send data from a file ?

Typing is of cource much slower then sending data with LV

Sending ascii data from a file depends on settings in Hyperterminal how fast it goes.

Another thing what data do you send all ascii characters or all possible bytes ? If you do the last you have to sure that you disable the termination character option. Otherwise it will stop at the TC

Dropping characters can happen every where in the link. Are you sure it happens during Tx part in LV ?

Message 2 of 4
(4,005 Views)
K C,

From hyperterminal I type the characters in manually, and terminate it by pressing enter.

Which is as you say is of course much slower than when I just use the VISA write command to send the whole string at once!!!
</runs away to test putting delay in between each character).

It works, thanks KC! Three hours of head scratching last night has been solved in ten minutes this morning!
(And I was blaming it on the drivers.......)

Smiley Very Happy
0 Kudos
Message 3 of 4
(4,002 Views)

Glad to see it's solved.

 

0 Kudos
Message 4 of 4
(3,997 Views)