I just went through the whole SRQ annoyance with my phase-noise utility. I was trying to use them to detect end-of-sweep conditions. I ended up giving up on SRQs altogether in favor of using long (1000-second) timeout periods.
They seemed kind of twitchy... if I remember right, the thing that finally made me give up was when I realized that I was getting SRQs immediately if any characters, including semicolons or CR/LF terminators, followed the TS (Take Sweep) command. My code would think the sweep had ended immediately, and time out on slow sweeps waiting for the graph data request to complete. You're doing serial polling with ibrsp(), right? Here's the code I was using (below). GPIB_serial_poll() is a wrapper for ibrsp() in my GPIB library, while GPIB_status() just calls ibwait(). I was calling wait_for_SRQ() right after issuing the measurement command (TS in my case). I haven't had a chance to look at Dave Kirkby's code for the 3457 yet; maybe he's got the problem nailed... -- john, KE5FX //************************************************************************** ** // // Wait for and acknowledge service request // //************************************************************************** ** void acknowledge_SRQ(void) { while (1) { if (GPIB_serial_poll() & 0x40) { break; } Sleep(10); if (kbhit()) { getch(); printf("GPIB serial poll interrupted!\n"); exit(1); } } } void wait_for_SRQ(void) { while (1) { BOOL32 SRQ = FALSE; while (GPIB_status() & 0x800) { acknowledge_SRQ(); SRQ = TRUE; } if (SRQ) { break; } Sleep(10); if (kbhit()) { getch(); printf("GPIB wait for SRQ interrupted!\n"); exit(1); } } } > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of John Ackermann N8UR > Sent: Friday, September 09, 2005 6:53 PM > To: Discussion of precise time and frequency measurement > Subject: [time-nuts] Off the wall: anyone with experience programming > HP3456A? > > > By any chance, has anyone here done any GPIB programming of the HP 3456A > DMM? I am having great trouble getting it to output SRQ at the end of a > reading; it appears as though it simply doesn't recognize the "SM" > command that the manual says should be used to set the SRQ mask. > > Setting the mask with, e.g., "SM004" which according to the manual > should cause SRQ to be asserted at the completion of a reading, results > in the "004" being briefly displayed on the LED during setup, but no > sign of SRQ actually being asserted. I've tried numerous values of the > octal code representing the status byte, but all act the same. > > I realize it's a long shot, but wonder if anyone here has wrestled with > this? > > Thanks, > > John > > _______________________________________________ > time-nuts mailing list > time-nuts@febo.com > https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > _______________________________________________ time-nuts mailing list time-nuts@febo.com https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts