Sunday, October 26, 2014

Memory addressing card repaired, all memory operational, console printer surprise, and more keypunch interface testing

1053 CONSOLE PRINTER RESTORATION

This morning, I finished up the installation of the 1053 onto the 1131, all closed up and ready to use. In order to verify that I didn't damage anything while manhandling the cover onto the mechanism, I entered a 1053 diagnostic routine into core via the console entry switches and began to test.

To my surprise, nothing typed. Not so surprising when I took a glance inside the top of the typewriter - the drive belt had broken. I was afraid that the rubber had dried too much for these belts to be trustworthy, and my fears were proven out. Why, however, did it have to happen immediately after I put everything together and checked this peripheral off as restored? Grrrrrrrrr.

Broken motor belt atop the newly reassembled console printer

1131 MEMORY CARD DIAGNOSIS AND REPAIR

I removed the card at gate D, compartment A1, slot M3, which is the address driver card which was faulty for addresses of the form '01100xxxxxxxxxxx', in  order to repair it if possible. I have a testbed to mount SLT cards, supply the three voltages they need, and to check out why the card is failing.

If the fault is in the discrete components on the card, a repair is fairly easy. I am hoping that it is a failed transistor, which has readily attainable substitutes that can be soldered into place. If it is one of the diodes or other parts inside an SLT module, the aluminum covered square modules on the card, it may be harder and more cumbersome to repair the card.

The card has eight IBM 131 discrete transistors, two 361457 modules (FTX - four 9V transistors) and two 361456 modules (AOXb - and-or-extenders), plus a multiresistor pack, a multicapacitor pack and one filter cap for the 8.3V. I am working out the wiring for this, between the general schematic in the memory ALD, the pin assignments and the card itself where I can trace out some of the connections.

Testbed to begin diagnosing the fault in the 5803467 card
A superficial examination shows all pins have good connectivity and all transistors appear to be working. The card only receives +6V for the address selection use, 8.3V for the FTX module and discrete transistors, and ground. No +3 or -3V supply is consumed on the card and the use of +6 is quite low, simply to bias the diodes of the AND function for the address selection.

I then checked the resistor and diodes of the address selection logic, which were all good. The card requires more than the usual SLT voltage levels and driving, which is why I didn't yet try to power the card and watch it operate. There is the 8.3V level for one part of the card, but it also requires a current source to feed the other half - it implements both the read driver and write gate circuit. I suspected it would take a bit of design and fiddling to get all the drivers and sinks. The 8.3V is trivial but not sufficient.

I next did some in-circuit testing of the transistors and diodes. They all operated as diodes with the correct voltage drop - treating the transistor as a pair of diodes sharing one terminal. However, when I tested the transistors as three lead devices - which gave me good results on seven of the discrete transistors but one of them was not altering the collector current as the base current changed. It was still just a pair of back to back diodes with a center wire. I had found my bad part!

It was totally consistent with the symptoms - this transistor was for addresses with bits 3, 4 and 5 of '100' which is where the problem manifested. It is marked as a Texas Instruments unit but numbered with IBM's house values - 131. I looked up some handy substitution charts that gave me a replacement type of 2N2696. This PNP transistor is not in current production but there are a few on eBay. However, it was a close enough match to NTE159 and therefore to the very common 2N3906 part.

I had some 2N3906 on hand and carefully removed the IBM transistor. Because the leads are soldered on both sides of the SLT card, removal of the leads and replacement through the cleaned out holes would take more heat and time than I wanted to apply to the card. It has thin traces linking those pads to other parts of the circuit, which might be damaged by excessive heat.

I therefore clipped the transistor off close to the can. leaving the three leads attached to the board. I formed up the new transistor to solder onto those leads and sit low enough to fit inside the card compartment without touching the adjacent SLT card. I soldered it in place, tested everything and then inserted the newly fixed card into the A1 compartment, slot M3.

Replaced transistor on repaired memory driver card (5803467)
I powered up the 1131, tested the formerly bad address range which now worked normally. I used the Storage Load and Storage Display functions (CE Switches hidden under the cover near the usage meter) to load and then check various bit patterns throughout all 16K words of memory. Flawless operation now!

NEW KEYPUNCH INTERFACE DEVELOPMENT

I began further testing with the keypunch interface and found that although everything was working well initially, after doing reads, an attempted punch hung up and after this the keypunch was again refusing to recognize a card registered in the punch station. I need to understand this in order to make appropriate adjustments.

It didn't appear that I had any connections which could feed back into the keypunch. All the punch, space and other key/switch activations are done with relays, which remain open when dropped. I sense the state of the registration relay by a reed switch, thus I am uncoupled from any circuitry.

The only direct link to wiring is the set of read contacts at the dup station and the +5V I inject to the common plate to read the signals. It may be that there is a path I don't recognize from those, which should be totally isolated by the DUP relays as they sit in their dropped state. Further, when they pick, the disconnect all my wires.

If I have an error where I leave some of my control relays picked, it could cause a problem but I don't see any indicator lights inside the interface box which would glow when I am picking any of the sixteen relays.

I am going to do some studying of the circuits in the keypunch to see what could possibly be happening here.  In the meantime I decided to work on the memory card - results reported above.

Console printer working correctly, plus minor work on keypunch interface and card reader

1053 CONSOLE PRINTER RESTORATION

I worked the various levers, pawls and other parts of the carrier that are involved in escapement (spacing) and tab operations. As part of my investigation I noticed a crack in the carrier string pulley on the right side that maintains tension on the cord. To remove this as a cause, I replaced the part; no change in the behavior but better to have a good part in place.
Part with crack in white part, front left

replacement part that I installed
Interestingly, the mis-spacing occurs in the same spots, which implies some friction, bent parts or residue in the racks into which the pawls engage. I don't expect to find bent rods, but perhaps there is sludge on surfaces I can't see that are impeding the operation. If I hand-cycle the typewriter after pushing the space button, at the columns where I have problems, I can see it either fail to move at all or move half a column.

The half-column movement can be caused by the backspace pawl and escapement pawl being out of adjustment, so that it sometimes stops at the backspace rack tooth (half-column). I originally attributed this to sludge between the pawls which slide over each other and around any pivot arms. I have worked so much lubricant through this area that I am losing faith with the sludge hypothesis.

Another failure mode, also occurring in the same area of the machinery, is the failure of a tab operation to latch, which is necessary so it can slide rightward until a tab set tooth releases the latch. It is bouncing but not latching, resulting in a skip of a few columns - but not tab set exists at these locations.

Later today I worked the pawls some more, ensuring they all slid easily and independently. Now, with power applied, the spacing and tabbing seem very consistent. So good that I am going to close up the typewriter cover and consider this restored. Patience paid off.

1442 CARD READER/PUNCH RESTORATION

The cornering station and ability of the stacker feed rollers to take the card away remain a problem. I did more cleaning, tweaking and attempted to adjust the pressure rollers for those stacker rollers. So far, it is no better. I was able to boot the cold start card from the reader and it appeared to be correct in core. There is a check condition at the end of the read but if the data got in correctly, I have to assume the problem concerns slowness in the card movement due to residual sludge. With patience, this will be corrected just as with the console typewriter.

NEW KEYPUNCH INTERFACE DEVELOPMENT

With the interface cabled into place, the keypunch is being cantankerous about recognizing a registered card, sometimes leaving the keyboard locked so I can't punch on the card. Removing the cables restores the keypunch to normal operation, which means the cause is something happening within my interface box.

Saturday, October 25, 2014

Bits and pieces on other tasks plus strong progress on new keypunch interface

NEW KEYPUNCH INTERFACE DEVELOPMENT

The mysterious reset of the Arduino when I punch columns was traced down to a loose power connector, as I thought it might. I could punch characters well but not spaces. I found that I was firing the space magnet for the original 10ms duration while the punch magnets are fired for 20ms. Once I extended the space magnet to the same 20ms operating time, I could punch cards in ASCII at will.

My binary mode error checking is still a bit touchy, something I have to work on tonight. I could get some binary mode punching to occur but when I tried the automatic multipunching, I found a flaw in my logic. That too will be fixed up tonight.

I tried to read a card next. Although the machine did space a full card width, my logic was always picking up spaces regardless of the holes in the card. I made some adjustments to the reading routine, but there is the chance that I will need to alter the time when I latch in the state of the read station contacts.

There is an issue I have to resolve with my 029 keypunch itself - cards that move into the read station area are not being pulled into registration by the pinch roller, nor do the cards get pushed by the other pinch roller so they are not far enough in the stacker area to be pulled up well.

After cleaning up the problems in my Arduino code and doing quite a bit of testing of the error checking, I took the unit out and attached it to the keypunch again. The results were puzzling - odd punching results, lack of spacing during the read command, and then a continual failure to recognize that a card was registered at the punch station.

It is late and I will resume testing tomorrow - I wonder if the attachment of the cable is incomplete or if there is something very subtle that broke? Anyway, careful testing will lead me to the problem.

1053 CONSOLE PRINTER RESTORATION

I exercised the mechanism some more, improving the spacing a bit but it is still not working smoothly enough or consistently enough - this will take patience.

1131 DISK DRIVE RESTORATION

I turned on the drive with a good cartridge and worked on some seek operations. Everything checked out okay. I attempted to cold start DMS2 from disk but the card reader wasn't quite healthy enough to get the whole boot card into core correctly.

1442 CARD READER/PUNCH RESTORATION

I tried booting a diagnostic card through the reader with apparent success, but when I moved on to try a DMS2 cold start card, check conditions resulted in an incomplete read. The reader is still suffering from lingering sludge in the mechanism.

EMULATED IBM CHANNEL PROJECT

I found pinout diagrams for the cable I own and for the card I have. It appears the cable assembly I bought is for use with the Block Multiplexer Channel card, which lets a PC connect to a mainframe channel and the PC seems to be a device. The card I own, the Channel Emulator/A, appears to be a mainframe channel and can attach to real devices which think the PC is a mainframe.

The connectors are different between the two card types, thus I need an adapter to convert my card to my cable. Now I have the ability to design the adapter because I have the two diagrams, indicating which channel signal is assigned to which pin. 

Friday, October 24, 2014

Interface testing, some adjustments and improvements, but not yet done

NEW KEYPUNCH INTERFACE DEVELOPMENT

It was another heavy work day but I did get a few hours in the shop tonight continuing to test and refine the keypunch interface. One of the issues I uncovered is embarrassing to admit. The reader cable is hooked to a mechanism that reads the holes in a column of one card in order to duplicate the holes in the following card sitting at the punch station. I will use it to read cards and to verify that a card matches what we punched one cycle before when it was going through the punch station.

The contacts that will be made when a hole is present close a circuit to deliver 5V back to the Arduino, but this only happens during an escapement cycle (moving from one column to the next). When the card is not moving the contacts are open. Connecting the contacts to the Arduino, whose input pins are in a high impedance state, means that we don't have a reliable signal from that input except for the contacts at the moment they are recording a hole. The contacts recording an unpunched location remains floating.

The right thing to have done, which I had to retrofit to my interface, was to pull the Arduino pins down to ground through a 10K resistor, which causes the inputs to sit at logical 0 except for when a contact is closed through a hole, pulling that input up to a logical 1 state. It is a big clunky, having to be done by splicing wiring between the reader cable and the Arduino to hook up a resistor, with the common terminus of all twelve resistors hooked to ground.

During my testing, trying to drive the keypunch, I was having to deal with the three cables loosening or pulling off the interface. This is because the cable ends inside the keypunch are not very long, requiring the interface box to hang down near the relay panel of the keypunch. The serial cable I am using to test is short as well, barely reaching up to the table of the keypunch where a small Surface Pro tablet provides a terminal that I can use for testing. The motion of the keypunch mechanism and the precarious hanging position of the box caused many cable disconnects or flaky connections.

I spent about an hour working on the mechanical aspects of the interface, particularly the two DB25 and one DB9 connectors, to allow me to securely screw down the cables that attach to it. With that done, I could restart my testing.

I found right away that it would trigger a punch just fine with the 10 millisecond pulse I originally designed in to the program, but something goes wrong that causes the Arduino to reboot after it punches one column. It may be a vibration issue or a loose power connection - I ran out of time to explore the cause - but there is definite progress and some confirmation that the interface will eventually work satisfactorily.

It is now late and I am too tired to keep flogging away at the testing. Tomorrow and the weekend is when I will get back to this task.


MAINFRAME CHANNEL EMULATOR CARD

I have an IBM emulator card that was used with their PC based mainframe offerings - XT/370, P/390 etc - which would let me communicate with any bus/tag based peripheral. In addition to the card, I have a cable which has bus and tag connectors on two ends and a third end that plugs into an IBM emulator card. To make this work, it has to be put into a working PC and it needs the driver software.

I don't have the driver software, but a friend does have it and is willing to sell the disk to me. There is a better than even chance that it won't work, since there are a few versions of the IBM channel emulator card, each with its own version of the software. I already know I have another challenge, because the cable set I have uses a connector with four rows of twenty pins, but the emulator card has a longer and thinner connector with only three rows of pins (but more pins on each row).  If I can figure out what the three row connector assigned for each bus and tag signal wire, I can make an adapter. However no guarantees.

Then of course I need to set up an old IBM PC with a microchannel bus, which is the bus type of the emulator card, which brings some additional complications I am sure. I don't have a current device that needs a bus and tag connector, but it will be a handy testbed to support any peripherals I might get in the future. More of a speculative activity than most of the tasks I am undertaking, so this will sit at bottom priority and may take quite a while to be finished.

Thursday, October 23, 2014

Testing new keypunch interface with IBM 029

NEW KEYPUNCH INTERFACE DEVELOPMENT

I checked the behavior of the punch cable lines against expectations, prior to hooking up my interface box. Everything worked as expected except for pin 20, which was intended to be a 48V supply for the Release relay. It was not delivering power, which was a result of an inappropriate choice of SMS connector pin for the wire. I found a better pin, A08-E, and hooked to it. Now everything on the punch cable works properly.

I then checked the behavior of the read cable, although I didn't address the timing of when a column's holes are detected. I did see the power blip up whenever the chosen row had a hole. There is a hardware change I need to make to the interface box, to add 10K pulldown resistors.

Otherwise, the signals from the dup (reader) station float at high impedance when not powered due to a hole. On the Arduino, the detected logic level is indeterminate during the high impedance time, not a logical zero which we want. The pull down resistors will fix this.

I will solder the resistors into the box tomorrow, but want to do some testing today on the remaining functions. I hooked up the box and a terminal program to the serial port and ran it through some paces.

It is correctly detecting cable presence, card registration in the punch station and other status, plus correctly triggering release and clear switch actions. What it is not doing is punching - the relays are not energized long enough to fire the keypunch. I know that hand connection of the pins will fire off spacing and punches, but that is much longer than the 10ms that was used on the original interface.

I adjusted the duration to 20ms and will dial it up further if that isn't long enough to trigger a punch cycle. I expect this may be enough because the release key works properly, the difference in activation is 15ms duration for release and only 10ms for the other punches, plus the common power for the punches is interrupted by a cam while the release key is not.

At 20ms, the keypunch did exactly the same thing - nothing. If I didn't trigger spacing and punches by a jumper across the cable, which is what the relays do when they activate, I would think I didn't have the proper common power source. Since that was what worked with the jumper, and since I can hear my relays firing while the keypunch does nothing, I will ramp up the duration once again and see what happens.

Looking at the schematics, it appears that interposer bail contacts are the connection that fires off the punch and escape solenoids, however if that is true I don't understand how my jumper could cause punching and spacing nor how the original interface worked successfully. I need to do a bit more research on this.



Tuesday, October 21, 2014

New keypunch interface controller box tested extensively, ready to connect the 029 keypunch for final testing

It was a busy work day and tomorrow will be even more jam packed, but I did get some time to test the keypunch interface box.

NEW KEYPUNCH INTERFACE DEVELOPMENT

I added in support for XON/XOFF flow control in a way that will protect us from deadly embrace problems and fits in cleanly with the logic flow. When we detect an XOFF from the user side, we flag the occurrence and will not pass along completed commands to be parsed and processed. We won't be sending any data to the user during the accumulation of a command line, thus won't overflow their buffers.  On our side, we are vulnerable to buffer overflow during the long duration activities when we are operating the keypunch, so we will send an XOFF at the start of command execution and XON at the end.

If the user terminal sends an XOFF to us in the middle of a command, when we are sending text with status responses or a card image in the case of a read, we might overflow the user terminal. To fix this would require us to write into a buffer and have a separate process emptying it subject to flow control. The impact of losing part of a status message is low, so we will accept this risk.

The card reading routine, however, could overrun the users receive buffer because of the 89 or 409 characters we will send as a single action before completing the read command. The Serial1.print() call will block until it can pump the last of the data into the 64 byte output buffer, which means we can't read the incoming serial stream to spot an XOFF.

If we could peek at the incoming serial buffer to spot an XOFF, we still wouldn't be able to stop the output in time. The Serial library in Arduino has no flow control - it will just pump out bytes until the buffer is empty. In order to guarantee successful flow control, we would have to institute a separate buffer for outgoing messages and pump it out by some method that would be given control in spurts to send out just enough to fit in the output buffer. Peeking at the receive buffer is also a challenge because the Arduino environment only gives us the immediate next character, not any behind it.

The user serial link issue was resolved - wire snapped in a harness inside my interface. I continued to debug code and clean up behavior. The relays appear to be operating correctly except for the row 12 punch relay which makes no sound. I will check that wiring. In addition, some of the relays sound but the signal LED on the relay board doesn't illuminate. Not sure if that is significant or just a flaw in the board. I will do some connectivity testing of the relay contacts before hooking up my keypunch cables.

After a bit of double checking, I discovered that one of the pin assignments was incorrect and that two signals were assigned to the same relay leaving the other relay disconnected. After making quick changes, I retested and everything clicked and lit as it should. Next up was a test of the DB25 cable connections to ensure that I am controlling each wire I expect inside the keypunch.

Everything checks out for the connections that are switched through the 16 relays. I also checked the pair of wires in each cable which are shorted to allow the Arduino to detect if the cable is connected or not. Finally, I tested the pair of contacts that hook to the reed switch detecting when a card is registered at the punch station.

The only part not tested is the reader cable which will detect the presence of holes in cards as they are moved through the dup (reader) station. Once I do a quick sanity check of the wiring in the keypunch, I will plug in my cables and run the diagnostics.

Monday, October 20, 2014

1053 debugging, SAC interface circuit testing and good progress on keypunch interface controller

1053 CONSOLE PRINTER RESTORATION

I hoisted the console printer up for access to the contacts and began to check continuity and operation of all the contact/switch units on the typewriter frame. Amazingly, given all the oxidized contacts in the rest of the machine and peripherals, everything in the 1053 worked properly.

Checking switches and contacts in the 1053
The erratic spacing has to be mechanical, therefore. I did some spacing with the hand crank wheel rotating very slowly to see the operation at the moment of release. I saw spots where the carrier did not move forward at the release, while in most spots it jumped promptly to the right.

While it could be a bit of sludge on the escapement and backspace rack teeth at the failing spots, I am still leaning to residual sludge between the escapement, backspace and tab levers keeping them from snapping back in place as they should under their spring tension.

I know that the tab should latch the escapement and backspace pawls out of the way until the carrier runs into a tab lever in some column that is set, which releases that latch. On some tab operations, however, I see the tab lever fail to latch so that it moves only a few columns over.

Since the latch is part of the stack of levers along with escapement and backspace, it reinforces the theory that it is sludge in the levers causing all these problems. Access is difficult without disassembling many parts that must be carefully adjusted upon reassembly.

Stack of tab, backspace and escapement levers, looking at tab lever on topo

Escapement and backspace rack teeth visible toward top, bottom pins are the tab stops

Another view of the stack of levers where I suspect sludge is causing problems

NEW KEYPUNCH INTERFACE DEVELOPMENT

I deferred debugging the problem with the user serial link, due in part to the total ambiguity surrounding PC serial port links -

  • DCE/DTE
  • which of dozens of permutations of control lines are used (CTS/RTS/DSR/DTR. . .)
  • voltage (TTL versus true RS232)
  • cables (all wires, partial wires, straight thru, crossover, control signal loopbacks)
  • NL, CR+NL (a terminal program variation rather than link per se
Instead of attacking the link, I temporarily changed the input routine to use the USB serial0 link associated with the Arduino code upload. With that in place I could do quite a bit of testing of my logic. In some cases, I added temporary 'Serial.print' instrumentation.

 I have worked through quite a bit of the functionality successfully, other than the question of whether it does what I expect to the keypunch. Identified issues to debug are:
  • Punch command with more than 80 columns of data is not detected and truncated
  • Verify mode doesn't properly handle shorter card for punching than prior card being checked
  • Serial1 link is not working, no output displayed by my terminal program

There is still more to check, such as:

  • translation under binary and user table mode
  • proper loading of the user table, 
  • parsing of binary mode punch commands
  • verify operation correctness
  • keypunch function timing 
I put together a pigtail power connector to hook to the Arduino from the main 12V power brick, since it is powered by the USB cable at the present, but no USB cable will be in place when the interface is in normal operation.

One part of the spec is not implemented - XON/XOFF flow control - but that shouldn't be hard to add in as testing wraps up. No point worrying about it until I get the user serial link working.

Later in the evening, I worked on the code and resolved all the known errors except for the serial link which I am avoiding for now. I also tested the binary translation mode, entering punch data in binary, and related functions. Ignoring the serial link issue, the rest of the testing should be done hooked to the keypunch.

SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130

Initial issue when I began testing my SAC interface sample circuits, but it turns out I mis-selected all of the transistors. All I had on hand were some IBM 077 and a random NPN small signal transistor, not the parts I had simulated. The failing circuit was the driver which takes a TTL input and drives an SLT transmission line as output.

I will do some simulation with varying part characteristics later tonight, even though I plan to replace the current transistors with the part number I will use for full scale production. If I find tweaks that make it less sensitive to component specs, I will apply them.