Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending strings at a slower rate?

Status
Not open for further replies.

ttorimoto

Programmer
Nov 6, 2002
3
US
i've been trying to get ProComm (4.7 for Windows) to output strings (commands, in my case) out the COMM port, but at a slower rate than the baud rate.

The baud rate is at 115.2k, but the receiving end uses polling to check its serial port, so a full-speed transmission of strings/text from ProComm would make it MISS characters. I need to be able to do a "mspause" between each character, for each string command sent out.

Every method I have tried makes ProComm send out 2 characters at a time (2 characters between a visible "pause" of transmission), causing the receiving end to miss a character every so often.

Why is this happenning?

Could someone give me an ASPECT script (with pre-defined strings of text for commands) that will send out those strings in a "slower" rate via a function that will use a pause (i.e. "mspause") between each character? All my attempts have failed... somehow causing a pause between every TWO characters (even if the mspause is set to something very high like 2000, it's visible that ProComm somehow sends out 2 characters before every pause).

thanks.

 
here are few methods i had tried; each one sends out 2 chars at a time, between pauses... i dont know why..
--------------
for Num = 0 upto Len
substr sendChar sendStr Num 1
mspause 50
transmit sendChar
endfor
--------------
for Pos = 0 upto Len
strread sendStr Pos sendChar 1
mspause 50
comwrite sendChar
endfor
--------------
while Chr != 0
strgetc sendStr Pos Chr
strputc sendChar 0 Chr
Pos++
mspause 50
comwrite sendChar
endwhile
--------------
 
nevermind...

"set txpace" was the answer... :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top