Code Comments
Programming Forum and web based access to our favorite programming groups.Hello, I have a scientific machines that either outputs the results to a dot matrix printer or to the computer screen. I would like to capture the data to a fil e instead of having it appear on the screen. How do I monitor the LPT1 port an d write the incoming information to a file. Thank you, Brandon Campbell -- -------------------------------------------- Database Administrator bkc5 AT CDC dot GOV
Post Follow-up to this messageHi, This is a non-trivial problem. The printer port on a PC is designed to be used for output, not input. Some printer ports support bi-directional operation, but you still would need to emulate the handshaking that is done by a printer, after placing the port into a mode where it can be used for input. You also would have to wire up a non-standard cable to handle the job. None of this is impossible, just not straight forward. I'd suggest that you might get a copy of Jan Axelson's book, Parallel Port Complete (I have a link to it on my homepage) for the details that would be involve. She also has information on her web site about bi-directional parallel port IO, but I doubt that there really is enough detail for you to proceed from that alone. A much easier solution would be to purchase a parallel to serial adapter (www.bb-elec.com), and using MSComm (and some code) to write the data to a file. The adapter would handle the handshaking problems for you, and all that you would have to do is to deal with the serial data. Dick -- Richard Grier (Microsoft Visual Basic MVP) See www.hardandsoftware.net for contact information. Author of Visual Basic Programmer's Guide to Serial Communications, 4th Edition ISBN 1-890422-28-2 (391 pages) published July 2004.
Post Follow-up to this messageBrandon Campbell wrote: > > Hello, > > I have a scientific machines that either outputs the results to a dot matr ix > printer or to the computer screen. I would like to capture the data to a f ile > instead of having it appear on the screen. How do I monitor the LPT1 port and > write the incoming information to a file. > How do you get the data to the screen? I'm assuming there must be a program to do so? If so can you simply start it with redirection? IE, what does c:> yourmonitorproggiename >datafile.dat do?
Post Follow-up to this messageLet me understand this. This scientific machine send its data to a printer or to a screen. You mention "computer" screen. Are you refering to the screen on a seperate computer or on the scientific machine it self. If it is on a seperate computer, how does the scientific machine get its data to the computer? Regardless if the screen is on the machine itself or not, Dick has given you the best answer. Get the parallel to serial convertor, and hook that up to the serial port of the PC. I had to do this years back, but the signal did not originate from a parallel port, rather from a mainframe connection, coax something or other. We got a convertor that converted the mainframe signal to serial, connected to the serial port, used MSCOMM and it worked beautifully. Good luck! Saga "Brandon Campbell" <BrandonCampbell@discussions.microsoft.com> wrote in message news:5AF9F597-D0F6-4BDE-AAF5-208DA26090C6@microsoft.com... > Hello, > > I have a scientific machines that either outputs the results to a dot matrix > printer or to the computer screen. I would like to capture the data to a file > instead of having it appear on the screen. How do I monitor the LPT1 port and > write the incoming information to a file. > > Thank you, > > Brandon Campbell > -- > -------------------------------------------- > Database Administrator > bkc5 AT CDC dot GOV
Post Follow-up to this messageSaga wrote: > > Let me understand this. This scientific machine send its data to > a printer or to a screen. You mention "computer" screen. Are > you refering to the screen on a seperate computer or on the > scientific machine it self. > > If it is on a seperate computer, how does the scientific machine > get its data to the computer? ...Good point--I was assuming that he meant that somehow he could get the output to the PC screen--but on reflection, that's probably <not> the case--in that case, I also agree w/ the parallel-serial converter. Black Box is one source I've used in the past successfully, although they do tend to be pricey.
Post Follow-up to this messageI second the recommendation with Black Box, that's where we bought the converter I mentioned earlier. I also remembered <g> it was a 3270 protocol to RS232 converter. Saga "Duane Bozarth" <dp_bozarth@swko.dot.net> wrote in message news:415876B9.A2460B0E@swko.dot.net... > Saga wrote: > > ...Good point--I was assuming that he meant that somehow he could get > the output to the PC screen--but on reflection, that's probably <not> > the case--in that case, I also agree w/ the parallel-serial converter. > Black Box is one source I've used in the past successfully, although > they do tend to be pricey.
Post Follow-up to this messageSaga, I am currently getting more information from the lab. I only know that the laboratorians unplug the machine from the computer and plug it into a dot matrix printer. It definately suggests that the machine has already decoded the information and using the computer and the printer as an output devices. I would think that the parallel to serial converter would be a good step, bu t I am not sure if the lab is willing to go that far. Currently, they are use MS Dos 6 as the OS. I would like them to update their computer to a 2000 box . Thank you for your suggestions. "Saga" wrote: > > I second the recommendation with Black Box, that's where we bought the > converter I mentioned earlier. I also remembered <g> it was a 3270 > protocol > to RS232 converter. > > Saga > > "Duane Bozarth" <dp_bozarth@swko.dot.net> wrote in message > news:415876B9.A2460B0E@swko.dot.net... > > >
Post Follow-up to this message> I only know that the > laboratorians unplug the machine from the computer and plug it into a dot > matrix printer so... it outputs some data to the computer's *screen* while plugged into the computer, and some further data to the dot matrix printer while plugged into that; and you want it to output *all* the data to a file, while still plugge d into the computer? Is that the case?
Post Follow-up to this messageBonj, From what I understand from the scientists, it is a one shot deal. Either they output the results to the computer, or they are output to the printer. As you may guess, the the printer wins 99.9 percent of the time. The output to the computer is only displayed on the screen. I would like to capture the incoming buffer to a file. In either case, the results have to be typed into another computer for the results to be used thus introducing human error. Thank you for your suggestions. Brandon "Bonj" wrote: > > so... it outputs some data to the computer's *screen* while plugged into t he > computer, and some further data to the dot matrix printer while plugged in to > that; and you want it to output *all* the data to a file, while still plug ged > into the computer? > Is that the case? >
Post Follow-up to this messageAh, OK. I'd probably go with what Dick Grier says then "Brandon Campbell" wrote: > Bonj, > > From what I understand from the scientists, it is a one shot deal. Either > they output the results to the computer, or they are output to the printer . > As you may guess, the the printer wins 99.9 percent of the time. The outpu t > to the computer is only displayed on the screen. I would like to capture t he > incoming buffer to a file. In either case, the results have to be typed in to > another computer for the results to be used thus introducing human error. > > Thank you for your suggestions. > > Brandon > > > > "Bonj" wrote: >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.