From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-10-2015 08:13 AM
Hi Folks.
I am having a timing issue with my oscilliscope (Rigol DS1052E) being programmed with Labview. In the "Automated Function Generator" VI everything works fine. The commands are sent to the function generator (TTi TG2000) and I can view the waveform changes smoothly on the oscilliscope. When I add the functionality to read the Oscilliscope into Labview the problem occurs. The signal appears and dissapears instead of being constant. The waveform graph on the front panel is consistant, but it is only representing the data that is displayed momentarily on the scope. Why am I getting the blank screen and how can I make the signal appear consistant. Is this an issue with my coding or is there any known issues with Rigol data aquisition??
Thanks,
Mark.
06-10-2015 08:48 AM
Your problem is likely that Autosetup call that you are doing each loop iteration. Especially with instrument communications, you should do all of your setup once, before the loop. Also, you should do the cleanup (closing) once after the loop. So move all of your initialization code to be before your loop and all of the closing to be after the loop. So all you should have inside of your loop is the VISA Write and the Read Single Waveform.
A couple of additional notes:
1. There is no real point to the FOR loop. You should just get rid of it.
2. You really should stop your loop when there is an error.
3. Make sure you are closing all of your VISA references.
06-10-2015 09:15 AM
I made all the changes you recommended (in attachment) but I still have the same problem. I can frequency changing then the signal disappears for about 2 seconds. This all happens within the loop. I have tried adding a few delays but this just exaggerates the problem.
06-10-2015 10:07 AM
I do not have those Rigol drivers, but it is sounding like that function is doing something with the screen.
06-10-2015 11:09 AM
I viewed a demo online which shows the oscilliscope to. It also was jumping. It must be something to do internally when it recieves a command. Annoying but I will get by.
06-10-2015 11:11 AM
Maybe it's set up to accomplish "continuous" by doing continuous single triggers?
06-10-2015 11:14 AM
Just downloaded the drivers and did a little digging. The Read.vi calls an Initialte and then waits 2 seconds before getting the waveform. I'm willing to bet that this is what is causing your screen to go away. You should be able to call the Low Level->Fetch Waveform.vi on its own as long as the scope is set to continuously acquire.
06-10-2015 11:48 AM
I was thinking that myself. For the moment I am just going to wait until the signal stabalises but if things are running too slow I might change this.
Thanks for the advise.