The following trace shows the result of setting up a TDS-210 scope and taking a reading. After I set up the ACQ Run I issue a *OPC to give the device time to set itself up.
The (21)*OPC returns SRQI and ESB as expected (26). I then issue a *ESR(31) and get back URQ and EXE(36). Here I'm assuming of course that at (36) I am reading URQ & EXE, the results of the *ESR? query.
What I'm confused about is why I don't seem to need a MAV for the subsequent OPC complete(39). Why I'm confused is that the mask at (36) looks more like SRQ and MAV. What complicates things more for me is that the supposed results of the *ESR are interpreted as a URQ and EXE (error)... even though everything appears to work fine both on the scope and in the trace.
Am I missing something obvious?
1. ibfind(GPIB0)
2. ibsic(GPIB0)
3. ibpad(GPIB0, 0)
4. ibconfig(GPIB0, IbcAUTOPOLL (0x0007), 0 (0x0))
5. ibtmo(GPIB0, T3s (12))
6. ibsre(GPIB0, 1)
---------------------------
7. ibcmd(GPIB0, "?@!", 3 (0x3))
8. ibeos(GPIB0, 0x0800)
9. ibeot(GPIB0, 1)
10. ibwrt(GPIB0, "*RST;*CLS;*PS...", 52 (0x34))
11. ibwrt(GPIB0, "CH1:COUP DC;P...", 18 (0x12))
12. ibwrt(GPIB0, "ACQ:MOD AVE.", 12 (0xC))
13. ibwrt(GPIB0, "ACQ:NUMAV 16.", 13 (0xD))
14. ibwrt(GPIB0, "MEASU:MEAS1:S...", 32 (0x20))
15. ibwrt(GPIB0, "CH1:SCA 5E-03.", 14 (0xE))
16. ibwrt(GPIB0, "ACQ:STATE RUN.", 14 (0xE))
17. ibcmd(GPIB0, "_?", 2 (0x2))
---------------------------
18. ibcmd(GPIB0, "?@!", 3 (0x3))
19. ibeos(GPIB0, 0x0800)
20. ibeot(GPIB0, 1)
21. ibwrt(GPIB0, "*OPC.", 5 (0x5))
22. ibcmd(GPIB0, "_?", 2 (0x2))
23. ibwait(GPIB0, 0x5000)
---------------------------
24. ibcmd(GPIB0, "?_ .", 4 (0x4))
25. ibcmd(GPIB0, "A", 1 (0x1))
26. ibrd(GPIB0, "`", 1 (0x1))
27. ibcmd(GPIB0, "._?", 3 (0x3))
28. ibeos(GPIB0, 0x0800)
29. ibeot(GPIB0, 1)
---------------------------
30. ibcmd(GPIB0, "?@!", 3 (0x3))
31. ibwrt(GPIB0, "*ESR?.", 6 (0x6))
32. ibcmd(GPIB0, "_?", 2 (0x2))
33. ibwait(GPIB0, 0x5000)
---------------------------
34. ibcmd(GPIB0, "?_ .", 4 (0x4))
35. ibcmd(GPIB0, "A", 1 (0x1))
36. ibrd(GPIB0, "P", 1 (0x1))
37. ibcmd(GPIB0, "._?", 3 (0x3))
---------------------------
38. ibcmd(GPIB0, "? A", 3 (0x3))
39. ibrd(GPIB0, "1.", 256 (0x100))
40. ibcmd(GPIB0, "_?", 2 (0x2))
41. ibeos(GPIB0, 0x0800)
42. ibeot(GPIB0, 1)
---------------------------
43. ibcmd(GPIB0, "?@!", 3 (0x3))
44. ibwrt(GPIB0, "MEASU:MEAS1:V...", 17 (0x11))
45. ibcmd(GPIB0, "_?", 2 (0x2))
46. ibwait(GPIB0, 0x5000)
---------------------------
47. ibcmd(GPIB0, "?_ .", 4 (0x4))
48. ibcmd(GPIB0, "A", 1 (0x1))
49. ibrd(GPIB0, "P", 1 (0x1))
50. ibcmd(GPIB0, "._?", 3 (0x3))
---------------------------
51. ibcmd(GPIB0, "? A", 3 (0x3))
52. ibrd(GPIB0, "1.82810314E-2.", 1024 (0x400))
53. ibcmd(GPIB0, "._?", 3 (0x3))
54. ibloc(GPIB0)
55. ibonl(GPIB0, 0)