Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB and SRS DG535, only reads correctly after several tries

I have made a vi that reads the delays of a delay generator (there is 4 different delays: A,B,C and D).
 
It seems to work, however when you select a new delay (that is to be read) the old delay is still read in. Only after running the vi 4 to 10 times does the correct value of the new delay show up. What is wrong?
 
I have tried changing the read byte count - less than 19 gives and error (in the read string) and more seems to make no change.
 
I also tried to set a mode but that didnt seem to change things.
 
Hope someone can tell me whats going on.
 
Im using a NI USB to GPIB converter.
 
Thanks,
Simon
 
0 Kudos
Message 1 of 11
(7,118 Views)

I'm using the SRS DG535 in one of our test stations.

I'm not sure what you mean by "read" the delay.

I set the delay using   DT i,j,t   where i and j  are defined in their manual and t is the delay

I only set the delay but never read it back.

0 Kudos
Message 2 of 11
(7,106 Views)

I set the delays manually, but would like to read the delay value for my log file. If that is done automaticly there is less chance of error and I will not forget to write it down.

You can try and run the vi and see if the right delay is read every time you run it. The error for me is that when i change the delay to be read, the old channel is still read the first 4 to 10 runs, before the new channel shows up.

0 Kudos
Message 3 of 11
(7,095 Views)
I got it working, somehow it had a problem by running it once. When adding a while loop and a case structure it reads the correct value every time.
0 Kudos
Message 4 of 11
(7,094 Views)
Is there a way to read the other settings back off the machine?  I would like to be able to read trigger information as well as delay information.  Can you help me to do this?

Thanks
0 Kudos
Message 5 of 11
(6,661 Views)
Have a look in the manual, I dont really remember it that well but i think you just need to send a command. Just like in the above VI where "DT 2" is written to the instrument in order to get back information about the delay of channel A.
0 Kudos
Message 6 of 11
(6,614 Views)
Thank you for getting back to me, sorry I had to reply to such an old post.  I have read through the manual and honestly, I didnt even see in the manual where it says that sending DT 2 will return the delay time settings for channel A.  I saw in the manual where it tells you how to configure the the delay time settings using the DT ij command.  Maybe the manual I am reading is incomplete.  I figured I would ask and see if you had previously read back trigger settings, perhaps I should try contacting the vendor.  Thank you very much for your time!
0 Kudos
Message 7 of 11
(6,602 Views)
Sorry I cant help you, I no longer work at at the same company and do not have access to the manuals. Maybe you can find a online manual or something - im sure the vendor could help you out with that.
0 Kudos
Message 8 of 11
(6,591 Views)
jmcbee: Have you managed to get your trigger settings? It doesn't seem to be written in the manual, but if you just send the commands to change the settings without a value to set to the delay box seems to return the current value. Only tricky bit is to figure out the right byte count. 19 seems to be right for the delays, as Simon wrote, and 7 for pulse amplitudes and offsets.
Message 9 of 11
(6,155 Views)

philippz, thanks for the post.  I did get this figured out, probably should have posted the solution to the forums. 

 

Regards

Message 10 of 11
(6,153 Views)