LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic scale problem

Solved!
Go to solution

Hi all.

I´m new to labview and currently using version 8.5! My problem is as follows:

 

I am connected to a tektronix TDS3034B through GPIB to USB cable. I used the "tktds3k single channel waveform acquire example VI" for testing and inserted a 5V square wave into the oscilloscope. I was able to retrieve the wave into labview but every time I change the scale on oscilloscope it gets reseted to the same scale in both devices.

What I was wondering is, what can I do for when I change the scale on oscilloscope, the scale also changes in labview without resetting to original scale in both devices?

Thanks in advance for your help.

 

 

0 Kudos
Message 1 of 16
(4,836 Views)

Anyone?

0 Kudos
Message 2 of 16
(4,814 Views)
You say you are changing the vertical range and then it is changing back. Once you send a range command, the scope will keep that setting until you send another command that changes it. You're not doing something silly like manually setting the vertical range and running the example with defaults are you?
Message 3 of 16
(4,809 Views)

Well, I am not using any kind of commands. Just using and playing the example circuit.

On oscilloscope I have a scale of 2V/div with the YY ranging from -8 to 8, making the signal two and a half squares above 0 (5V). In labview I get a signal with a scale of 1V/div, with the YY ranging from 0 to 5.

What I was wondering is, what changes can I make so I have both signals with the exact size and exact scales. Also would like for when I change the YY scale on oscilloscope, the same scale automatically changes in labview.

Maybe for you it is a simple problem but I am completely noob at labview.

 

I am sorry if I am not being too clear but english is not my primary language.

0 Kudos
Message 4 of 16
(4,801 Views)

I think I understand now. First, it appears that you are seeing the exact same signal in LabVIEW as you are on the scope. the only difference is the actual graph scale in LabVIEW.

 

If you right click on the graph, you will see that autoscale is turned of for the Y axis. That is why you the signal go from 0 to 5. You can turn off autoscaling and manually set the scale range and marker spacing. You can also programatically set the range and marker spacing with property nodes. What I don't know is if there is a command to retrieve these values from the scope. I don't see anything in the driver that will read this information but I could have missed it. You can check the scope manual.

 

To be honest, in all my years of programming instruments, I've never cared if the screen on the program matches the screen on the instrument. The pc screen and the LabVIEW Graph is much better than what any scope has. In the old days, if I could, I would simply turn off the scope display. It was just a distraction. I have only bought and used scope cards the last several years and they don't have their own display at all. All I do is test automation where ideally, all the user would see is a pass/fail indicator at the end of the test.

Message 5 of 16
(4,794 Views)

Normaly I also don´t care if the signal in labiew is exactly the same as in the scope, but it is needed for my project.

I think that the problem may be scope related, since it starts with a scale of 2V/Div and every time I try to change the scope scale after I run the circuit, it immediatly changes back to 2V/div.

Anyway, thanks very much for your help. Kudos to you.

0 Kudos
Message 6 of 16
(4,769 Views)

I don't know what you mean by running a circuit. Do you mean when you run a VI?

 

I also don't see how the scope will change it's own settings unless the there is a continuous Autoset option on the scope.

0 Kudos
Message 7 of 16
(4,766 Views)

Yes, I was meant to say "when I run the VI example".

Without the VI running I can scale and everything else on the scope. After I run it, every time I try to change the scope scale it does not let me and immediatly changes back to 2V/Div.

 

Tried to look at the manual and the scope menu, but could not thing something of interest that could make this happen.

 

0 Kudos
Message 8 of 16
(4,748 Views)

I still don't quite understand. You say that without the VI running, you can change whatever you want. You then run the VI once. The VI is now stopped and not running. You place the scope in manual mode and you then try to change the scope and if you manually change the scale, it changes back to the setting that the VI uses.

 

If that is the exact procedure that you are following, I am truly stumped. This might be question you need to ask Tek. I've never seen this behavior and I don't have a scope now to try i.

0 Kudos
Message 9 of 16
(4,739 Views)

Maybe I forgot to mention earlier but I have applied the "while" function on the VI example (sorry about that), so I can have a constant real time reading.

The problem is with the VI still running and not with it stopped. Before I run the example, I can manually set the scope to 5V/div or other scale but immediatly after I run it, the scope automatically changes to 2V/div. It does not let me change while it is running.

0 Kudos
Message 10 of 16
(4,725 Views)