LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with visa RQS (always times out)

I am trying to program a pair of Wavetek 39 waveform generators, which us GPIB.  I want to not fill up their input buffer by seending commands too fast, so I want to know when it is done with one before sending the next one.  The way I should do this it seems, is to use the service request event.  Unforunately, I can't get that working. 

I've slightly modified the SRQ event example (just modified the instrument instruction string to match my instrument) and attaced that.  Unfortunately, when I run that, no service request is generated, or at least the "wait for RQS" vi doesn't pick up on them, so it always times out, even thought the instruction ("WAVE SINE", which just selects a sine wave for output) is definately finfished. 

Any ideas why this isn't working, or othe methods I might use to make sure I don't send instructions too fast (besides just adding arbtrary waits. .  that would be dumb)?


0 Kudos
Message 1 of 10
(3,055 Views)
Hello holomorph,

There is a great tutorial on Using Service Requests in GPIB Applications in the Developer Zone.  It should help you in using the SRQ event example more efficiently.  If you have followed the tutorial and still are having trouble, please let me know! 

Thanks!

Meghan
Applications Engineer
Message 2 of 10
(3,037 Views)
yes I've seen that tutorial.  It is, as far as I can tell, very similar to the example code in SRQ Event Handling.vi.  Unfortunately I still get timeouts when I try using " *OPC? " instead of " *OPC " so either I'm doing something wrong (and not understanding how it's supposed to work), or my GPIB device is simply not generating the service request as it should.

- Bjørn

Message Edited by holomorph on 01-26-2007 05:54 PM

Message Edited by holomorph on 01-26-2007 05:55 PM

Message 3 of 10
(3,036 Views)
Hello Bjorn,

Do you have a manual for your GPIB device?  Each device can have different commands and termination, so if you are not using the correct command for your device, it would not respond and would give you a timeout.

Thanks,

Meghan
Applications Engineer
Message 4 of 10
(3,028 Views)
Yes, I have a manual, and it actually does have the desired effect on the device (ie, selects a sine wave for output), but then doesn't generate the service request, as far as I can tell.  Is there another way I can find out if the service request is actually being generated on the line, and maybe not being picked up by labview?
0 Kudos
Message 5 of 10
(3,026 Views)
Hi holomorph,

Does this command return a response (ie-data is ready)?  It's possible that this device does not request response when it is complete with it's action, and that would cause a timeout.  GPIB Analyzer would tell you what lines are being driven by the device to see if the service request is being missed.  You would have to have a PCI-GPIB+ card to run this program. Here is a link to the GPIB Analyzer User Manual

Meghan
Applications Engineer
Message 6 of 10
(2,982 Views)
Thanks. 

In max, my GPIB card is listed as GPIB0(PCI-GPIB); I assume this is not a PCI-GPIB+ card because I get a warning that either thd GPIB hardware is not present in the system or the GPIB Analyzer functinality has beed disabled.  Is that assumption correct?

If I am correct it is unfortunate; no doubt being able to monitor the bus would provide some good insight 😞


0 Kudos
Message 7 of 10
(2,963 Views)

Start >>> Programs >>> National Instruments >>> NI Spy.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 10
(2,956 Views)
it was my understanding that NI Spy would just show me the calls that are being made by my program, not what is actually on the GPIB bus.  But maybe I'm wrong.
0 Kudos
Message 9 of 10
(2,948 Views)
ok, I figured it out.  Apparently the problem was the device did not like the numbers (eg *ESE 0x01) in hex (had to use *ESE 1).  Thanks for the suggestions.
Message 10 of 10
(2,922 Views)