# Printer for Mark V

S
Thread Starter

#### SRP

Dear All,

We are having Fr-6 gas turbines operating in combined cycle mode. The units are remotely controlled thru DCS via MODBUS communication. The remote <I> is connected with a serial printer; the serial cable connected from the "digiboard" card of the <I>. I understand that the digiboard is for MODBUS communication. Previous experience with the default printer (OKIDATA - Microline series) supplied with the machine is that; after 1 or 2 yrs of working these printers starts malfunctioning. Typically, the printers start printing garbage towards the end of printing the trip report. Even when large amount of data is to be printed, then at the end of the print,the alarm bar and menu targets are not printed correctly.

We tried to connect a parallel printer but it would not work since the digiboard would accept only a serial printer. However, we tried to connect the parallel printer to the available parallel port on the remote <I> (with due configuration changes in the IO_PORT.dat file) but would not work.

Meanwhile, the parallel printer works well when connected to the local <I> (since there is no digiboard here).

Could anyone suggest a method to connect commercially available dot matrix printers and make them work on a remote <I> with MODBUS?

Thanks in anticipation.

SRP

M

#### markvguy

The Digiboard card simply provides additional serial ports (over and above the two normally provided with the CPU). Those ports can be used for MODBUS, mouse (trackball), or printer(s).

All port definitions are made in the file F:\IO_PORTS.DAT. The comments in the four sections are fairly self-explanatory. Suggest comparing the IO_PORTS.DAT files of the local and remote <I> for clues on configuration of the parallel port for use with parallel printer.

Any dot matrix printer used with an <I> should be configured to be Epson LX-compatible/mode, whether it's a serial or parallel printer.

Write back with any further questions.

C

#### Curt Wuollet

Just a guess, but it sounds like you are overrunning the printers buffer. It could happen that a shorter report fits in the buffer, but as the report grows longer, at some point the buffer fills and your handshaking between the printer and digiboard isn't working. One way to check this is to set the serial baud rate real low on both ends and see it the condition improves because the printer can keep up. If that's the case you play with the handshaking until you get it working.

Regards
cww, who has fixed thousands of serial printing problems.

M

#### markvguy

The serial port "expander" card (Digiboard) is simply a means of adding serial ports to the <I> over and above the two (COM1 and COM2) which are tyically provided with any CPU. Those ports could be used for MODBUS communications, trackball(s), printer(s), JEM meter interfaces, etc. Properly configured, there was no "interference" when a parallel port printer was used with an <I> which was communicating via MODBUS--either through COM1 or COM2 or one of the serial port expander card's ports. So, the problem should not be the presence of a Digiboard in the CPU or the fact that MODBUS is being used for communication.

The typical 60 Hz Alarm Logger was a 24-pin dot matrix printer operated in Epson LQ emulation mode connected to the CPU's parallel port. If another printer was provided as an option, it was generally connected to a serial port (possibly via a serial port expander card--the Digiboard).

For some reason, early 50 Hz applications typically had serial port Alarm Loggers (dot matrix printers), but eventually migrated to parallel port printers--unless there was a contractual requirement to provide serial port printers. If another printer was provided as an option, it was generally connected to a serial port (possibly via a serial port expander card--the Digiboard).

There is another possibility which may be affecting parallel port operation: IRQ assignment in BIOS of the CPU. The typical IRQ and port assignment for parallel ports on an <I> CPU are IRQ 7 and 0378; these settings are found/made in the BIOS of the CPU and the values must match the Parallel Port Definitions (Section 2) of F:\IO_PORTS.DAT (or vice versa). Note that the parallel port definition must be made in Section 2 of IO_PORTS.DAT, and then each "printer" port must be assigned to a parallel (or serial) port in Section 3 as defined in Section 1 or Section 2. (It's harder to explain than to do.... Early IO_PORTS.DAT files didn't have great comments; later ones had better comments--which was about the only documentation on configuring printers/ports.)

Any parallel port dot matrix printer capable of emulating an Epson LQ or IBM Proprinter X/24 emulation can generally be used on an <I>.

Lastly, there's also the possibility that the parallel port on the remote <I> is "broken." If you think the Digiboard/MODBUS communication is the problem, stop IDOS (by typing IDOSEXIT at any command prompt), then copy an ASCII text file to LPT1 (using the MS-DOS COPY command; it's not necessary to use the PRINT command when IDOS is not running) and see if the printer works. If the printer works, it may well be that something in the configuration of the BIOS or the Digiboard as used by IDOS causes the parallel port not to work. If the printer doesn't work with IDOS turned off (and MODBUS communications stopped), it's probably not the Digiboard. (To restart IDOS, either re-boot the <I> or type RUN_IDP at the command prompt.)

M

#### Michael Griffin

Further to the suggestion on handshaking; also check the RS-232 cable. The software and printer may need RTS/CTS handshaking, and these may be jumpered out at each end so that only Rx/Tx/GND are wired through, defeating the handshake.

S

#### SRP

Dear Mark V guy,
Thanx for the detailed explanation. I need some more clarifications on this issue. Pl note the following file configuration details for local and remote <I> computers at my site:

Remote <I> IO_ports. Dat file:

Section 1:

DIGIBOARD STATUS_PORT 0140 IRQ 9
D1 BASE_PORT 0100 BAUD 9600 PARITY NONE
D2 BASE_PORT 0108 BAUD 9600 PARITY NONE DATA 8 STOP 1 MODBUS
D3 BASE_PORT 0110 BAUD 9600 PARITY NONE
D4 BASE_PORT 0118 BAUD 9600 PARITY NONE

Section 2:

This is not enabled.
;P1 IRQ 3 BASE_PORT 02F8

Section 3:

ASSIGN SYS$PRINT D1 ASSIGN DOS$PRINT D1
ASSIGN EPA$PRINT D1 ASSIGN PL$PRINT D1
ASSIGN DOT_MATRIX D1

Section 4:

MODBUS PORT D2 SLAVE 1 UNIT T1 MODE NATIVE ; MODIFIED 25.08.00

Local <I> IO_ports. Dat file:

Section 1:

No parameters are enabled in this section.

Section 2:

P1 IRQ 7 BASE_PORT 0378

Section 3:

ASSIGN SYS$PRINT P1 ASSIGN DOS$PRINT P1
;ASSIGN EPA$PRINT P1 ASSIGN PL$PRINT P1
ASSIGN DOT_MATRIX P1

Section 4:

No parameters are enabled in this section.
Now my query:
As mentioned earlier, I have a serial printer connected to the “digiboard” on the remote <I>. But if I need to use a commercially available DOT matrix parallel printer, then I must enable the COM port in Section 2. I understand that if the IRQ settings on remote <I> is replaced with that one on local <I> then we might have problems while rebooting the remote <I> computer. The remote <I> may not revive!!!!. Could u please clarify?

M

#### markvguy

First of all, as long as you have original copies of any file(s) you modify, you can "revive" the <I>. If you have a problem booting up (if IDOS hangs, or the printer port doesn't work), use a bootable floppy to restore the original file, or press CTRL+C to interrupt the execution of AUTOEXEC.BAT before it starts RUN_IDP.BAT, then restore the original file. Some versions of MS-DOS also permit interruption of the boot-up process by pressing F5 or F8 during initial boot-up; but there are many ways to get access to a command prompt to restore files to "revive" an <I>.

Note that a "generic" IO_PORTS.DAT file can be found in G:\DATA of most <I>s and HMIs. I think you will find the parallel (LPT1) port definition in Section 2 of the generic file on the remote <I> will look exactly like the one in the local <I>....

The following is from the comment section at the top of the IO_PORTS.DAT file:

; TABLE OF CONTENTS
; Section 1 - SERIAL PORT DEFINITIONS
; Section 2 - PARALLEL PORT DEFINITIONS
; Section 3 - PRINTER PORT DEFINITIONS
; Section 4 - MODBUS ASSIGNMENTS/DEFINITIONS
;

The following is from the comments at the top of Section 2:

; Section 2 - PARALLEL PORT DEFINITIONS
;
; The parallel definition line consists of the port name P1 followed by
; IRQ n and BASE_PORT xxxx (in either order).
;
; The following parallel port definition line is required for P1 (LPT1):
;
P1 IRQ 7 BASE_PORT 0378
;

The line in Section 2 which begins with P1 is for the Parallel port (P1), not for a COM (serial) port (Sn or Dn). The lines in section 1 are for COM (serial) ports other than the two usual ones provided with the <I> which are usually defined in AUTOEXEC.BAT, if necessary.

The disabled line in Section 2 is what is preventing IDOS from accessing the parallel port--regardless of its IRQ assignment or Base_Port address. It's not clear why the two files have different IRQ assignments and Base_Port addresses; could be the two <I>s are different PCs (different PC "motherboard"). The likely reason, though, is that someone has tried to make the parallel port work with an IRQ assignment and Base_Port address for a COM (serial) port without changing the printer assignments in Section 3... and then commented it out when it didn't work without returning it to the as-found condition. It may not have worked with the original settings because Section 3's assignments are directing the printer outputs to D1 (the #1 output of the Digiboard serial port expander board); had the printer assignments been changed to P1 from D1 it probably would have worked. When that didn't work, someone tried using the IRQ assignment and Base_Port address for a serial (COM) port, but that wouldn't work, even if the printer assignments in Section 3 had been changed.

The IRQ assignment and Base_Port address in IO_PORTS.DAT of the remote <I> must match that made in the BIOS of the remote <I>'s PC. (This is true of any PC used for an <I>--the assignment and Base_Port address defined in IO_PORTS.DAT MUST match those defined in the PC's BIOS.)

Basically, you have two options: First, shut down the remote <I>, and when it begins booting up access the BIOS settings (there's a little message on the display to press DEL or F12 or something like that to access the BIOS settings) and search through it until you find the LPT1/parallel printer port IRQ assignment and Base_Port Address assignment. There is usually an option to exit BIOS setup without saving any changes if you're nervous about looking at the BIOS settings--remember, you're not going to make any changes, just see what the assignment and address setting for the LPT1 parallel port of the BIOS are.

Once you know the PC's IRQ and Base_Port address for the parallel port, you can make the necessary changes to the line in Section 2, then uncomment the line. You will also need to change the port assignments in Section 3 from D1 (Digiboard port #1) to P1 (parallel/LPT port #1) to complete the assigment of the printer outputs to the parallel port.

Second, since 7 is a common IRQ assignment for a parallel port, and 0378 is a common Base_port address for parallel printer ports, you could just make the line in Section 2 look like the one in IO_PORTS.DAT of the local <I>, make the port assignment changes in Section 3 (from D1 to P1), restart IDOS, and see if the parallel port dot matrix printer works on the remote <I>, and if it doesn't, then go searching in the BIOS.

In either case, any properly configured, commercially available parallel port dot matrix printer will work with a properly configured parallel port of any <I>--regardless of whether or not MODBUS or Digiboards are used.

By the way, it's possible to have a serial port printer AND a parallel port printer working at the same time--it's just a matter of the port assignments as to what gets printer where. You could have as many printers as port definitions, using one printer for each port definition. (Ain't the <I> wonderful?)

markvguy

S

Similar threads