Discussion:
SRQ polling only works once
(too old to reply)
happydave
2008-08-11 18:10:14 UTC
Permalink
Hi folks, I have some troubles with the SRQ in Labview. I am trying to control an obsolete motorized linear Melles Griot stage with the nano-step master control. Some of the commands take a while in order to complete and instead of introducing "wait-VIs" I decided for the SRQ which is actually supported by these stages. When I reboot the instrument and start the programm it occurs that it passes the first loop without an error (see screenshot 1), but already the second cycle I run into a timeout (error code 1073807339) at the wait for SRQ. I do not understand why. I tried to follow the Labview examples as close as possible. Do I need to reset some byte? By the way, when I execute in a manual way one command after another the system works.Kind regards,David


screenshot 1.png:
http://forums.ni.com/attachments/ni/140/31505/1/screenshot 1.png


screenshot 2.png:
http://forums.ni.com/attachments/ni/140/31505/2/screenshot 2.png
Steven T
2008-08-12 13:40:23 UTC
Permalink
Hello happydave,
 
I think the reson why your wait on RQS is timing out on the second iteration is because the RQS event is never reset in VISA.  After looking at the example, they use the Read STB VI immediately after the event occurs.  You may also want to discard any previously triggered events immediately after enabling your service request event.
 
I hope this helps,Steven T.
TBe
2008-08-12 14:10:15 UTC
Permalink
Hi Steven et al. first of all thank you and all the others out there to take your time. Meanwhile I made some internet inquiries and found this very useful tutorial:<a href="https://webmail.csem.ch/owa/redir.aspx?C=60a389a049a345a2b5440575b1f794cf&amp;URL=http%3a%2f%2fzone.ni.com%2fdevzone%2fcda%2ftut%2fp%2fid%2f2927" target="_blank">http://zone.ni.com/devzone/cda/tut/p/id/2927</a> I found I wanted pretty much what is shown in Figure 5: Using Service Requests for Query SynchronizationI integrated what I found into a new VI and made it standalone. However things did not turn for the better. In this case I already get a timeout error at the "Wait for Request for Service" the first time I run it.By the way in the manual of the Nanostep controller it says that for GPIB command SRQn=1 IEEE service request issued on completion of a command.I also attached below and extract of what I recorded with NI spy.Any ideas? Thanks


Melles Griot_write.vi:
http://forums.ni.com/attachments/ni/140/31527/1/Melles Griot_write.vi


Capture.txt:
http://forums.ni.com/attachments/ni/140/31527/2/Capture.txt


screenshot 4.PNG:
http://forums.ni.com/attachments/ni/140/31527/3/screenshot 4.PNG
Steven T
2008-08-14 14:10:12 UTC
Permalink
Hello TBe,&nbsp;Is Autopolling enabled on your GPIB interface in Measurement and Automation Explorer?&nbsp; By default it is, but having it disabled can cause SRQ events to not work correctly.&nbsp; Is there an service request indicator on your instrument?&nbsp; You may want to check it to make sure it is not requesting service before you enabled the event.&nbsp; &nbsp;I also noticed that the program is discarding events before they are even enabled.&nbsp; For instance, events will not be put into the queue until they are registered by enable event.&nbsp; Because of this, there is no reason to call discard events before any events are registerd.&nbsp; However this is probably not the cause of your problems.&nbsp;Please send the entire spy capture so I can look at it further.&nbsp;Thanks,Steven T.
Loading...