Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting serial port data?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00056769
Message ID:
00056911
Views:
34
>>>I would like to capture some serial data from COM1 (continuous stream) into a text file as a part of a VFP program.
>>>
>>>Is there a straightforward way of doing this, short of buying a third party application?
>>>
>>>TIA
>>
>>Hi Micheal ,
>>
>>Take a look on the activeX from M$ (comm32)
>>But why the COM1 generaly it is for the mouse ???
>>
>>Hope this help
>>Rocky Boy...
>
>I cannot find any mention of comm32, either on the VFP5 CD, the VB4 CD, the Mickey$oft web site nor on the MSDN CD's. Any suggestions regarding where I might find it, and documentation?
>
>TIA

Hi Michael,
It's actually MSComm32.OCX, should have come with your VFP. You drop it onto a form, then set its properties to the values you want. In your case, you'll probably want to set the incoming buffer value pretty high.

I use this to work with data coming in continuously from up to 16 Radio Frequency links in a warehouse program. The data stream is stored in the incoming buffer, then read, re-stored in a form property and parsed. Data is sent back to each terminal as it's read, and the files are updated at the same time. Sounds similar to what you need, and it's working fine.

Don't forget that there is always an OCX-specific help available by right-clicking on the OCX on the form. That will help you understand the properties. Also some simple examples are listed on the MS Support area. Do a search on MSCOMM32.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform