Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Serial Port reading
Message
From
25/07/2007 10:09:49
Aldrich Arendsz
Gamma Research Inc.
Aruba
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Serial Port reading
Miscellaneous
Thread ID:
01243477
Message ID:
01243477
Views:
77
Dear All,

I want to read from a communications port of a Nortel Networks ACD (automatic call distribution) Module, which now is being read by ProComm V4.8 1999 build 71 and has the following settings:

Default installation no changes done after installation
Transport protocol ZMODEM
Transmit method STREAMING
Error detection 32 bit CRC
Terminal type VT 100
Enquiry type CIS B+
Directly connected to COM1
Settings 9600 None 8 1 (no flow control)

I am using the MSComm control (MSCOMM32.OCX) in my aplication with the following parameters: 9600,N,8,1 but I'll get "garbage" as a string.

The code for the com port reading is as follows:
	.oSerialPort = NEWOBJECT("mscommlib.mscomm.1")
	*
	WITH .oSerialPort
		.settings = TRANSFORM(comport.cobaudrate)+ ;
					","+LEFT(comport.coparity,1)+ ;
					","+TRANSFORM(comport.codatabits)+;
					","+TRANSFORM(comport.costopbits)
		.Commport = VAL(SUBSTR(comport.cocomport,4,1))
		.HandShaking = 0
		.DTREnable = .T.
		.InBufferSize = 8000
		.InPutLen = 0
		.InPutMode = 0
		.OutBufferSize = 512
		.RTSEnable = .T.
		.RThreshold = 0
		.SThreshold = 0
		.PortOpen=.T.
		THIS.portopen = .portopen()
	ENDWITH
Are those settings correct to emulate the above mention program (ProComm) or do I have to use something else for the com port reading?

Please advise.

Best Regards,

Aldrich Arendsz
Next
Reply
Map
View

Click here to load this message in the networking platform