07-27-2009 05:14 AM
Hello,
There exists a control system which prints out information to a printer (IBM LA75 PLUS COMPANION PRINTER). The printing mechanism is faulty and I have to receive the ASCII stream of data in a file instead of sending it to the printer.
I have gotten information from the printer data sheets like baud rate: 1200, data bits: 8 and parity: none. The printer cable is parallel date cable BC-19M-10.
I tried configuring the port using examples in port.vi and out port.vi and met a brickwall that those two VIs are not supported in windows vista, which I currently use.
Is there a way I can configure the port in LabVIEW, using vista, to read the data and save to a file?
Thanks.
07-27-2009 09:06 AM
First, a printer port does not have baud rate, data bits, etc. You must be using a serial port if those settings matter.
Try using VISA to read the port. Whether you have a serial connection or an actual parallel port, you can use VISA.
07-27-2009 01:47 PM
07-27-2009 02:12 PM
07-28-2009 07:07 AM
Thanks a lot for the assistance.
The way the connection is set up, the logging system has a DB -25 connected to it and through a 100 ohm 4 pair FTP cable, it is connected to a printer. ASCII stream of data is sent to the printer normally.
The task now is to retrieve the data and log to file, instead of printing it.
Now, I have used a laptop to send information to the printer (by configuring a command line batch file) and it prints off a text file. I have also used hyper terminal to configure communication between the laptop and the logging system. I have used DB 9 on the laptop end and db25 on the logging machine end. The connection is through a 4 pair FTP cable.
When I press the print button on the logging system, the screen is sent to the hyper terminal screen on the laptop exactly as it is.
I can also send info to the printer when I disconnect the logger machine and connect the printer.
My challenger is that the file comes in a ".ht" format andthe format is slightly distored from the usual printing format.
Is there a way I can capture the data in a text file or an excel file so that I get the exact format. Or is there another way of receiving the data apart from hyper terminal?
The laptop is not permitted to receive lapview so I may have to rely on capturing the data on the laptop and using lavbiew from another system to access the data.
Thanks
07-28-2009 08:47 AM
You seem to have already verified that you can do the capture with Hyperterminal so if you don't want to write a LabVIEW program, that seems to be your best option.
What is lapview?
07-29-2009 03:47 AM
07-29-2009 05:07 AM
Thanks Dennis,
I did a cross cable connection with DB 9 ends. I can communicate between two computers using the cable and hyperterminal. I can also send information to a printer when I replacethe receiving end with a DB 25.
I have set up the connection between two computers and have sent text information to the com1 port of one computer and attempted to use labview to read from the other port on the other computer.
I get the error below (please see attached scree shot and VI).
07-29-2009 09:06 AM
07-29-2009 02:46 PM
Thanks a lot. I can receive information from the port now.
I took out the VISA config from the loop.
Cheers.