LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about slow rs232 equipment

I tried the examples for rs232 communication, it works fine.
but my equipment is slow and needs delay between each character.
i didnt find any input to Visa write or other control which enables me
to do this.

can someone tell me how to do this?
again: to make a delay (inter digit pause) between each character send.

thanks in advance
0 Kudos
Message 1 of 8
(3,116 Views)
It's quite easy. You split the string you want to send into an array of characters, and then using a for-loop write each character one at a time, followed by a small wait (whatever your instrument requires).

Regards

Shane
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 2 of 8
(3,116 Views)
Normally there should not be the need to have a delay between the characters. Are you sure you configured your baudrate correct?
0 Kudos
Message 3 of 8
(3,116 Views)
I've come across equipment where a certain command needed delays between characters in order to be recognised, because its microcontroller was too busy doing something else... Admittedly this was a product of the company I worked for at the time and was somewhat funky, but many commercial instruments have been known to show funky behaviour!
0 Kudos
Message 4 of 8
(3,116 Views)
If there is no receive buffer for the Serial controller, i might happen. But I thought there is a recieve buffer for every Rs232 controller , but who knows.....
0 Kudos
Message 5 of 8
(3,116 Views)
If the microcontroller doesn't have a stand-alone async serial port, it's necessary to bit-bang data in and out. When doing that there's no inherent buffering - the microcontroller has to be programmed to sample (and usually oversample) the incoming data stream to reconstruct the bits into a byte, which can then be stored. If the microcontroller has to accomplish other tasks too, and it doesn't have enough horsepower, or the programmer wasn't skilled at making it perform multiple tasks, characters can be lost. Most current microcontrollers make this so much easier!

Bob
0 Kudos
Message 6 of 8
(3,116 Views)
A PIC for instance does not have a FIFO for its standard serial port module. You get a byte in a register and if you are not fast enough before the next byte is ready things might go wrong. Of course writing the PIC formware in such a way that it can always deal with the maximum input rate (for instance 9600 baud => ~1ms per byte) is the real art here.
Also you can consider handshaking too, although the PIC module does not have this automatically.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 7 of 8
(3,116 Views)
I have had the same problem. Here's the VI I use to add a delay between characters.
0 Kudos
Message 8 of 8
(3,116 Views)