Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading data from DB 25 port

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.

 

 

0 Kudos
Message 1 of 12
(4,759 Views)

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.

0 Kudos
Message 2 of 12
(4,749 Views)

Hi Dennis.

 

You probably tried to say:" a parallel port has no baudrate etc"  A printer can have a 25 pin serial connection..

greetings from the Netherlands
Message 3 of 12
(4,735 Views)
You're right. I should have said parallel port.
0 Kudos
Message 4 of 12
(4,732 Views)

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

 

 

 

0 Kudos
Message 5 of 12
(4,715 Views)

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?

Message 6 of 12
(4,711 Views)
Thanks a lot Dennis.
0 Kudos
Message 7 of 12
(4,696 Views)

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).

 

 

Download All
0 Kudos
Message 8 of 12
(4,693 Views)
You could have a mismatch in the com settings.
0 Kudos
Message 9 of 12
(4,678 Views)

Thanks a lot. I can receive information from the port now.

 

I took out the VISA config from the loop.

 

Cheers.

0 Kudos
Message 10 of 12
(4,663 Views)