I am interfacing with the Keithley 2304A high-speed power supply under linux via GPIB and have successfully communicated with the device and can set the supply voltage, take voltage/current readings, etc. However, I am interested in measuring the average, minimum, and maximum power consumption by a load device over time. With the serial timeout settings I am using (with a serial to GPIB adapter), I can get about 4 current/voltage measurement pairs a second, which is much too slow to characterize the power consumption accurately. Just measuring current alone (and using fetch? rather than meas:curr?), I can get 35 or so measurements per second, which is better. However, I would like to sample even faster, or, alternatively, have the instrument keep track of peaks/troughs in the current waveform for me and report that information, since it can probably do this at a much higher frequency than it can send me data.
My load right now consists of an ARM microcontroller, which draws about .34 amperes at 5V (which is regulated down on the PCB). The current draw does fluctuate somewhat depending on uC activity, so I thought that perhaps the pulse-current digitization described in the user's manual would be useful for getting large amounts of data very quickly. So, I implemented a slightly modified version of the example code on page 2-15 of the UM (rev. B), in which I use an average current value computed previously as the trigger level rather than 100mA. My aim with this was to have it send me 3600 current values whenever this current threshold was exceeded, which would hopefully be nearly all the time.
However, although a pulse is detected when I use this method, every single value (of the 3600 I receive after read:arr?) is +9.9E37, which is of course nonsense. The commands I am sending the PSU are essentially as follows:
Code: Select all
I think I might be misunderstanding the pulse-current digitization process. Am I going about digitization wrong, or is there a better way to sample data as quickly as possible? It seems to me that the pulse-current examples mostly deal with more square-wave-like loads, whereas mine fluctuates but not quite so dramatically. Thank you for any assistance!