11-28-2010 07:23 AM
I have two questions based on a SRQ Event Handling example given on NI website "Using Service Requests in your GPIB application" (http://zone.ni.com/devzone/cda/tut/p/id/4629). The diagram is attached.
I would like change the wavelength of a tunable laser (Santec Tunable Laser TLS -510) and be sure the operation is complete before I proceed.
In general I can use *OPC or *OPC? to ensure operation is complete. However, the device does not support *OPC command. The command *OPC? is based on message available bit in the status byte register. I have found an example on NI website using *OPC? command, the image is attached.Here are my questions:
1. In the example, VISA Clear is not used. However, I believe the output buffer should be cleared with VISA Clear, if operation complete will be based on checking message available bit.What do you think?
2. In order to use Wait for RQS , the VISA Enable event should be used as in the example. Do you think, to ensure that SRQ event does not respond to previous SRQ events, I should also use VISA Discard events after enabling VISA Event?
Thank You,
11-28-2010 07:43 AM
One more questions. Isn't is also a good practice to clear the status byte register with *CLS before we wait for a service request?
11-30-2010 07:48 AM
Hello Gunay,
Can you post the link where you've found the example?
11-30-2010 08:23 AM
Hi Thierry,
He is the link of the NI example on using *OPC? , it is example 2:
http://zone.ni.com/devzone/cda/tut/p/id/4629
Thanks,
Gunay
12-02-2010 09:51 AM
Hello Gunay,
I think all the suggestions you made can be usefull if you really want to make sure that every step is done before going on to the next step.
I also think that the example from the NI website works properly without your ideas, but it's ofcourse never bad to do an extra check. So normally it won't cause any errors if you implement your suggestions.
Kind regards,
Nico Lammens
12-02-2010 10:00 AM
Thanks Nico.
I will post if something with my implementation goes wrong.
12-02-2010 10:00 AM
Thanks Nico.
I will post if something with my implementation goes wrong.