03-19-2014 12:09 PM
I ll be talking about using a RS232 Serial Connection here.
Here is what works:
I have a large program that allows me to set and measure values on the oscilloscope.
So far I have managed to set parameters such as vertical and horizontal scale and position (by sending string commands) and am also able to send basic commands that then return values for i.e. the frequency of the signal on channel 1.
The problem is this:
What I wanted to do is to get the waveform from the scope. I tried just using the example from the TDS 2000 series driver but it doesnt appear to work.
Specifically it appears that for the Continous Waveform.vi produces an empty waveform. When I probe the waveform wire in the loop I can see that there are two values t (time) and x. While x changes the value sometimes, t is ALWAYS 0 and this is what probably makes the waveform graph look empty (even with autoscale I can´ t see anything). SEE ATTACHED PIC.
Can somebody pleas help me to get the full Waveform displayed? I need to finish this project as soon as possible!
PS: I remember using the very same example last year for a TPS 2014 and back then it worked fine.
My Setup:
NOTE:
In MAX VISA test panel I can querry the scope and that works too. However the Buffers are both set to 0 there, is that oke?
Also, should I use hardflagging for this vi or just "none"?
03-19-2014 12:49 PM
A buffer of 0 sounds really dangerous to me. I tend to set that to the maximum.
It looks like you are just getting 1 samples out. This could be related to the buffer, but hard to say for sure.
03-19-2014 01:03 PM
I was also wondering wether the settings I have in MAX are being overwritten by the vi itesf. Because the VISA read/write in the Driver Vi´s usally have a 256 integer to the # of Bytes input wired - is that the Buffer?
Along the same lines: If I set the Flow Control in MAX to hardware flagging but in the Vi itself to "none" which one is it gonna take?
03-19-2014 01:19 PM
03-19-2014 02:41 PM
What do u mean by the settings int he Vi have to match the instrument? Whatever values for Baudrate etc. I set in the vi is controlling the settings in the scope. After I have run the vi the scope ll have the settings I sent to it in the vi.
Can anyone tell me where I should look for the cause of my problem? Since I can querry the scope, set some values and even get measured values from it I dont think its the SERIAL PORT itself. Am I right?
Also, do I have to take anything into consideration when I use the hardflagging flow control (like special setup in the vi´s?)
03-19-2014 03:01 PM
03-19-2014 04:34 PM - edited 03-19-2014 04:42 PM
I only went to look at the example because my main program, that does all that (initialize, set horiz, vertical scale and position) but when it goes into the Acquire Waveform it returns an empty Waveform - just like the example.
As I said I can also get the scope to give me actual values for measurements it did (i.e. it gives me the frequency which I can work with and display on the Front panel).
So I was thinking there is a problem with the flow control (or something related) as commands that make the scope output short strings seem to work, but when it comes to longer strings such as a waveform and a screenshot things go wrong - without an error message (in fact all the VIs error wires show OK).
I am looking for an explanation as to why short outputs seem to work and long ones apparently fail. If I posted a a screenshot of I/O trace would you be able to help?
EDIT (attached a the trace - in the picture the last line is missing, all it says is VISA close "COM1")
03-19-2014 05:01 PM
03-19-2014 05:25 PM
03-20-2014 07:31 AM - edited 03-20-2014 07:38 AM
I now use a minimalized version of my program where I set everything myself and do a "single acq" to "freeze" the screen. Then I use the low level FetchWaveform.vi that comes with the driver and is ALSO used in the example we talked about earlier.
I put some probes into this FetchWaveform.vi (see picture). It appears that the acquisition is for 1 point only but I dont really know how to change it (add a loop somewhere?).
If anyone has used VISA before I believe you are able to help me just from looking at the picture!
NOTE: the left side of the pic is cut off but that is only a concatenate string system that produces the string you can anyways see on probe 7)
EDIT: While the Y coordinate (probe 14) is specified as an 1D array it appears to only have 1 entry.