Monday, November 1, 2021

Debugging continues for new Documation card reader controller

 INVESTIGATING THE MISSING ROW 9 DATA

To divide up the set of suspected failures I tacked a wire onto the output of the gates driving the D9 (Row 9 data) signal, just before it exits the Control card and flows over the connectors into my controller box. The scope showed me valid D9 data which eliminated the internal Documation circuitry from the list of suspects.

I then did a continuity test between the shield connector on the Arduino and my tacked wire to see if the signals are making it from the reader into my box. I found an open circuit. I then removed the wire from the shield and verified there was a proper connection. The flaw was a poorly connected wire onto the shield.

With that repaired, I read some cards to prove that I am receiving all the data that is punched on the cards, without dropout or glitches. 

INVESTIGATING THE FALSE ERROR STATUS

At the same time as I had tacked on the wire to the Control board for the data line, I tacked a wire to the Error card to check out the error signal. I found that it was improperly reporting an error condition when none existed. It appeared that the buffer gate was bad - input said no error but output flipped to on. 

This buffer chip is not fully used. I first cut the leads from the package for the failing gate (pins 10 and 11), added jumpers to the unused gate at pins 8 and 9, then retested. Whatever went wrong with the one gate was still wrong with the substitute.

Jumpers substitute unused gate for failed on

I pulled out my Hakko desoldering gun, removed the bad chip and soldered in a replacement 7417 open collector buffer chip. The ERROR signal was now properly generated, but the interface still saw it as active.

Next up was the continuity testing, which proved that the ERROR line got to the shield connector for pin 35 of the Arduino. This pin is read by bit 2 of Port C of the Atmel Mega2560 processor on the Arduino (PC2). All eight bits of Port C are inputs accessed by the same method and the other seven are correctly read. However, I am not seeing PC2 reflecting the signal coming from the reader. 

I may have a mechanical issue with the shield to Arduino pin for 35, or the Arduino processor may have been damaged by whatever was wrong with the original buffer chip, leading to PC2 being unusable. I will have to investigate this further on my next session. 

Saturday, October 30, 2021

P390 is working! Two small issues to chase down with the new Documation interface

 DOCUMATION INTERFACE DEBUGGING RESULTS

I first made the changes from last post - switching to direct port access for the LED and PICK signals as well as collecting all eighty card columns before sending the data up the USB cable to the host computer. Once those changes were working, I began the exhaustive testing of the various machine status indications. I see that most are working properly but the ERROR state is always on even when the machine has no error conditions active. 

I don't yet know if that is coming from the Documation M600 reader, representing some failure inside that machine, or whether my connector, cabling, connections to the Arduino or other issue is responsible. Will probe the signal where it exits the M600 PCB and go from there.

I then tried to connect with Brian Knittel's cardread.exe program but it fails to connect. I can use the Arduino serial monitor or a serial terminal program like PUTTY just fine. At this point, my working hypothesis is that the error condition being reported is triggering the program's code to conclude it isn't talking to a real card reader. The error message is not clear, other than iterating on an attempt to connect and a report that the effort tailed. 

Finally, I put in some diagnostic output so that I can verify that I am reading the cards correctly. I discovered that the interface is not seeing row 9 holes. Again, that could be a flaw in the machine itself, a cabling/connection issue or something else. Probing at the machine will direct me appropriately. 

P390 WORKING

I first swapped out the CR2032 battery with the new one I bought and validated that the holder is reliably connecting it to the planar. I then brought up the system, cleaned up the configuration corruption and set the date/time properly. 

My boot up of the OS/2 instance worked - the P390 panel showed up with all the programs ready to use. I configure it for an MVS 3.8 and a VM/370 instance at different times and started up the systems. I ran far enough with those to feel comfortable with the state of my P390 system. 

Later I will make use of the Diagnostic diskette and fully check out the card, but for now my working assumption is that I survived the tipover with no lasting damage other than to sheet metal. 

Eventually, I want to enhance this system with other cards to broaden its functionality. I have a WAN card that I hope will give me an SDLC link to my 3174 controller and 3178/3179 glass terminals. I also have a 390 channel card that would give me bus and tag connectivity to real 360/370 style peripherals. Finally, I need to get my SCSI 9 track tape drive connected and working as a pretend 3420 drive. 

Debugging new Documation card reader controller, also debugging P390 system

 P390 STATUS

I was able to start up an instance of OS/2 on the server, although not the version that had the P390 software installed. Still, it gives me the tools to get to the other instance where everything is set up. Before I fix this, I have to deal with lost or corrupted configuration due to expired backup batteries.

The motherboard CMOS battery is a CR 2032, a 3V coin style battery. I had replaced it but still get 'bad CMOS battery' errors and decaying information on the server CMOS configuration RAM. There are a few possibilities for this. The new battery could be bad, the contacts could be poor in the holder, or there may be damage to the planar (motherboard) and its traces due to the mechanical trauma this server suffered when it fell over during packing back in California.

I tested the battery and found it to register at 2.9V. I also bought a new battery and will substitute it into the server. While I do that, I will work on the contacts in the holder to be sure I get good connectivity. I sure hope I don't need to swap out the planar for the backup I bought.

This server has a RAID set with six SCSI drives, attached to an Adaptec SCSI card and controlled by an Adaptec ServeRAID 6i card. The latter card carries a LiION battery to preserve the RAID configuration data during power-off periods, but that battery is dead as a doornail. As a result, each time I try a boot the card has to access the disk drives and extract the configuration information from disk to rebuild the controller data. This takes a few minutes and is annoying.

A new battery is about $160 and refurbished batteries sell for around $45 but I can get a new in box 6i card for $49 including shipping that comes with a battery. I chose that option and once it arrives, I can swap the battery then carefully open and reverse engineer the dead battery pack to figure out how I can replace it for a more reasonable cost in the future.

ARDUINO BASED CARD READER CONTROLLER DEBUGGING

I have the code triggering reads and properly extracting the data from punched cards on my M600 card reader, but I still have a few items to finalize to be sure it is ready for production card reading. First, I want it to read just one card and wait for the next command before reading subsequent cards. I also need to exhaustively test all the status signals to be sure they are properly captured and match the machine state.

Unfortunately, my first cut at stopping the PICK command didn't work. I dropped the request at column 80 but the reader had already dropping the BUSY status line and thus had triggered the next PICK cycle based on my command line still being asserted. I moved the deactivation of PICK to the time when I am reading column 1 and will verify that this works properly.

ENHANCEMENTS PLANNED FOR READER CONTROLLER

I have been using digitalWrite to toggle the PICK command line on and off, but want to switch over to direct port access to lessen the load on the processor handling the columns since they come quite rapidly while a card moves at up to 16.67 per second, generating impulses about every half millisecond.

Second, I set up the serial interface to 115,200 baud in order to stream the two bytes per column during that half millisecond interface without risk of dropping characters. I will change the routine to store all eighty columns in an array during card reading, then dump the results at whatever speed the serial link uses. This eliminates the risk of overruns to the serial link. The downside of a slower link is that the next PICK command is issued later and the reader drops below its nominal card per minute rate. 

Thursday, October 28, 2021

Finally getting back to the shop

 BEEN AWAY DEALING WITH NEW HOME

I have finally completed the majority of the tasks and shopping for my new home, allowing me to return to the workshop and restart my projects. There are still jobs at home and still decorating to accomplish, so my time will be divided for a bit more but at least I can give due time to my hobbies now.

ORGANIZING WORKSHOP

Because of the short time I had to pack up for my move to the east coast and the dispersion of my parts and equipment across multiple sheds and rooms in the old home, I have many components such as transistors spread across many different boxes. 

I decided to go through the boxes and extract some common components into buckets, which I can later winnow down and sort into specific bins for quicker access. This took quite some time but will contribute to the gradual organization of my workshop.

CONTINUING BUILD OF NEW ARDUINO BASED CONTROLLER FOR DOCUMATION READER

I put in about 30 minutes drilling and mounting stands and inserting switches and an LED on the aluminum box for the new controller. I have a bit of wiring to do before I close up the box and begin testing. 

Tuesday, September 28, 2021

Validated and corrected interface polarities,

 RESULT OF VALIDATION OF INTERFACE POLARITIES

After I powered up and checked all the polarities, it was clear that all the status signals including Index Marker were inverted polarity. I updated my code to run an interrupt routine on the falling edge of IM and to treat the status bits as inverted. At this point I am ready to begin testing the code. 

WIRING AND CONSTRUCTION OF EXTERNAL INTERFACE BOX PROGRESS

I wired up the external interface to the shield, inserted it on the Arduino and started work on the final mounting and some outside connections/components. Specifically, I need the USB cable to exit the box, two connectors to provide 5VDC, a pushbutton to toggle the End of File (EOF) status, and an LED to display when EOF is active. 


I made use of my nibblers, hole punch and drills to add the components on the top plate, after which I can close up the box and test. Once again, I had to leave the shop early to perform tasks related to my move-in tomorrow. 

Monday, September 27, 2021

Rearranged shop, building new card reader interface

 REARRANGING WORKSHOP

I bought additional folding tables in order to lay out and organize items in my shop - three 6 foot and two 5 foot tables. Once I had them in place I unpacked all my tools and began to arrange them on a couple of the tables. 

ASSEMBLING SHIELDS FOR NEW INTERNAL AND EXTERNAL INTERFACE

I bought two shields to use with the Arduino Mega 2560 controllers for my new design of an interface for the Documation readers. One will fit inside the card cage of my M1000 reader, thus has to minimize height. The other will attach to an existing cable that plugs into the rear of the M600 reader.

I chose a shield that can have the wires soldered on from underneath, between the shield and the Arduino, to allow the stack to slide into the card cage between the existing PCBs in slots 3 and 6. I assembled the headers and pins onto this shield and set it aside to begin wiring once I prove out the interface using the other machine.

I picked up a shield that has screw down wire terminals for all the pins on the Arduino Mega 2560, giving me ultimate convenience in attaching this and modifying it as I test things out. Too, I can reuse this shield in future projects if I wish. I spent a bit of time soldering on the screw terminals and the headers.

DOUBLE CHECKING POLARITY OF KEY SIGNALS

Looking at schematics and other documentation suggests that I have a mix of normal and inverted logic signals on the interface between the reader and my board. Specifically, it appears that only the 12 row data signals, the Index Marker, and the Pick Request signals are positive. The inverted ones include Ready, Busy, Error, Hopper Check, and Motion Check. 

Obviously my code for the controller has to handle these appropriately. In order to verify what is presented, I hooked up the external cable to the M600, set up a VOM, and was ready to begin probing the logic levels with the reader in various states to validate the polarity of each logic signal.

RUSHING AWAY TO DEAL WITH MINOR SNAG IN THE PLANNING FOR MY NEW HOME

I am closing the purchase of a condominium as my permanent home on this Wednesday. I had plans set up for delivery of various items of furniture, televisions, and possessions from both the rented home I am in now and the storage facility that has the remainder of my possessions I brought from California. 

As we talked with the homeowners association, we discovered that they have a quite reasonable requirement that movers provide a certificate of insurance that covers the common parts of the building from any damage that the movers might cause. This includes coverage for workmens compensation in case one of the works is injured during the move, as well as liability for damage to the property. 

My main move of possessions from the U-Haul storage facility into my condo involved using a small business that brought my gear to my workshop successfully. They would haul the four U-Box containers on special trailers to my condo, unpack outside and carry everything up using the building elevator. Unfortunately, this small operation does not have the level of insurance necessary to provide a $1M certificate of insurance. 

I had to arrange for a large scale moving company to unpack the U-Boxes at the U-Haul location, load their truck, make the short drive to my condo, then unpack their truck and bring everything up into my new home. I dashed home to make this happen today. Fortunately I could arrange this on short notice; I chose the company whose vans were outside my building all week removing the seller's possessions, since they clearly had the insurance necessary to satisfy the obligation. While it will cost me a few hundred dollars more, I still move in on the originally planned date and everyone is satisfied. 

Thursday, September 23, 2021

Hunting the elusive motherboard for x235 server

 MOTHERBOARD PART NUMBER FOR MY VERSION IS 23K4588

I see other part numbers on eBay but the two that are the same are both in Europe, come with a high shipping cost and too boot are very steeply priced. I turned my hunt elsewhere.

FIRST TRY TO BUY ONE

I found an outfit, Memory4Less.com, that listed one board at a reasonable price. After buying it with Paypal, dealing with them cancelling the first payment over a supposed mismatch of shipping address with the Paypal address, then accepting the identical payment the second time. Sadly, a day later they cancelled due to 'out of stock and no ETA from their distributor'. In other words, selling what they didn't have.

SECOND TIME IS THE CHARM (I HOPE)

I then found a board that showed up on ebay with a local US address, bought it, and hopefully will have an intact planar in just a few days. Meanwhile, I am waiting for parts for my new Documation card reader interface so I am on pause at the workshop. I will go to Disneyworld tomorrow instead.