Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

SRQ polling only works once

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
Download All
0 Kudos
Message 1 of 8
(4,596 Views)
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.
0 Kudos
Message 2 of 8
(4,566 Views)
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:
http://zone.ni.com/devzone/cda/tut/p/id/2927
I found I wanted pretty much what is shown in Figure 5:
Using Service Requests for Query Synchronization
I 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
Download All
0 Kudos
Message 3 of 8
(4,557 Views)

Hello TBe,

 

Is Autopolling enabled on your GPIB interface in Measurement and Automation Explorer?  By default it is, but having it disabled can cause SRQ events to not work correctly.  Is there an service request indicator on your instrument?  You may want to check it to make sure it is not requesting service before you enabled the event. 

 

I also noticed that the program is discarding events before they are even enabled.  For instance, events will not be put into the queue until they are registered by enable event.  Because of this, there is no reason to call discard events before any events are registerd.  However this is probably not the cause of your problems.

 

Please send the entire spy capture so I can look at it further.

 

Thanks,

Steven T.

0 Kudos
Message 4 of 8
(4,525 Views)

Dave,

I apologise in advance for this being off topic. I too am working with the nanostep master control (17MDU002) to try and control translation stages. However, I have not even been able to find a manual for this slightly out-of-date piece of equipment. Is there any chance you could let me know how you obtained a manual (or if you have a pdf copy)?

Many Thanks,

Rosanna

0 Kudos
Message 5 of 8
(4,378 Views)

Hi Rosanna,

 

not a problem. I obtained a manual from Melles Griot Germany and I am sending it to you by email.

 

Cheers,

David

0 Kudos
Message 6 of 8
(4,333 Views)

Hi David

I am also trying to write a program to control the same nano stage controller. Is the method which you used the easiest way to achieve this? I am not familiar with SRQ and previously I have only used the Labview program provided by the vendor. 

 

Regards

hlseck

0 Kudos
Message 7 of 8
(4,193 Views)

Hi,

 

I actually never got a Labview program for controlling the stage from Melles Griot. I am controlling it with VISA write by sending the ASCII commands to the controler.

I was not able to make it work with SRQ, although this would in my opinion be the way to do it. For example if you give a move command you would like to know when the stage arrived at the final destination before sending the next move command. In theory the stage should send a SRQ once it finished the movement. The way I do it now is by calculating "time=distance divided by speed".

 

 

Hope this helps

David

0 Kudos
Message 8 of 8
(4,186 Views)