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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Oscilloscope freezes in loop run

Hey all,

 

I am using Agilent DSO-X 3024A through my Labview program to get signals of thermal vibrations in a "for loop".  Then the program takes the FFT in each iteration finally yielding the average FFT. The problem is after some iterations oscilloscope freezes and I need to restart it. I tried "clear memory" command but does not work well for all cases. I appreciate if anybody could give me some clues to troubleshoot the problem.

 

Thanks.

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

This is a very specific issue, so you'll need to share your code to show us what you're doing. Are you able to replicate exactly when the freeze occurs and track it down to a command you send? Is it the same iteration every time when the freeze occurs?

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 16
(4,058 Views)

Hi Keivan,

 

so you "do something" in LabVIEW with your scope, but it fails.

Now you ask us to solve your problem with this "something"…

 

Don't you think it would help to show your VI?

What does the programming manual of your scope say about this problem?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 16
(4,056 Views)

I attached the program. Oscilloscope does not freeze/hang at the same interation everytime. Sometimes it continues 400 iterations but sometime less than 10. My first guess is it should relate to buffer delay or memory.

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

So you are doing 1000 iterations of the FOR loop that cannot be interrupted and the inner while loop repeats the same thing over and over, as fast as the computer allows until the switch is changed, at which time it does only one iteration each until the switch is pressed again.

 

Don't you want to pace the communication a little bit?

 

What is the purpose of the inner sequence structure? What are the operator guidelines for the switch and why it is outside the visible FP area? Why do you have two different resources for the same instrument? What is the point of the outer sequence structure?

0 Kudos
Message 5 of 16
(4,018 Views)

altenbach, every time I read one of your posts like this, it puts me back in college when I was presenting and getting grilled by my professor Smiley Very Happy


@altenbach wrote:

the inner while loop repeats the same thing over and over, as fast as the computer allows until the switch is changed


 This part, I don't think is 100% correct. The Single Waveform VI in there has a timeout, so that would be controlling the loop timing. That being said, he probably doesn't want to iterate right away and write to the comms so fast after the read.

 

Keivan,

Can you track your freeze issue to a specific iteration every time? For example, is it every 100 iterations? If you drop your iteration count down, can you get it to a point where the freeze never happens? It might be a timing thing, or a buffer issue.

You use the Configure Timebase VI with every iteration. My guess is you only need to do this when you change the timing values. Look in to a value change event in a state machine, or set up a case structure in there.

 

How fast is this actually looping when you run it? Does the acquisition take a while, or is it pretty quick?

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


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

You are right. I can eliminate inner sequence and also configure timebase out of the the FOR loop. I attached the modified program but still it stops at some iterations. Acqusition time is acceptablly fast (like 100 iterations take about a minute) but freezing issue is not happening in an specific iteration. Sometimes it can go up to 500 iterations but sometime it stops in the first 50 iterations. Also, when capturing the signal in each iteration oscilloscope says "invalid character". I am not sure whether or not that is relevant to my problem.

0 Kudos
Message 7 of 16
(3,993 Views)

@James.M wrote:

 

 This part, I don't think is 100% correct. The Single Waveform VI in there has a timeout, so that would be controlling the loop timing.


A timeout only controls the loop timing if a timeout actually occurs. It just provides an upper limit, but no real pacing. Typically the response time of the instrument is time limiting.

Message 8 of 16
(3,984 Views)

@Keivan wrote:

You are right. I can eliminate inner sequence and also configure timebase out of the the FOR loop. I attached the modified program but still it stops at some iterations. Acqusition time is acceptablly fast (like 100 iterations take about a minute) but freezing issue is not happening in an specific iteration. Sometimes it can go up to 500 iterations but sometime it stops in the first 50 iterations. Also, when capturing the signal in each iteration oscilloscope says "invalid character". I am not sure whether or not that is relevant to my problem.


Off hand, I'd say you weren't sending the commands correctly.  I've never seen the use of a % when sending SCPI commands.  I believe you are misinterpreting the programmer's guide.  It looks like you are putting some of the formatting in that is only used to tell you what goes there, not to put it in literally.

 

edit:

Sorry I wasn't talking about the % sign being formatted incorrectly - although I think that's probably wrong, also - I was talking about the <r> part.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 16
(3,968 Views)

Altenbach, that's what I meant. Sorry, looking back I wasn't very clear. I meant that the presence of a timeout input shows that there's instrument communication there which can allow instrument communication timing which is common practice when your main purpose is instrument data.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 10 of 16
(3,958 Views)