|
-
Nov 28th, 1999, 05:19 PM
#1
Thread Starter
Frenzied Member
Is it possible to read from a serial port like reading a file?
If so, How?
I would normally use
strTemp = space(LOF(Filenum))
get filenum,,strtemp
to read in one 'gulp' but LOF doesn't seem to work on com1.
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
-
Nov 30th, 1999, 09:23 PM
#2
Hyperactive Member
what you need is the mscomm component add one in your form and add the following code
dim data_in as any
MSComm1.CommPort = 1 ' We will be using Com1 as the default com port.
MSComm2.PortOpen = True ' Open the port for use.
data_in = MSComm2.Input
-
Nov 30th, 1999, 09:24 PM
#3
Hyperactive Member
sorry they should all have been Mscomm1 (if that is the object added)
Any more help please do not hesitate to contact me
[email protected]
Co Galway
Ireland
-
Nov 30th, 1999, 09:32 PM
#4
Thread Starter
Frenzied Member
Thanks for your reply but that's what I'm using at the moment. I wanted a 'lower level'
method!
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
-
Dec 1st, 1999, 04:43 AM
#5
-
Dec 1st, 1999, 06:37 AM
#6
Hyperactive Member
To outut to a port or input from a port using the stuff in the above post, you need to find a program called inpout.zip or inpout16.zip or inpout32.zip at http://www.lvr.com/parport.htm
This works for the parallel port, but should also work for the serial if you have the right port address. The specifics of how to do it are in the zip and on the page. Good luck,
bob
-
Dec 1st, 1999, 07:06 PM
#7
Thread Starter
Frenzied Member
Thanks for your suggestions Bob and razzaj.
I haven't had time to look into them yet though!
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|