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!

com 1 communication at 1200 baud

Status
Not open for further replies.

Bluefield

Programmer
Jan 19, 2001
1
US
I am trying to upgrade an EXTREMELY old version of a communications program that runs an even older cnc machine. the problem is i can not make qbasic communicate with the cnc machine at 1200 baud. the original program is written in Basica, i am able to make all the other aspects of the program work but for some reason it wont communicate.

....... is this just a standard with qbasic not working at 2400.

thanxs
ron
 
Below is a code snippet that sends some hex data to COM 2 at 1200 baud:

OPEN "com2:1200,n,8,1,cd0,cs0,ds0,op0,rs,tb512,rb512" FOR RANDOM AS #2 LEN = 512
DATA FF,CE,10,00,1F,2E,20,FC,A6,2F,1F,2E,20,FC,E6,2F,18,8F,C6,64,18,A6,00
DATA 1F,2E,80,FC,A7,2F,18,08,5A,26,F2,20,E0
FOR x% = 1 TO 36
READ a$
PRINT #2, CHR$(VAL("&H" + a$));
NEXT



Kim_Christensen@telus.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top