Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comm Port access
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Comm Port access
Miscellaneous
Thread ID:
00231862
Message ID:
00231862
Views:
52
I need to access a black box thru the pc serial port comm1. the data is ascII. I have created a comm object and the property o.portopen does equal true. Problem is I can not create a handshake or transmit or recieve to a buffer. I thought I could use fopen(), but the handle comes back -1.
Any ideas?, here is the code to access the port. After that ?
PUBLIC ComPort
ComPort = CREATEOBJECT('Form')
ComPort.AddObject("Usecom","Olecontrol","MSCOMMLib.MSComm")
ComPort.USecom.CommPort = 1 && Use Comm1, The first Serial Port.

* Comm Port settings 9600 baud, Even Parity,7 data Bits, 1 Stop Bit
ComPort.USecom.Settings = This.pBaudRate+','+This.pParity+','+This.pDataBits+','+This.pStopBits
ComPort.USecom.PortOpen = .T.
ComPort.USecom.Output ="C:\SPS\PHOENIX.DAT"

Thanks, Chuck
Extreme Programming = Plan -> Design -> Code -> Test
Next
Reply
Map
View

Click here to load this message in the networking platform