| Products > Test Equipment |
| DIY scan card for Keysight 34970A |
| << < (4/13) > >> |
| H.O:
No problem, glad I can help. Not sure how to figure out what the rest of the bootup / configuration stuff actually does. Any ideas? Reading the relay count from the module was fairly easy to figure out. With 34901A in slot 1, pressing VIEW->RELAY CYCLES: (Display shows 7,141,391) --- Code: ---DAQ sends 0x169, 0x02C, 0x040 Card responds 0x00F DAQ sends 0x149 Card responds 0x0F8 DAQ sends 0x149 Card responds 0x06C DAQ sends 0x149 Card responds 0x100 --- End code --- Rotating the knob to select the next channel: (Display shows 673,436) --- Code: ---DAQ sends 0x169, 0x02C, 0x041 (Slot 1, Return relay count, Channel 2) Card responds 0x09C (Least significant byte) DAQ sends 0x149 (Slot 1, next byte please (0x14A for slot 2, 0x14B for slot 3)) Card responds 0x046 DAQ sends 0x149 (Slot 1, next byte please) Card responds 0x00A DAQ sends 0x149 (Slot 1, next byte please) Card resonds 0x100 (That's all I got) --- End code --- So, 0x169 targets card in slot 1 (will be 0x16A, 0x16B for the other two slots), 0x02C is the command to read relay cycles and 0x041 is the channel number. The card then returns one byte and the DAQ asks for the next byte by sending 0x149, 0x14A or 0x14B (depending on which slot it's targeting) until the card returns 0x100. The value is returned most least significant byte first. For my channel 2: 0x0A469C = 673,436 which matches what's displayed on the DAQ itself. |
| voltsandjolts:
Looking at the block diagram for the 34901A we can guess at what some of the commands will be used for, e.g. ~ open / close channel relays (as you have researched) ~ open / close channel relays in 4 wire mode (maybe same commands as above?) ~ Bank switches open/close for 4W mode ~ open / close backplane switches for measure / 4w-sense / measureI ~ read cold junction temperature (there are two DS75 chips on board so probably separate command to read each of them) ~ read relay activation counters (as you have researched) There may also be commands to read 8051 firmware version and card hardware version. Things we don't understand can just be copied monkey-see-monkey-do for now. Note that I have not implemented the current measurement or the cold junction temperature measurement hardware. But still need dummy response to those commands of course. |
| strawberry:
0x16x execute - 0x02C function - 0x040 value - 0x121 executed / 0x100 end of data / 0x120 not ready/done / .. 0x11x search 0x1Bx write > flash memory ? 0x12x activate - SRQ high - 0x121 executed 0x14x received (card) data 0x10x is data transmitted |
| voltsandjolts:
Making some progress on a rainy afternoon. The DMM sets the 9th bit when the character contains the card address. This reduces interrupt load on the card mcu, since the uart has an option to only interrupt if the 9th bit is set. Once the card is addressed, it listens to all subsequent characters until that command is complete, processes it and then goes back into unaddressed mode again. The low 3 bits are used for card address, I guess they were allowing for an 8 slot dmm that never happened. Thus the command codes are actually 5 bits: --- Code: ---// Commands are shifted down 3 bits to remove the address bits and thus // allow the compiler to make a jump table with 32 entries for command decoding. #define CMD_IDENTIFY (0x18 >> 3) // response is 0x101-0x108 for 34901A-34908A cards respectively #define CMD_SRQ_TEST (0x20 >> 3) // card holds SRQ low for 16us then responds with 0x121 #define CMD_UNKNOWN (0xB8 >> 3) // maybe for writing to eeprom...dunno #define CMD_QUERY_BUSY (0x08 >> 3) #define CMD_QUERY_DATA (0x48 >> 3) // read some data, byte at a time #define CMD_EXECUTE (0x68 >> 3) // begin read of relay cycle counts and other unknown stuff #define CMD_CHAN_CLOSE (0xE8 >> 3) #define CMD_CHAN_OPEN (0xE0 >> 3) #define CMD_CHAN_SCAN1 (0xD8 >> 3) // TODO don't understand this yet, scan channel list maybe? #define CMD_CHAN_SCAN2 (0x08 >> 3) // TODO don't understand this yet --- End code --- When responding to the DMM, the scan card sets the 9th bit to mean 'here is a data byte, and it's the last data byte I have for you right now'. I've implemented all the commands except the last two scan commands. Not tested yet. |
| bsdphk:
--- Quote from: voltsandjolts on May 29, 2022, 04:02:42 pm ---The DMM sets the 9th bit when the character contains the card address. --- End quote --- This is the good old "multidrop" bus from the MCS-51, aka intel 8051 microcontroller. And the 8-slot device exists, I've seen it on ebay, can't remember then umber. |
| Navigation |
| Message Index |
| Next page |
| Previous page |