AnsweredAssumed Answered

vrf inconsistent measurements

Question asked by VRFuser on Mar 17, 2003
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=ProgId content=Word.Document><meta name=Generator content="Microsoft Word 9"><meta name=Originator content="Microsoft Word 9"><link rel=File-List href="cid:filelist.xml@01C2ED45.06698460"><title>inconsistent measurements</title><!--[if gte mso 9]><xml> <o:OfficeDocumentSettings>  <o:DoNotRelyOnCSS/> </o:OfficeDocumentSettings></xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument>  <w:Zoom>0</w:Zoom>  <w:DocumentKind>DocumentEmail</w:DocumentKind>  <w:EnvelopeVis/>  <w:DrawingGridHorizontalSpacing>3.75 pt</w:DrawingGridHorizontalSpacing> </w:WordDocument></xml><![endif]--><style><!-- /* Font Definitions */@font-face     {font-family:Tahoma;     panose-1:2 11 6 4 3 5 4 4 2 4;     mso-font-charset:0;     mso-generic-font-family:swiss;     mso-font-pitch:variable;     mso-font-signature:16792199 0 0 0 65791 0;} /* Style Definitions */p.MsoNormal, li.MsoNormal, div.MsoNormal     {mso-style-parent:"";     margin:0in;     margin-bottom:.0001pt;     mso-pagination:widow-orphan;     font-size:12.0pt;     font-family:"Times New Roman";     mso-fareast-font-family:"Times New Roman";}p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig     {margin:0in;     margin-bottom:.0001pt;     mso-pagination:widow-orphan;     font-size:12.0pt;     font-family:"Times New Roman";     mso-fareast-font-family:"Times New Roman";}p     {margin-right:0in;     mso-margin-top-alt:auto;     mso-margin-bottom-alt:auto;     margin-left:0in;     mso-pagination:widow-orphan;     font-size:12.0pt;     font-family:"Times New Roman";     mso-fareast-font-family:"Times New Roman";}span.EmailStyle16     {mso-style-type:personal-reply;     mso-ansi-font-size:10.0pt;     mso-ascii-font-family:Arial;     mso-hansi-font-family:Arial;     mso-bidi-font-family:Arial;     color:navy;}@page Section1     {size:8.5in 11.0in;     margin:1.0in 1.25in 1.0in 1.25in;     mso-header-margin:.5in;     mso-footer-margin:48.25pt;     mso-title-page:yes;     mso-paper-source:0;}div.Section1     {page:Section1;}--></style></head><body lang=EN-US style='tab-interval:.5in'><div class=Section1><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>The *WAIcommand is misunderstood, both by programmers and by instrumentdevelopers.<span style="mso-spacerun: yes">  </span>The SCPI definitionspecified that the MEAS command should wait until data is processed beforereturning data.<span style="mso-spacerun: yes">  </span>It appears thatthe instrument you are using doesn’t follow this and will always returnwhatever data is available.<o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>Theproblem is that the MEAS command is supposed to be an all in one type and thereis no appropriate place to put the *WAI.<span style="mso-spacerun: yes"> </span>I am unfamiliar with the 6612C, so I will need to generalize.<o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>The MEAScommand in SCPI can be broken down into a CONFigure, followed by a READ? .<spanstyle="mso-spacerun: yes">  </span>The READ in turn can be broken downinto INITiate followed by a *WAI and then a FETCh?<span style="mso-spacerun:yes">  </span>Therefore, one way to do this is to replace the transactionMEAS:|whatever>? With the following:<o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>CONF:|whatever><o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>INIT<o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>*WAI<o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>FETCH:|whatever>?<o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>However,many instruments don’t support the read and fetch capabilities.<spanstyle="mso-spacerun: yes">  </span>In this case, I would look at placing aserial poll loop, looking for the meas complete bit between the MEAS command andthe enter.<span style="mso-spacerun: yes">  </span>In any case, the *WAIcommands are currently in places where there shouldn’t be any pendingoperations.<o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>The IEEEcommittee originally intended to allow multiple commands in a single messageand use the *WAI to synchronize this way.<span style="mso-spacerun: yes"> </span>Again, I don’t know this particular instrument, but you might try:<o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>Output|dev> “MEAS:|whatever>?;*WAI”<o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>Enter|dev> |var><o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>This hasthe effect that all pending commands must complete, before the statementcompletes.<span style="mso-spacerun: yes">  </span>However, manyinstruments also implemented this wrong.<o:p></o:p></span></font></span></p><p class=MsoNormal><span class=EmailStyle16><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p><p class=MsoNormal><!--[if supportFields]><span class=EmailStyle16><font size=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><span style='mso-element:field-begin'></span><span style="mso-spacerun: yes"> </span>AUTOTEXTLIST s "E-mail Signature" <span style='mso-element:field-separator'></span></span></font></span><![endif]--><fontcolor=navy><span style='color:navy'><span style="mso-spacerun:yes"> </span></span></font><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy'><spanstyle="mso-spacerun: yes"> </span>Best regards,</span></font><font size=2color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy'><spanstyle="mso-spacerun: yes">      </span>JayNemeth-Johannes</span></font><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy'><spanstyle="mso-spacerun: yes">      </span>Complete Test</span></font><fontsize=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy'><spanstyle="mso-spacerun: yes">      </span></span></font><fontcolor=navy><span style='mso-bidi-font-family:Arial;color:navy'>720 SW 14thStreet</span></font><font size=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy'><spanstyle="mso-spacerun: yes">      </span>Loveland,Colorado 8053</span></font><font color=navy><span style='mso-bidi-font-family:Arial;color:navy'>7</span></font><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy'><spanstyle="mso-spacerun: yes">      </span>(970) 663-0006</span></font><fontsize=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy'><spanstyle="mso-spacerun: yes">     </span>www.completetest.com</span></font><font size=2 color=navy face=Arial><spanstyle='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p><p class=MsoNormal><!--[if supportFields]><span class=EmailStyle16><font size=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><span style='mso-element:field-end'></span></span></font></span><![endif]--><spanclass=EmailStyle16><font size=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p><p class=MsoNormal style='margin-left:.5in'><font size=2 color=blackface=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>-----OriginalMessage-----
<b><span style='font-weight:bold'>From:</span></b> Ross Bledsoe[mailto:RBLEDSOE@Coinco.com]
<b><span style='font-weight:bold'>Sent:</span></b> Monday, March 17, 2003 8:45AM
<b><span style='font-weight:bold'>To:</span></b> VEE vrf
<b><span style='font-weight:bold'>Subject:</span></b> [vrf] inconsistentmeasurements</span></font></p><p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><spanstyle='font-size:12.0pt'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></p><p class=MsoNormal style='margin-left:.5in'><font size=3 color=blackface="Times New Roman"><span style='font-size:12.0pt;color:black'><![if !supportEmptyParas]> <![endif]></span></font><fontcolor=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p><p style='margin-left:.5in'><font size=3 color=black face=Arial><spanstyle='font-size:12.0pt;font-family:Arial;color:black'>I am using the attachedfunction to measure the current across multiple LEDs.  I call the function20 - 30 times in my program.  My problem is that the measured results varydepending on where I put the *wai command inside my direct i/o.  If I tiea "display alphanumeric" to the output of the function I sometimes get 1+infinity reading.  If I go inside the function and readthe result on the thread it is not infinity.  Trimming the number to 6significant digits seems to help but does not work 100% of the time  If Iput delays between the direct I/O objects this has the same effect.  Iknow there is a way to get consistent results without having to usedelays.  I am using a Agilent 6612C for PS01 and PS02 .Any suggestionswould be appreciated</span></font><font color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p><p style='margin-left:.5in'><font size=3 color=black face=Arial><spanstyle='font-size:12.0pt;font-family:Arial;color:black'>Ross</span></font><fontcolor=black><span style='color:black'> </span></font><font color=black><spanstyle='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p><p style='margin-left:.5in'><font size=2 color=black face=Arial><spanstyle='font-size:10.0pt;font-family:Arial;color:black'>||psfunction.vee>></span></font><font color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p></div>---<BR>You are currently subscribed to vrf as: rsb@soco.agilent.com<BR>To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list,  email "vrf@it.lists.it.agilent.com".  <BR>If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".</BODY></html>  

Outcomes